You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Korbinian Bachl (JIRA)" <ji...@apache.org> on 2011/01/17 12:00:53 UTC

[jira] Created: (SHIRO-237) nullpointer error at permission check when no permissionresolver is set

nullpointer error at permission check when no permissionresolver is set
-----------------------------------------------------------------------

                 Key: SHIRO-237
                 URL: https://issues.apache.org/jira/browse/SHIRO-237
             Project: Shiro
          Issue Type: Bug
          Components: Realms 
    Affects Versions: 1.1.0
         Environment: all
            Reporter: Korbinian Bachl
            Priority: Critical


in class AuthorizingRealm, the isPermitted( ... checks never look if the the permissionResolver are set but allways will query them in case a permission reqeust os asked for.

Solutions: 
1. catch empty/ null permissionResolver in Authorizingrealm
2. force that all derived AuthorizingRealms have a permissionResolver by making this required in the constructor
3. defaultset the current only implementation (WildcardPermissionResolver) into the getPermissionResolver method so either this one is used or it has to be overwritten

I would suggest 2. as its most clean and will fail/ force to be cared with at compiletime already.

PS: this is the issue described in my mailing to list 
http://mail-archives.apache.org/mod_mbox/shiro-user/201012.mbox/browser

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SHIRO-237) nullpointer error at permission check when no permissionresolver is set

Posted by "Kalle Korhonen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kalle Korhonen reassigned SHIRO-237:
------------------------------------

    Assignee: Kalle Korhonen

> nullpointer error at permission check when no permissionresolver is set
> -----------------------------------------------------------------------
>
>                 Key: SHIRO-237
>                 URL: https://issues.apache.org/jira/browse/SHIRO-237
>             Project: Shiro
>          Issue Type: Bug
>          Components: Realms 
>    Affects Versions: 1.1.0
>         Environment: all
>            Reporter: Korbinian Bachl
>            Assignee: Kalle Korhonen
>            Priority: Critical
>
> in class AuthorizingRealm, the isPermitted( ... checks never look if the the permissionResolver are set but allways will query them in case a permission reqeust os asked for.
> Solutions: 
> 1. catch empty/ null permissionResolver in Authorizingrealm
> 2. force that all derived AuthorizingRealms have a permissionResolver by making this required in the constructor
> 3. defaultset the current only implementation (WildcardPermissionResolver) into the getPermissionResolver method so either this one is used or it has to be overwritten
> I would suggest 2. as its most clean and will fail/ force to be cared with at compiletime already.
> PS: this is the issue described in my mailing to list 
> http://mail-archives.apache.org/mod_mbox/shiro-user/201012.mbox/browser

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SHIRO-237) nullpointer error at permission check when no permissionresolver is set

Posted by "Kalle Korhonen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kalle Korhonen resolved SHIRO-237.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.0

> nullpointer error at permission check when no permissionresolver is set
> -----------------------------------------------------------------------
>
>                 Key: SHIRO-237
>                 URL: https://issues.apache.org/jira/browse/SHIRO-237
>             Project: Shiro
>          Issue Type: Bug
>          Components: Realms 
>    Affects Versions: 1.1.0
>         Environment: all
>            Reporter: Korbinian Bachl
>            Assignee: Kalle Korhonen
>            Priority: Critical
>             Fix For: 1.2.0
>
>
> in class AuthorizingRealm, the isPermitted( ... checks never look if the the permissionResolver are set but allways will query them in case a permission reqeust os asked for.
> Solutions: 
> 1. catch empty/ null permissionResolver in Authorizingrealm
> 2. force that all derived AuthorizingRealms have a permissionResolver by making this required in the constructor
> 3. defaultset the current only implementation (WildcardPermissionResolver) into the getPermissionResolver method so either this one is used or it has to be overwritten
> I would suggest 2. as its most clean and will fail/ force to be cared with at compiletime already.
> PS: this is the issue described in my mailing to list 
> http://mail-archives.apache.org/mod_mbox/shiro-user/201012.mbox/browser

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

        

[jira] Commented: (SHIRO-237) nullpointer error at permission check when no permissionresolver is set

Posted by "Les Hazlewood (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHIRO-237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12992240#comment-12992240 ] 

Les Hazlewood commented on SHIRO-237:
-------------------------------------

I agree - #2 is the preferred solution IMO.  It will be easy to refactor the other non-default constructors to ensure that they also do the same thing as the no-arg constructor.  Thanks for pointing this out!

> nullpointer error at permission check when no permissionresolver is set
> -----------------------------------------------------------------------
>
>                 Key: SHIRO-237
>                 URL: https://issues.apache.org/jira/browse/SHIRO-237
>             Project: Shiro
>          Issue Type: Bug
>          Components: Realms 
>    Affects Versions: 1.1.0
>         Environment: all
>            Reporter: Korbinian Bachl
>            Assignee: Kalle Korhonen
>            Priority: Critical
>
> in class AuthorizingRealm, the isPermitted( ... checks never look if the the permissionResolver are set but allways will query them in case a permission reqeust os asked for.
> Solutions: 
> 1. catch empty/ null permissionResolver in Authorizingrealm
> 2. force that all derived AuthorizingRealms have a permissionResolver by making this required in the constructor
> 3. defaultset the current only implementation (WildcardPermissionResolver) into the getPermissionResolver method so either this one is used or it has to be overwritten
> I would suggest 2. as its most clean and will fail/ force to be cared with at compiletime already.
> PS: this is the issue described in my mailing to list 
> http://mail-archives.apache.org/mod_mbox/shiro-user/201012.mbox/browser

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

        

[jira] [Closed] (SHIRO-237) nullpointer error at permission check when no permissionresolver is set

Posted by "Les Hazlewood (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Les Hazlewood closed SHIRO-237.
-------------------------------


Closing with the 1.2.0 release.
                
> nullpointer error at permission check when no permissionresolver is set
> -----------------------------------------------------------------------
>
>                 Key: SHIRO-237
>                 URL: https://issues.apache.org/jira/browse/SHIRO-237
>             Project: Shiro
>          Issue Type: Bug
>          Components: Realms 
>    Affects Versions: 1.1.0
>         Environment: all
>            Reporter: Korbinian Bachl
>            Assignee: Kalle Korhonen
>            Priority: Critical
>             Fix For: 1.2.0
>
>
> in class AuthorizingRealm, the isPermitted( ... checks never look if the the permissionResolver are set but allways will query them in case a permission reqeust os asked for.
> Solutions: 
> 1. catch empty/ null permissionResolver in Authorizingrealm
> 2. force that all derived AuthorizingRealms have a permissionResolver by making this required in the constructor
> 3. defaultset the current only implementation (WildcardPermissionResolver) into the getPermissionResolver method so either this one is used or it has to be overwritten
> I would suggest 2. as its most clean and will fail/ force to be cared with at compiletime already.
> PS: this is the issue described in my mailing to list 
> http://mail-archives.apache.org/mod_mbox/shiro-user/201012.mbox/browser

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira