On Tue, 2 Aug 2022 16:18:16 GMT, Brian Burkhalter <b...@openjdk.org> 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 check for ':' at last position src/java.base/share/classes/java/nio/file/FileSystem.java line 307: > 305: * <i>syntax</i><b>:</b><i>pattern</i> > 306: * </pre></blockquote> > 307: * where <i>syntax</i> must not be empty and {@code ':'} stands for > itself. We could flesh this out a bit more with something like: "where <i>syntax</i> is the non-empty name of the syntax, <i>pattern</i> is a possibly-empty pattern string, and {@code ':'} stands for itself." ------------- PR: https://git.openjdk.org/jdk/pull/9595