RFR: 8273935: (zipfs) Files.getFileAttributeView() throws UOE instead of returning null when view not supported

Severin Gehwolf sgehwolf at openjdk.java.net
Mon Sep 20 17:08:54 UTC 2021


On Sun, 19 Sep 2021 15:34:44 GMT, Lance Andersen <lancea at openjdk.org> wrote:

> Hi all,
> 
> Please review this patch which addresses the issue where Zip FS will throw a UOE instead of returning null  when  Files.getFileAttributeView() is invoked and  the view not supported.
> 
> Mach5 tiers1 - tier3 are clean.
> 
> Best
> Lance

test/jdk/jdk/nio/zipfs/testng/test/PosixAttributeViewTest.java line 100:

> 98:             PosixFileAttributeView view = Files.getFileAttributeView(entry,
> 99:                     PosixFileAttributeView.class);
> 100:             System.out.printf("View returned: %s%n", view);

It might be useful to also print whether the environment is empty:
Suggestion: `System.out.printf("View returned: %s, (empty_env=%s)%n", view, env.isEmpty());`

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

PR: https://git.openjdk.java.net/jdk/pull/5579


More information about the nio-dev mailing list