ARTEMIS-709 Possible NPE on UUIDGenerator.getAllNetworkInterfaces()

This commit is contained in:
Martin Styk 2016-08-31 13:41:47 +02:00
parent 63172e7d36
commit d5eaccf3ba
1 changed files with 4 additions and 0 deletions

View File

@ -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());