dlmarion commented on code in PR #5293:
URL: https://github.com/apache/accumulo/pull/5293#discussion_r1934309982
##########
core/src/main/java/org/apache/accumulo/core/security/ColumnVisibility.java:
##########
@@ -505,6 +524,31 @@ public ColumnVisibility(byte[] expression) {
validate(expression);
}
+ /**
+ * Creates a column visibility for a Mutation from an AccessExpression.
+ *
+ * @param expression visibility expression, encoded as UTF-8 bytes
+ * @see #ColumnVisibility(String)
+ * @since 2.1.4
+ */
+ public ColumnVisibility(AccessExpression expression) {
+ // AccessExpression is a validated immutable object, so no need to re
validate
+ this.expression = expression.getExpression().getBytes(UTF_8);
Review Comment:
Is this just an optimization, or does calling `validate` cause an issue? A
client could use AccessExpression's and then create a ColumnVisibilty using the
byte[] constructor.
--
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]