JDK-8312618 : StringUtils::is_star_match() is too liberal
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 22
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-07-24
  • Updated: 2024-01-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
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).