[grid] Adding a NPE check
[skip ci]
@@ -157,12 +157,17 @@ private LocalNode(
.expireAfterAccess(sessionTimeout)
.ticker(ticker)
.removalListener((RemovalListener<SessionId, SessionSlot>) notification -> {
+ if (notification.getKey() != null && notification.getValue() != null) {
// Attempt to stop the session
- LOG.log(Debug.getDebugLogLevel(), "Stopping session {0}", notification.getKey().toString());
+ LOG.log(Debug.getDebugLogLevel(), "Stopping session {0}",
+ notification.getKey().toString());
SessionSlot slot = notification.getValue();
if (!slot.isAvailable()) {
slot.stop();
}
+ } else {
+ LOG.log(Debug.getDebugLogLevel(), "Received stop session notification with null values");
+ }
})
.build();
