Shiro
  1. Shiro
  2. SHIRO-234

ClassCastException in checkRoles

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.2.0
    • Component/s: None
    • Labels:
      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().

        Activity

        This list of reviews may be incomplete, as errors occurred retrieving data from the following repositories:

        • Request to https://fisheye6.atlassian.com/ failed: Error in remote call to 'FishEye 0 (https://fisheye6.atlassian.com/)' (https://fisheye6.atlassian.com) [AbstractRestCommand{path='rest-service/search-v1/reviews', params={maxReturn=50, term=SHIRO-234}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
        • Request to https://fisheye6.atlassian.com/ failed: Error in remote call to 'FishEye 0 (https://fisheye6.atlassian.com/)' (https://fisheye6.atlassian.com) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={expand=changesets[-100:-1], query=SHIRO-234}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to https://fisheye6.atlassian.com/ failed: Error in remote call to 'FishEye 0 (https://fisheye6.atlassian.com/)' (https://fisheye6.atlassian.com) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={expand=changesets[0:20].revisions[0:29],reviews, query=SHIRO-234}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        51d 21h 31m 1 Les Hazlewood 05/Mar/11 22:18
        Resolved Resolved Closed Closed
        324d 2h 53m 1 Les Hazlewood 24/Jan/12 01:11
        Les Hazlewood made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Les Hazlewood added a comment -

        Closing with the 1.2.0 release.

        Show
        Les Hazlewood added a comment - Closing with the 1.2.0 release.
        Les Hazlewood made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.2.0 [ 12315478 ]
        Resolution Fixed [ 1 ]
        Hide
        Les Hazlewood added a comment -

        Thanks for the issue!

        Show
        Les Hazlewood added a comment - Thanks for the issue!
        Dan Diephouse created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Dan Diephouse
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development