JDK-8312618 : StringUtils::is_star_match() is too liberal
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 22
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2023-07-24
  • Updated: 2025-01-10
  • Resolved: 2025-01-10
Related Reports
Relates :  
Description
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).


Comments
Runtime Triage: This is not on our current list of priorities. We will consider this feature if we receive additional customer requirements.
10-01-2025