On Thu, 21 Jul 2022 19:58:50 GMT, Brian Burkhalter <[email protected]> wrote:
>> For a `String` āsā, `s.indexOf(int)` can never return a value `>=
>> s.length()` so change the check
>>
>> int pos = syntaxAndInput.indexOf(':');
>> if (pos <= 0 || pos == syntaxAndInput.length())
>>
>> to
>>
>> if (pos <= 0)
>
> Brian Burkhalter has updated the pull request incrementally with one
> additional commit since the last revision:
>
> 8290047: Remove IAE message in JrtFileSystem.getPathMatcher()
>
The existing code downstream of the check handles an empty glob or regex
pattern as matching the empty string.
If I read it correctly, it will now throw an exception instead of not matching.
It might be safer to not change that behavior.
-------------
PR: https://git.openjdk.org/jdk/pull/9595