Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-234

ClassCastException in checkRoles

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.0
    • 1.2.0
    • None
    • None

    Description

      I get the following:

      java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;
      at org.apache.shiro.authz.ModularRealmAuthorizer.checkRoles(ModularRealmAuthorizer.java:426)

      In checkRoles, the collection is incorrectly cast to a String[]. The line needs to do toArray(new String[roles.size]) and not toArray().

      Attachments

        Activity

          People

            Unassigned Unassigned
            dandiep Daniel Diephouse
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: