camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] camel git commit: CAMEL-11448: Optimise - Detect interrupted exception in a quicker way which optimises the routing engine to be faster.
Date Sat, 24 Jun 2017 21:41:41 GMT
Repository: camel
Updated Branches:
  refs/heads/master 2dcad657c -> 5c554b085


CAMEL-11448: Optimise - Detect interrupted exception in a quicker way which optimises the
routing engine to be faster.


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

Branch: refs/heads/master
Commit: 57449b7a069d8b87144cdfd149d72670ffd85aa9
Parents: 2dcad65
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sat Jun 24 23:41:10 2017 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sat Jun 24 23:41:10 2017 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/util/ExchangeHelper.java      | 3 ++-
 .../camel/management/ManagedTypeConverterRegistryTest.java       | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/57449b7a/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java b/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java
index 13d08ad..3e6ecb6 100644
--- a/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java
+++ b/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java
@@ -676,7 +676,8 @@ public final class ExchangeHelper {
      * @return <tt>true</tt> if interrupted, <tt>false</tt> otherwise
      */
     public static boolean isInterrupted(Exchange exchange) {
-        return exchange.getProperty(Exchange.INTERRUPTED, false, boolean.class);
+        Object value = exchange.getProperty(Exchange.INTERRUPTED);
+        return value != null && Boolean.TRUE == value;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/camel/blob/57449b7a/camel-core/src/test/java/org/apache/camel/management/ManagedTypeConverterRegistryTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedTypeConverterRegistryTest.java
b/camel-core/src/test/java/org/apache/camel/management/ManagedTypeConverterRegistryTest.java
index 2870115..7306553 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedTypeConverterRegistryTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedTypeConverterRegistryTest.java
@@ -76,9 +76,9 @@ public class ManagedTypeConverterRegistryTest extends ManagementTestSupport
{
 
         // should hit
         Long hit = (Long) mbeanServer.getAttribute(name, "HitCounter");
-        assertEquals(3, hit.intValue());
+        assertEquals(1, hit.intValue());
         Long coreHit = (Long) mbeanServer.getAttribute(name, "CoreHitCounter");
-        assertEquals(3, coreHit.intValue());
+        assertEquals(1, coreHit.intValue());
         failed = (Long) mbeanServer.getAttribute(name, "FailedCounter");
         assertEquals(0, failed.intValue());
         miss = (Long) mbeanServer.getAttribute(name, "MissCounter");


Mime
View raw message