From 8c92f2c4132b7e12e686e90ed06256f62b088d62 Mon Sep 17 00:00:00 2001 From: Tigran Mkrtchyan Date: Tue, 29 Aug 2023 10:35:50 +0200 Subject: [PATCH] common: fix NPE in AbstractUidPrincipal#equals fixes commit 410762eb55 Fixes: #7325 Acked-by: Paul Millar acked-by: Albert Rossi Target: master Require-book: no Require-notes: no --- .../src/main/java/org/dcache/auth/AbstractUidPrincipal.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/common/src/main/java/org/dcache/auth/AbstractUidPrincipal.java b/modules/common/src/main/java/org/dcache/auth/AbstractUidPrincipal.java index 33a7279de98..7d4d78b87c9 100644 --- a/modules/common/src/main/java/org/dcache/auth/AbstractUidPrincipal.java +++ b/modules/common/src/main/java/org/dcache/auth/AbstractUidPrincipal.java @@ -101,6 +101,11 @@ public boolean equals(Object other) { if (this == other) { return true; } + + if (other == null) { + return false; + } + if (!(this.getClass().equals(other.getClass()))) { return false; }