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

WildcardPermission case-insensitive makes parts collections twice

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.2.4
    • Fix Version/s: 1.3.0
    • Labels:
      None
    • Environment:
      Any

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mattbishop Matt Bishop
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: