accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Drob (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-1006) Add test for VisibilityParseException
Date Sun, 07 Jul 2013 16:51:48 GMT


Mike Drob commented on ACCUMULO-1006:

{{VisibilityParseException}} gets thrown in the code in three places in one method, none of
which I'm sure are actually possible. The first two times are cases where we end up with an
AND/OR node that has fewer than two children, but this is impossible to construct without
running into a BadArgumentException in {{ColumnVisibilityParser.parse_(byte[])}}. The last
case happens when the node type is not one of the types defined in the enum, which will only
happen if somebody changes the code to make it possible.

One _other_ way that this might happen is if somebody decides to extend {{ColumnVisibility}}
because it is not {{final}}, but that has wire implications that I'm not prepared to think
about yet.

If Keith is correct that VPE never gets thrown (and I think he is), then what is the intent
of this JIRA?
> Add test for VisibilityParseException
> -------------------------------------
>                 Key: ACCUMULO-1006
>                 URL:
>             Project: Accumulo
>          Issue Type: Bug
>          Components: tserver
>    Affects Versions: 1.4.2, 1.5.0
>            Reporter: Christopher Tubbs
>            Assignee: Keith Turner
>             Fix For: 1.4.4, 1.5.1, 1.6.0
> I'm not sure this exception can ever actually happen. I think ColumnVisibility throws
BadArgumentException in all the cases where the VisibilityParseException would have been thrown.
It's somewhat unfortunate that the BadArgumentException is the RuntimeException, and the checked
exception can never happen.
> We need a test to see if we can make VisibilityParseException happen when BadArgumentException
doesn't, and possibly do something about BadArgumentException, by either wrapping it with
a checked exception, or something else to reflect the fact that it's more likely to happen
than VisibilityParseException.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message