camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/6] git commit: Polished and removed old 1.x api which we no longer support in camel-hazelcast
Date Sat, 14 Sep 2013 10:31:23 GMT
Polished and removed old 1.x api which we no longer support in camel-hazelcast


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

Branch: refs/heads/camel-2.12.x
Commit: ccb855f026af839406304314252c62371b81f981
Parents: ed6e772
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sat Sep 14 12:28:23 2013 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sat Sep 14 12:29:13 2013 +0200

----------------------------------------------------------------------
 .../hazelcast/listener/CamelItemListener.java   | 20 ++------------------
 .../hazelcast/listener/CamelListener.java       | 10 ++++++----
 2 files changed, 8 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ccb855f0/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/listener/CamelItemListener.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/listener/CamelItemListener.java
b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/listener/CamelItemListener.java
index 1b14327..3fe1373 100644
--- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/listener/CamelItemListener.java
+++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/listener/CamelItemListener.java
@@ -31,27 +31,11 @@ public class CamelItemListener extends CamelListener implements ItemListener<Obj
         super(consumer, cacheName);
     }
 
-    /**
-     * @deprecated is using the Hazelcast 1.x API
-     */
-    @Deprecated
-    public void itemAdded(Object item) {
-        this.sendExchange(HazelcastConstants.ADDED, null, item);
-    }
-
-    /**
-     * @deprecated is using the Hazelcast 1.x API
-     */
-    @Deprecated
-    public void itemRemoved(Object item) {
-        this.sendExchange(HazelcastConstants.REMOVED, null, item);
-    }
-
     public void itemAdded(ItemEvent<Object> itemEvent) {
-        itemAdded(itemEvent.getItem());
+        this.sendExchange(HazelcastConstants.ADDED, null, itemEvent);
     }
 
     public void itemRemoved(ItemEvent<Object> itemEvent) {
-        itemRemoved(itemEvent.getItem());
+        this.sendExchange(HazelcastConstants.REMOVED, null, itemEvent);
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/ccb855f0/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/listener/CamelListener.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/listener/CamelListener.java
b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/listener/CamelListener.java
index 5264d92..e43100e 100644
--- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/listener/CamelListener.java
+++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/listener/CamelListener.java
@@ -47,10 +47,12 @@ public class CamelListener {
         try {
             consumer.getProcessor().process(exchange);
         } catch (Exception e) {
-            if (exchange.getException() != null) {
-                consumer.getExceptionHandler().handleException(String.format("Error processing
exchange for hazelcast consumer on object '%s' in cache '%s'.", key, cacheName), exchange,
-                        exchange.getException());
-            }
+            exchange.setException(e);
+        }
+
+        if (exchange.getException() != null) {
+            consumer.getExceptionHandler().handleException(String.format("Error processing
exchange for hazelcast consumer on object '%s' in cache '%s'.", key, cacheName), exchange,
+                    exchange.getException());
         }
     }
 


Mime
View raw message