RFR: 8246592: Simplify checking of boolean file attributes
Claes Redestad
claes.redestad at oracle.com
Thu Jun 4 12:58:50 UTC 2020
Hi,
this patch proposes adding a FileSystem.getBooleanAttribute convenience
method, which simplifies code at use sites. This also enables
improvements when not requesting an attribute that requires extra work,
such as getting the hidden bit on unix derivatives.
Bug: https://bugs.openjdk.java.net/browse/JDK-8246592
Webrev: http://cr.openjdk.java.net/~redestad/8246592/open.00/
Testing: tier1-2
Micro results on Linux:
Benchmark Mode Cnt Score Error Units
FileOpen.booleanAttributes avgt 10 1.868 ± 0.002 us/op
Benchmark Mode Cnt Score Error Units
FileOpen.booleanAttributes avgt 10 0.938 ± 0.008 us/op
Thanks!
/Claes
More information about the core-libs-dev
mailing list