keith-turner commented on code in PR #27:
URL: https://github.com/apache/accumulo-access/pull/27#discussion_r1372320673
##########
src/main/java/org/apache/accumulo/access/AccessEvaluatorImpl.java:
##########
@@ -32,6 +32,8 @@
//this class is intentionally package private and should never be made public
class AccessEvaluatorImpl implements AccessEvaluator {
private final Collection<Predicate<BytesWrapper>> authorizedPredicates;
+ private final static Predicate<Byte> IS_QUOTE_OR_SLASH =
+ value1 -> value1 == '"' || value1 == '\\';
Review Comment:
This predicate use the non primitive type Byte, so it may be creating
objects which would not be performant compared to the primitive type byte. I
think pulling this out is nice, could use a static function instead of
`Predicate<Byte>` byte and call it.
```suggestion
private static boolean isQuoteOrSlash(byte b) {
return b == '"' || b == '\\';
}
```
--
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]