You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2015/04/22 16:11:48 UTC

[1/2] camel git commit: CAMEL-6406 Add support to ObjectHelper.getException() for Java 1.7 Throwable.getSuppressed()

Repository: camel
Updated Branches:
  refs/heads/master ea6d2fcc1 -> c03876bcf


CAMEL-6406 Add support to ObjectHelper.getException() for Java 1.7 Throwable.getSuppressed()


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c03876bc
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c03876bc
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c03876bc

Branch: refs/heads/master
Commit: c03876bcfa3be88be49ad3ffa618f71ba65e2d04
Parents: bff1ec7
Author: Willem Jiang <wi...@gmail.com>
Authored: Wed Apr 22 22:10:43 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed Apr 22 22:10:55 2015 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/util/ObjectHelper.java     | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c03876bc/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java b/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
index 3aba156..4290a88 100644
--- a/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
+++ b/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
@@ -1707,6 +1707,13 @@ public final class ObjectHelper {
         if (exception == null) {
             return null;
         }
+        
+        //check the suppressed exception first
+        for (Throwable throwable: exception.getSuppressed()) {
+            if (type.isInstance(throwable)) {
+                return type.cast(throwable);
+            }
+        }
 
         // walk the hierarchy and look for it
         for (final Throwable throwable : createExceptionIterable(exception)) {


[2/2] camel git commit: Fixed CS error of camel-test

Posted by ni...@apache.org.
Fixed CS error of camel-test


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bff1ec76
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bff1ec76
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bff1ec76

Branch: refs/heads/master
Commit: bff1ec76807607b95b63ce2f8fc73b64af0887f9
Parents: ea6d2fc
Author: Willem Jiang <wi...@gmail.com>
Authored: Wed Apr 22 20:54:59 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed Apr 22 22:10:55 2015 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/camel/test/junit4/CamelTestSupport.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/bff1ec76/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java
----------------------------------------------------------------------
diff --git a/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java b/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java
index b6931de..e716da6 100644
--- a/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java
+++ b/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java
@@ -82,11 +82,12 @@ public abstract class CamelTestSupport extends TestSupport {
     protected volatile ProducerTemplate template;
     protected volatile ConsumerTemplate consumer;
     protected volatile Service camelContextService;
+    protected boolean dumpRouteStats;
     private boolean useRouteBuilder = true;
     private final DebugBreakpoint breakpoint = new DebugBreakpoint();
     private final StopWatch watch = new StopWatch();
     private final Map<String, String> fromEndpoints = new HashMap<String, String>();
-    protected boolean dumpRouteStats;
+
 
     /**
      * Use the RouteBuilder or not