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).
- 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).
- relates to
-
JDK-8287647 VM debug support: find node by pattern in name or dump
- Resolved