You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Les Hazlewood (JIRA)" <ji...@apache.org> on 2011/03/05 23:19:45 UTC

[jira] Resolved: (SHIRO-234) ClassCastException in checkRoles

     [ https://issues.apache.org/jira/browse/SHIRO-234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Les Hazlewood resolved SHIRO-234.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.0

Thanks for the issue!

> ClassCastException in checkRoles
> --------------------------------
>
>                 Key: SHIRO-234
>                 URL: https://issues.apache.org/jira/browse/SHIRO-234
>             Project: Shiro
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>            Reporter: Dan Diephouse
>             Fix For: 1.2.0
>
>
> 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().

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira