Repository: qpid-jms
Updated Branches:
  refs/heads/master dda95f589 -> 84045ed6d


Fix some issues in this module reported by findbugs

Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/84045ed6
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/84045ed6
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/84045ed6

Branch: refs/heads/master
Commit: 84045ed6d76bd434369cd8822dc7823934ecc7d8
Parents: dda95f5
Author: Timothy Bish <tabish...@gmail.com>
Authored: Thu Oct 2 18:44:50 2014 -0400
Committer: Timothy Bish <tabish...@gmail.com>
Committed: Thu Oct 2 18:44:50 2014 -0400

----------------------------------------------------------------------
 .../discovery/multicast/MulticastDiscoveryAgent.java         | 8 ++++++--
 .../provider/discovery/multicast/PacketParserFactory.java    | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/84045ed6/qpid-jms-discovery/src/main/java/org/apache/qpid/jms/provider/discovery/multicast/MulticastDiscoveryAgent.java
----------------------------------------------------------------------
diff --git 
a/qpid-jms-discovery/src/main/java/org/apache/qpid/jms/provider/discovery/multicast/MulticastDiscoveryAgent.java
 
b/qpid-jms-discovery/src/main/java/org/apache/qpid/jms/provider/discovery/multicast/MulticastDiscoveryAgent.java
index b2daca2..96c23cc 100644
--- 
a/qpid-jms-discovery/src/main/java/org/apache/qpid/jms/provider/discovery/multicast/MulticastDiscoveryAgent.java
+++ 
b/qpid-jms-discovery/src/main/java/org/apache/qpid/jms/provider/discovery/multicast/MulticastDiscoveryAgent.java
@@ -102,6 +102,10 @@ public class MulticastDiscoveryAgent implements 
DiscoveryAgent, Runnable {
                 } catch (URISyntaxException e) {
                     // Default is always valid.
                 }
+
+                if (discoveryURI == null) {
+                    throw new RuntimeException("Discovery URI unexpectedly 
null");
+                }
             }
 
             LOG.trace("mcast - discoveryURI = {}", discoveryURI);
@@ -109,7 +113,7 @@ public class MulticastDiscoveryAgent implements 
DiscoveryAgent, Runnable {
             String myHost = discoveryURI.getHost();
             int myPort = discoveryURI.getPort();
 
-            if (DEFAULT_HOST_STR.equals(myHost)) {
+            if (myHost == null || DEFAULT_HOST_STR.equals(myHost)) {
                 myHost = DEFAULT_HOST_IP;
             }
 
@@ -364,7 +368,7 @@ public class MulticastDiscoveryAgent implements 
DiscoveryAgent, Runnable {
 
     // ---------- Discovered Peer Bookkeeping Class 
---------------------------//
 
-    private class RemoteBrokerData extends DiscoveryEvent {
+    private static class RemoteBrokerData extends DiscoveryEvent {
 
         long lastHeartBeat;
 

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/84045ed6/qpid-jms-discovery/src/main/java/org/apache/qpid/jms/provider/discovery/multicast/PacketParserFactory.java
----------------------------------------------------------------------
diff --git 
a/qpid-jms-discovery/src/main/java/org/apache/qpid/jms/provider/discovery/multicast/PacketParserFactory.java
 
b/qpid-jms-discovery/src/main/java/org/apache/qpid/jms/provider/discovery/multicast/PacketParserFactory.java
index c69b78d..b3d17f9 100644
--- 
a/qpid-jms-discovery/src/main/java/org/apache/qpid/jms/provider/discovery/multicast/PacketParserFactory.java
+++ 
b/qpid-jms-discovery/src/main/java/org/apache/qpid/jms/provider/discovery/multicast/PacketParserFactory.java
@@ -93,7 +93,7 @@ public abstract class PacketParserFactory {
      */
     protected static PacketParserFactory findAgentFactory(String key) throws 
IOException {
         if (key == null) {
-            throw new IOException("No PacketParserFactory name specified: [" + 
key + "]");
+            throw new IOException("No PacketParserFactory name specified: 
[null]");
         }
 
         PacketParserFactory factory = null;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to