The implementations of the getPathMatcher in the default, zipfs, and jrtfs implementations have the following code:
int pos = syntaxAndInput.indexOf(':');
if (pos <= 0 || pos == syntaxAndInput.length())
throw new IllegalArgumentException();
Checking pos == syntaxAndInput.length() is not needed here as pos is alway less than length.
First reported here:
https://mail.openjdk.org/pipermail/core-libs-dev/2022-April/088000.html
int pos = syntaxAndInput.indexOf(':');
if (pos <= 0 || pos == syntaxAndInput.length())
throw new IllegalArgumentException();
Checking pos == syntaxAndInput.length() is not needed here as pos is alway less than length.
First reported here:
https://mail.openjdk.org/pipermail/core-libs-dev/2022-April/088000.html
- csr for
-
JDK-8291730 (fs) FileSystem.getPathMatcher does not check for ":" at last index
-
- Closed
-