Skip to content

Commit

Permalink
GUACAMOLE-1239: Update case-sensitivity logic for AbstractIdentifiable
Browse files Browse the repository at this point in the history
  • Loading branch information
necouchman committed Oct 18, 2024
1 parent 2c5414a commit b26c37e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ public boolean equals(Object other) {
if (otherIdentifier == null)
return identifier == null;

// If this identifier is case-sensitive, evaluate with case-sensitivity.
if (isCaseSensitive())
// If either this identifier or the one we're comparing to is
// case-sensitive, evaluate with case-sensitivity.
if (isCaseSensitive() || ((AbstractIdentifiable) other).isCaseSensitive())
return otherIdentifier.equals(identifier);

// The identifier should not be evaluated in a case-sensitive manner.
// Both identifiers can be evaluated in a case-insensitive manner.
return otherIdentifier.equalsIgnoreCase(identifier);

}
Expand Down

0 comments on commit b26c37e

Please sign in to comment.