Skip to content

Commit

Permalink
Use instanceof
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Dec 7, 2023
1 parent 22e5177 commit 16e68ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/opensearch/security/user/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 16e68ac

Please sign in to comment.