Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2015 ForgeRock AS.
* Portions Copyrighted 2026 3A Systems, LLC
*/

package org.forgerock.json.resource;
Expand Down Expand Up @@ -250,22 +251,12 @@ public boolean equals(final Object obj) {
return true;
} else if (obj instanceof ResourceResponseImpl) {
final ResourceResponseImpl that = (ResourceResponseImpl) obj;
return isEqual(id, that.id) && isEqual(revision, that.revision);
return Objects.equals(id, that.id) && Objects.equals(revision, that.revision);
} else {
return false;
}
}

private boolean isEqual(final String s1, final String s2) {
if (s1 == s2) {
return true;
} else if (s1 == null || s2 == null) {
return false;
} else {
return s1.equals(s2);
}
}

@Override
public int hashCode() {
final int hash = id != null ? id.hashCode() : 17;
Expand Down
Loading