Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/48128c04 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/48128c04 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/48128c04 Branch: refs/heads/master Commit: 48128c0451763f08331e02449aacc217e6ad5b34 Parents: d868e30 8b5f261 Author: Mike Drob <md...@mdrob.com> Authored: Mon Nov 11 14:48:39 2013 -0500 Committer: Mike Drob <md...@mdrob.com> Committed: Mon Nov 11 14:48:39 2013 -0500 ---------------------------------------------------------------------- .../accumulo/core/security/ColumnVisibility.java | 13 +++++++++++-- .../accumulo/core/security/ColumnVisibilityTest.java | 7 +++++++ 2 files changed, 18 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/48128c04/core/src/main/java/org/apache/accumulo/core/security/ColumnVisibility.java ---------------------------------------------------------------------- diff --cc core/src/main/java/org/apache/accumulo/core/security/ColumnVisibility.java index f9c8382,7d7daa2..bd16b84 --- a/core/src/main/java/org/apache/accumulo/core/security/ColumnVisibility.java +++ b/core/src/main/java/org/apache/accumulo/core/security/ColumnVisibility.java @@@ -50,8 -50,13 +50,13 @@@ public class ColumnVisibility } public static enum NodeType { - TERM, OR, AND, + EMPTY, TERM, OR, AND, } + + /** + * All empty nodes are equal and represent the same value. + */ - private static final Node EMPTY_NODE = new Node(NodeType.EMPTY); ++ private static final Node EMPTY_NODE = new Node(NodeType.EMPTY, 0); public static class Node { public final static List<Node> EMPTY = Collections.emptyList(); http://git-wip-us.apache.org/repos/asf/accumulo/blob/48128c04/core/src/test/java/org/apache/accumulo/core/security/ColumnVisibilityTest.java ---------------------------------------------------------------------- diff --cc core/src/test/java/org/apache/accumulo/core/security/ColumnVisibilityTest.java index 5c4ee3c,6c4e814..7a6a80d --- a/core/src/test/java/org/apache/accumulo/core/security/ColumnVisibilityTest.java +++ b/core/src/test/java/org/apache/accumulo/core/security/ColumnVisibilityTest.java @@@ -49,8 -47,15 +49,15 @@@ public class ColumnVisibilityTest new ColumnVisibility(); new ColumnVisibility(new byte[0]); } - + @Test + public void testEmptyFlatten() { + // empty visibility is valid + new ColumnVisibility().flatten(); + new ColumnVisibility("").flatten(); + } + + @Test public void testSimple() { shouldNotThrow("test", "(one)"); }