vyommani commented on code in PR #1156:
URL: https://github.com/apache/ranger/pull/1156#discussion_r3790864925


##########
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerResourceTrie.java:
##########
@@ -679,7 +679,7 @@ private int getMaxDepth() {
     }
 
     private Character getLookupChar(char ch) {
-        return optIgnoreCase ? Character.toLowerCase(ch) : ch;
+        return optIgnoreCase ? 
Character.toLowerCase(Character.toUpperCase(ch)) : ch;

Review Comment:
   sigle toUpperCase(ch) alone fixes this specific reported case (ı vs i), but 
not others like İ vs i, Kelvin sign vs k, or Ångström sign vs å, which still 
diverge under single toUpperCase. The double-fold 
(toLowerCase(toUpperCase(ch))) is needed to cover those too, since it matches 
equalsIgnoreCase's actual behavior rather than just this one character. Please 
run the attached java program for detail.
   
   
[FoldProof.java](https://github.com/user-attachments/files/31111770/FoldProof.java)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to