Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-5072

Bug in creating EnumSet in SimpleAuthorizer example

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.2.0 rc2
    • None
    • Low

    Description

      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);

      Attachments

        1. 5072.txt
          2 kB
          Aleksey Yeschenko

        Activity

          People

            aleksey Aleksey Yeschenko
            jsanda John Sanda
            Aleksey Yeschenko
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: