activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-709 Possible NPE on UUIDGenerator.getAllNetworkInterfaces()
Date Wed, 31 Aug 2016 13:49:01 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 63172e7d3 -> 6690da5b8


ARTEMIS-709 Possible NPE on UUIDGenerator.getAllNetworkInterfaces()


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

Branch: refs/heads/master
Commit: d5eaccf3ba8088c9308837a2e4173320d366038c
Parents: 63172e7
Author: Martin Styk <mstyk@redhat.com>
Authored: Wed Aug 31 13:41:47 2016 +0200
Committer: Martin Styk <mstyk@redhat.com>
Committed: Wed Aug 31 13:41:47 2016 +0200

----------------------------------------------------------------------
 .../java/org/apache/activemq/artemis/utils/UUIDGenerator.java    | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d5eaccf3/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDGenerator.java
----------------------------------------------------------------------
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDGenerator.java
b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDGenerator.java
index 627fa86..111d8f0 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDGenerator.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDGenerator.java
@@ -247,6 +247,10 @@ public final class UUIDGenerator {
       try {
          networkInterfaces = NetworkInterface.getNetworkInterfaces();
 
+         if (networkInterfaces == null) {
+            return Collections.emptyList();
+         }
+
          List<NetworkInterface> ifaces = new ArrayList<>();
          while (networkInterfaces.hasMoreElements()) {
             ifaces.add(networkInterfaces.nextElement());


Mime
View raw message