Integrated: 8290047: (fs) FileSystem.getPathMatcher does not check for ":" at last index
Brian Burkhalter
bpb at openjdk.org
Tue Aug 9 17:09:37 UTC 2022
On Thu, 21 Jul 2022 15:29:10 GMT, Brian Burkhalter <bpb at 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)
This pull request has now been integrated.
Changeset: 4040927d
Author: Brian Burkhalter <bpb at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/4040927d1750dd00611cc6465507dd0bc694a18f
Stats: 52 lines in 8 files changed: 37 ins; 0 del; 15 mod
8290047: (fs) FileSystem.getPathMatcher does not check for ":" at last index
Reviewed-by: naoto, rriggs, alanb, lancea
-------------
PR: https://git.openjdk.org/jdk/pull/9595
More information about the core-libs-dev
mailing list