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()) {
|
if (AuditLogger.isEnabled()) {
|
||||||
AuditLogger.getNodeID(this.server);
|
AuditLogger.getNodeID(this.server);
|
||||||
}
|
}
|
||||||
return server.getNodeID().toString();
|
return server.getNodeID() == null ? null : server.getNodeID().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -542,7 +542,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getNodeID() {
|
public String getNodeID() {
|
||||||
return nodeManager.getNodeId().toString();
|
return nodeManager == null ? null : (nodeManager.getNodeId() == null ? null : nodeManager.getNodeId().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue