StringUtils::is_star_match() is too liberal

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Won't Fix
    • Priority: P4
    • tbd
    • Affects Version/s: 22
    • Component/s: hotspot

      This API was added in JDK-8287647. Its matching criteria is more liberal than the common implementations of "*" matches:

      - it is always case insensitive
      - it allows the pattern to match a subset of the target string

      Therefore, it's not possible to use this API to
      - perform case sensitive matching
      - perform a full string match

      Proposed change:

      [1] Add a parameter to select case sensitivity
      [2] The pattern should match the full string. I.e., the string "abcd" matches "*bc*" but doesn't match "bc*".

      (If substring matching is desired, you can just add "*" to the beginning and end of the pattern).

            Assignee:
            Ioi Lam
            Reporter:
            Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: