RFR: 8290047: (fs) FileSystem.getPathMatcher does not check for ":" at last index [v6]

Brian Burkhalter bpb at openjdk.org
Tue Aug 2 21:53:01 UTC 2022


> 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: Update overlooked jtrfs and zipfs tests

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/9595/files
  - new: https://git.openjdk.org/jdk/pull/9595/files/b9de2604..b0eab55f

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=9595&range=05
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9595&range=04-05

  Stats: 6 lines in 2 files changed: 3 ins; 2 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/9595.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9595/head:pull/9595

PR: https://git.openjdk.org/jdk/pull/9595


More information about the core-libs-dev mailing list