From 16e68ac1bc77548242ee37d332da9b05c14a0ef9 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Thu, 7 Dec 2023 09:32:21 -0500 Subject: [PATCH] Use instanceof Signed-off-by: Craig Perkins --- src/main/java/org/opensearch/security/user/User.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/opensearch/security/user/User.java b/src/main/java/org/opensearch/security/user/User.java index 12d916354d..6abba3d734 100644 --- a/src/main/java/org/opensearch/security/user/User.java +++ b/src/main/java/org/opensearch/security/user/User.java @@ -229,7 +229,7 @@ public final boolean equals(final Object obj) { if (obj == null) { return false; } - if (!(User.class.isAssignableFrom(getClass()) && User.class.isAssignableFrom(obj.getClass()))) { + if (!(obj instanceof User)) { return false; } final User other = (User) obj;