RFR: 8299835: (jrtfs) Unnecessary null check in JrtPath.getAttributes [v2]

Andrey Turbanov aturbanov at openjdk.org
Tue Jan 10 09:14:11 UTC 2023


> `jdk.internal.jrtfs.JrtFileSystem#getFileAttributes` never return `null`
> 
> https://github.com/openjdk/jdk/blob/679e485838881c1364845072af305fb60d95e60a/src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystem.java#L206-L213
> So, no need to check for `null` its result.
> Seems it was copied from ZipPath (name of variable suggests that) - https://github.com/openjdk/jdk/blob/master/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipPath.java#L769. But for ZipFileSystem `null` is expected.

Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision:

  8299835: (jrtfs) Unnecessary null check in JrtPath.getAttributes
  
  update copyright year

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/11911/files
  - new: https://git.openjdk.org/jdk/pull/11911/files/6237726d..74068b94

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=11911&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11911&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/11911.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11911/head:pull/11911

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


More information about the core-libs-dev mailing list