ARTEMIS-2334 avoid potential NPE
This commit is contained in:
parent
56e33bcacf
commit
984a901d6a
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue