keith-turner commented on code in PR #80:
URL: https://github.com/apache/accumulo-access/pull/80#discussion_r1693252954


##########
src/main/java/org/apache/accumulo/access/BytesWrapper.java:
##########
@@ -21,12 +21,13 @@
 import static java.nio.charset.StandardCharsets.UTF_8;
 
 import java.util.Arrays;
+import java.util.Objects;
 
 final class BytesWrapper implements Comparable<BytesWrapper> {
 
-  protected byte[] data;
-  protected int offset;
-  protected int length;
+  private byte[] data;
+  private int offset;
+  private int length;

Review Comment:
   This class is not intended to be thread safe and adding a tuple would 
introduce object allocation which the code is trying to avoid.  At a higher 
level in the code these object are [cached in a 
ThreadLocal](https://github.com/apache/accumulo-access/blob/ab05908f4069620575a626c911fae514da7a48ad/src/main/java/org/apache/accumulo/access/AccessEvaluatorImpl.java#L37)
 to avoid object allocation while support thread safety.



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