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

Lance Andersen lancea at openjdk.java.net
Mon Sep 20 18:08:50 UTC 2021

On Mon, 20 Sep 2021 17:05:33 GMT, Severin Gehwolf <sgehwolf 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());`

Well, you can see that whether the Map is/is not empty in the jtr file for the test run (based on the DataProvider Properties for a given run).

However, per your suggestion, I tweaked the test to dump the Map values.


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

More information about the core-libs-dev mailing list