From 62dbd30be49e64a4884a20234b38abacd1b1e79a Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 27 Apr 2009 09:12:19 +0000 Subject: [PATCH] xerial-core-1.0.4 * SilkStreamReader * SilkFormat and appender support in BeanUtil git-svn-id: http://www.xerial.org/svn/project/XerialJ/trunk/xerial-core@3263 ae02f08e-27ec-0310-ae8c-8ba02fe2eafd --- pom.xml | 2 +- src/main/java/org/xerial/silk/SilkPullParser.java | 5 +++-- src/main/java/org/xerial/util/bean/impl/BeanBindingProcess.java | 7 ++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 6c57883..565c317 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ org.xerial xerial-core Xerial Core - 1.0.3-SNAPSHOT + 1.0.4 Xerial Core: standard utilities for XerialJ project diff --git a/src/main/java/org/xerial/silk/SilkPullParser.java b/src/main/java/org/xerial/silk/SilkPullParser.java index 342ec3f..f4cfd11 100644 --- a/src/main/java/org/xerial/silk/SilkPullParser.java +++ b/src/main/java/org/xerial/silk/SilkPullParser.java @@ -129,6 +129,7 @@ public class SilkPullParser { parser.parse(this); foundEOF = true; + threadPool.shutdownNow(); return true; } @@ -142,7 +143,9 @@ public class SilkPullParser return true; if (foundEOF) + { return !eventQueue.isEmpty(); + } fetchNext(); @@ -157,8 +160,6 @@ public class SilkPullParser if (foundEOF) return eventQueue.poll(); - fetchNext(); - return next(); } diff --git a/src/main/java/org/xerial/util/bean/impl/BeanBindingProcess.java b/src/main/java/org/xerial/util/bean/impl/BeanBindingProcess.java index 10f4642..a4f51e2 100644 --- a/src/main/java/org/xerial/util/bean/impl/BeanBindingProcess.java +++ b/src/main/java/org/xerial/util/bean/impl/BeanBindingProcess.java @@ -524,7 +524,12 @@ public class BeanBindingProcess implements TreeVisitor } catch (InvocationTargetException e) { - throw new BeanException(BeanErrorCode.InvocationTargetException, e); + Throwable cause = e.getCause(); + if (cause == null) + throw new BeanException(BeanErrorCode.InvocationTargetException, String.format( + "node=%s, value=%s, updator=%s", nodeStack.getLast(), value, updator.getMethod().getName())); + else + throw new BeanException(BeanErrorCode.InvocationTargetException, cause); } } -- 2.11.0