cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-5072) Bug in creating EnumSet in SimpleAuthorizer example
Date Sun, 16 Dec 2012 15:56:12 GMT


Aleksey Yeschenko commented on CASSANDRA-5072:

It used to return Permission.NONE which used to be a (mutable) EnumSet. In 1.2 it's an ImmutableSet,
as it should be. EnumsSet.copyOf is there to convert it back to EnumSet, since that's what
the old interface requires.

I guess we should fix it, even though Simple* examples will be dropped in 1.2.1 or 1.2.2 entirely
(were supposed to be dropped in 1.2.0 actually, which is why there wasn't much testing done
with them).
> Bug in creating EnumSet in SimpleAuthorizer example
> ---------------------------------------------------
>                 Key: CASSANDRA-5072
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.0 beta 3
>            Reporter: John Sanda
>            Priority: Minor
>              Labels: authentication
> In SimpleAuthorizer around line 47 we have,
> EnumSet<Permission> authorized = EnumSet.copyOf(Permission.NONE);
> This results in an IllegalArgumentException since Permission.NONE is an empty set. I
think it should be changed to,
> EnumSet<Permission> authorized = EnumSet.noneOf(Permission.class);

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