mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-1239: Update case-sensitivity logic for AbstractIdentifiable
This commit is contained in:
@@ -73,11 +73,12 @@ public abstract class AbstractIdentifiable implements Identifiable {
|
||||
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);
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user