shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Bishop (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SHIRO-564) WildcardPermission case-insensitive makes parts collections twice
Date Mon, 21 Mar 2016 19:11:25 GMT

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

Matt Bishop updated SHIRO-564:
------------------------------
    Description: 
WildcardPermissions have a caseSensitive flag that instructs the permission to ignore case
when comparing permissions. It's implementation of this feature is kinda wasteful because
it first parses the permission string into a Set<String> part, THEN checks the flag
and then rebuilds the part Set.

It might be faster to check the flag first, lowercase the permission string, then parse the
parts. This would save creating a whole bunch of extra LinkedHashSets.

  was:
WildcardPermissions have a caseSensitive flag that instructs the permission to ignore case
when comparing permissions. It's implementation of this feature is kinda wasteful because
it first parses the permission string into a Set<String> part, THEN checks the flag
and then rebuilds the part Set.

It might be faster to check the flag first, lowercase the permission string, then parse the
parts. This would save creating a whole bunch of extra HashSets.


> WildcardPermission case-insensitive makes parts collections twice
> -----------------------------------------------------------------
>
>                 Key: SHIRO-564
>                 URL: https://issues.apache.org/jira/browse/SHIRO-564
>             Project: Shiro
>          Issue Type: Improvement
>          Components: Authorization (access control) 
>    Affects Versions: 1.2.4
>         Environment: Any
>            Reporter: Matt Bishop
>            Priority: Trivial
>
> WildcardPermissions have a caseSensitive flag that instructs the permission to ignore
case when comparing permissions. It's implementation of this feature is kinda wasteful because
it first parses the permission string into a Set<String> part, THEN checks the flag
and then rebuilds the part Set.
> It might be faster to check the flag first, lowercase the permission string, then parse
the parts. This would save creating a whole bunch of extra LinkedHashSets.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message