ARTEMIS-2334 avoid potential NPE

This commit is contained in:
Justin Bertram 2019-05-14 09:58:37 -05:00
parent 56e33bcacf
commit 984a901d6a
2 changed files with 2 additions and 2 deletions

View File

@ -3396,7 +3396,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
if (AuditLogger.isEnabled()) {
AuditLogger.getNodeID(this.server);
}
return server.getNodeID().toString();
return server.getNodeID() == null ? null : server.getNodeID().toString();
}
@Override

View File

@ -542,7 +542,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn
@Override
public String getNodeID() {
return nodeManager.getNodeId().toString();
return nodeManager == null ? null : (nodeManager.getNodeId() == null ? null : nodeManager.getNodeId().toString());
}
@Override