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

WildcardPermission calls String.trim() twice in setParts()

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.2.4
    • Fix Version/s: 1.2.5
    • Labels:
      None
    • Environment:
      any

      Description

      WildcardPermission.setParts does this:

      if (wildcardString == null || wildcardString.trim().length() == 0)

      Unknown macro: { throw new IllegalArgumentException("Wildcard string cannot be null or empty. Make sure permission strings are properly formatted."); }

      wildcardString = wildcardString.trim();

      Given the frequency of the use of this method it would be better to capture the first trim().

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: