Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-60977

Unexpected error when running script using StringUtil#wildcardMatches

    Details

      Description

      Issue: Unexpected error when running script using StringUtil#wildcardMatches

      Steps to Reproduce:
      1. Go to Control Panel > Server Admin
      2. Select Groovy as the script language in the dropdown
      3. Paste below script in text box:

      out.println(com.liferay.portal.kernel.util.StringUtil.wildcardMatches("FeedItem", "*Feed", "?".charAt(0), "*".charAt(0), "//".charAt(0), true));
      

      4. Select Execute

      Expected Result: "False" is printed to the logs
      Actual Result: The below error is printed to the logs:

      ERROR [http-bio-8080-exec-9][EditServerAction:523] SanitizerLogWrapper warning: Following message contains CRLF characters
      String index out of range: 5
      Line 1: out.println(com.liferay.portal.kernel.util.StringUtil.wildcardMatches("FeedItem", "*Feed", "?".charAt(0), "*".charAt(0), "//".charAt(0), true));
      

      Tested in 6.2.x and Trunk
      Reproduced in 6.2.x and Trunk
      Reproduced in Master

      6.2.x commit 0a9700d854d235022955f521210e3fd2e36fb5c8
      master commit 029fba875b65adf018f42941d7c3b371e71180f3

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              beck.liu Beck Liu
              Reporter:
              eric.yan Eric Yan
              Participants of an Issue:
              Recent user:
              Brian Wulbern
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 7 weeks, 4 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 Alpha 4