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


##########
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:
   @vyommani TestRangerResourceTrieCaseFolding is a component-level unit test 
that exercises trie and matcher behavior in isolation rather than exercising 
the public API RangerBasePlugin.isAccessAllowed. It mainly covers 
getLookupChar(), Trie build/insert, traverse / branch lookup through 
getEvaluatorsForResource(). RangerDefaultResourceMatcher — isMatch() with 
ignoreCase=true and wildCard=true.
   
   I reviewed your Java code to see if I can integrate it into the existing 
test class.
   Refactored for readability. Renamed denySkip-related helpers and 
policy-engine test methods to neutral names, and updated related constants and 
assertion helpers for consistency. Updated assertion line to match the rest of 
the test and to avoid false positives: variant.getIsAllowed() defaults to false 
(see lines 96 and 83/87 of your code). Resolved Checkstyle errors.
   
   Please review the addendum patch which includes test coverage for 
angerBasePlugin.isAccessAllowed().



-- 
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