[
https://issues.apache.org/jira/browse/ACCUMULO-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15076062#comment-15076062
]
ASF GitHub Bot commented on ACCUMULO-3734:
------------------------------------------
Github user joshelser commented on a diff in the pull request:
https://github.com/apache/accumulo/pull/59#discussion_r48663556
--- Diff:
core/src/test/java/org/apache/accumulo/core/security/VisibilityEvaluatorTest.java
---
@@ -113,6 +123,31 @@ public void testQuote() {
}
@Test
+ public void testUnescape() {
+ assertEquals("a\"b", VisibilityEvaluator.unescape(new
ArrayByteSequence("a\\\"b")).toString());
+ assertEquals("a\\b", VisibilityEvaluator.unescape(new
ArrayByteSequence("a\\\\b")).toString());
+ assertEquals("a\\\"b", VisibilityEvaluator.unescape(new
ArrayByteSequence("a\\\\\\\"b")).toString());
+ assertEquals("\\\"", VisibilityEvaluator.unescape(new
ArrayByteSequence("\\\\\\\"")).toString());
+ assertEquals("a\\b\\c\\d", VisibilityEvaluator.unescape(new
ArrayByteSequence("a\\\\b\\\\c\\\\d")).toString());
+
+ try {
+ VisibilityEvaluator.unescape(new ArrayByteSequence("a\\b"));
+ fail();
--- End diff --
An assertion message for the `fail()`'s would be nice.
> Possible bug in VisibilityConstraint
> ------------------------------------
>
> Key: ACCUMULO-3734
> URL: https://issues.apache.org/jira/browse/ACCUMULO-3734
> Project: Accumulo
> Issue Type: Bug
> Reporter: Keith Turner
> Assignee: Keith Turner
> Fix For: 1.6.5, 1.7.1, 1.8.0
>
>
> ACCUMULO-1681 modified which constructor from {{VisibilityEvaluator}} that
> {{VisibilityConstraint}} uses. After the modification {{escape()}} is no
> longer called (the old constructor called escape, and the new one does not).
> Not sure if this is a problem.
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)