dlmarion commented on code in PR #5293:
URL: https://github.com/apache/accumulo/pull/5293#discussion_r1934525791
##########
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:
We could a constructor then that doesn't perform validation, mark it
deprecated, and in the javadoc:
1. that this constructor was added for clients that want to use
Accumulo-Access before Accumulo 4.0
2. this will be removed in 4.0
3. using this incorrectly (with an invalid column visibility) will likely
cause exceptions and no data to be returned
--
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]