kishorgollapalliwar commented on code in PR #768:
URL: https://github.com/apache/ranger/pull/768#discussion_r2619615818


##########
agents-common/src/test/java/org/apache/ranger/plugin/resourcematcher/RangerDefaultResourceMatcherTest.java:
##########
@@ -128,8 +128,8 @@ public void testIsMatch() {
 
             MatcherWrapper matcher = new MatcherWrapper(policyValue, excludes);
 
-            assertEquals(getMessage(row), matchType, 
matcher.getMatchType(resource, matchScope, evalContext));
-            assertEquals(getMessage(row), result, matcher.isMatch(resource, 
matchScope, evalContext));
+            assertEquals(matchType, matcher.getMatchType(resource, matchScope, 
evalContext), () -> getMessage(row));
+            assertEquals(result, matcher.isMatch(resource, matchScope, 
evalContext), () -> getMessage(row));

Review Comment:
   Can we avoid these (line 131 & 132) anonymous functions calls?
   Eg,
    assertEquals(matchType, matcher.getMatchType(resource, matchScope, 
evalContext), getMessage(row));



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