From d5eaccf3ba8088c9308837a2e4173320d366038c Mon Sep 17 00:00:00 2001 From: Martin Styk Date: Wed, 31 Aug 2016 13:41:47 +0200 Subject: [PATCH] ARTEMIS-709 Possible NPE on UUIDGenerator.getAllNetworkInterfaces() --- .../java/org/apache/activemq/artemis/utils/UUIDGenerator.java | 4 ++++ 1 file changed, 4 insertions(+) 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 627fa86fae..111d8f03cc 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 ifaces = new ArrayList<>(); while (networkInterfaces.hasMoreElements()) { ifaces.add(networkInterfaces.nextElement());