camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject git commit: Avoid the potential NPE.
Date Tue, 27 May 2014 12:47:25 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.13.x ea72d434d -> d62695d32


Avoid the potential NPE.


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

Branch: refs/heads/camel-2.13.x
Commit: d62695d327c4f5fd07545e30f8df47d375e6354d
Parents: ea72d43
Author: Babak Vahdat <bvahdat@apache.org>
Authored: Tue May 27 14:46:36 2014 +0200
Committer: Babak Vahdat <bvahdat@apache.org>
Committed: Tue May 27 14:47:15 2014 +0200

----------------------------------------------------------------------
 .../component/netty/SingleUDPNettyServerBootstrapFactory.java      | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d62695d3/components/camel-netty/src/main/java/org/apache/camel/component/netty/SingleUDPNettyServerBootstrapFactory.java
----------------------------------------------------------------------
diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/SingleUDPNettyServerBootstrapFactory.java
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/SingleUDPNettyServerBootstrapFactory.java
index 20faf1a..4807e1e 100644
--- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/SingleUDPNettyServerBootstrapFactory.java
+++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/SingleUDPNettyServerBootstrapFactory.java
@@ -26,6 +26,7 @@ import java.util.concurrent.ThreadFactory;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.support.ServiceSupport;
+import org.apache.camel.util.ObjectHelper;
 import org.jboss.netty.bootstrap.ConnectionlessBootstrap;
 import org.jboss.netty.channel.Channel;
 import org.jboss.netty.channel.ChannelPipelineFactory;
@@ -161,6 +162,7 @@ public class SingleUDPNettyServerBootstrapFactory extends ServiceSupport
impleme
             datagramChannel = (DatagramChannel)connectionlessBootstrap.bind(hostAddress);
             String networkInterface = configuration.getNetworkInterface() == null ? LOOPBACK_INTERFACE
: configuration.getNetworkInterface();
             multicastNetworkInterface = NetworkInterface.getByName(networkInterface);
+            ObjectHelper.notNull(multicastNetworkInterface, "No network interface found for
'" + networkInterface + "'.");
             LOG.info("ConnectionlessBootstrap joining {}:{} using network interface: {}",
new Object[]{configuration.getHost(), configuration.getPort(), multicastNetworkInterface.getName()});
             datagramChannel.joinGroup(hostAddress, multicastNetworkInterface);
             allChannels.add(datagramChannel);


Mime
View raw message