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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.2.4
    • 1.2.5
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: