dlmarion commented on code in PR #5217: URL: https://github.com/apache/accumulo/pull/5217#discussion_r1935548097
########## core/src/main/java/org/apache/accumulo/core/security/ColumnVisibility.java: ########## @@ -505,6 +523,19 @@ public ColumnVisibility(byte[] expression) { validate(expression); } + /** + * Creates a new column visibility by performing a deep copy of an existing column visibility + * object + * + * @param visibility ColumnVisibility object + * @since 2.1.4 + */ + public ColumnVisibility(ColumnVisibility visibility) { + byte[] incomingExpression = visibility.expression; + this.expression = Arrays.copyOf(incomingExpression, incomingExpression.length); + this.node = new Node(visibility.node); Review Comment: I made a comment in #5293 that is applicable here also. I think it's possible that another thread could be mutating the parse tree (visibility.node) while this thread is trying to make a copy of the ColumnVisibility because the parse tree is accessible and mutable. -- 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: notifications-unsubscr...@accumulo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org