camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [2/2] git commit: CAMEL-6819 avoid the NPE when the ExceptionHandler is not set
Date Wed, 14 May 2014 01:56:37 GMT
CAMEL-6819 avoid the NPE when the ExceptionHandler is not set


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

Branch: refs/heads/master
Commit: 273b576906bfacecd073a374018fa2599212fe15
Parents: e61235b
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Wed May 14 09:56:06 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Wed May 14 09:56:06 2014 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/camel/component/xmpp/XmppConsumer.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/273b5769/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConsumer.java
b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConsumer.java
index fe5cbca..657c504 100644
--- a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConsumer.java
+++ b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConsumer.java
@@ -69,7 +69,9 @@ public class XmppConsumer extends DefaultConsumer implements PacketListener,
Mes
                 throw new RuntimeException("Could not connect to XMPP server.", e);
             }  else {
                 LOG.warn(XmppEndpoint.getXmppExceptionLogMessage(e));
-                getExceptionHandler().handleException(XmppEndpoint.getXmppExceptionLogMessage(e),e);

+                if (getExceptionHandler() != null) {
+                    getExceptionHandler().handleException(XmppEndpoint.getXmppExceptionLogMessage(e),
e);
+                }
                 scheduleDelayedStart();
                 return;
             }


Mime
View raw message