Further UserDefinedFileAttributeView improvements and fixes
Alan Bateman
Alan.Bateman at oracle.com
Wed Mar 3 16:54:51 UTC 2021
On 02/03/2021 15:13, Sebastian Stenzel wrote:
> Following up on JDK-8260966, I'd like to propose two further (independent) changes:
>
> 1. Fail fast in UnixFileStore.isExtendedAttributesEnabled(UnixPath path) [1], if UnixNativeDispatcher.c is incapable of handling xattr, thus avoid unnecessary I/O.
>
> 2. Refactor UnixUserDefinedFileAttributeView.java with these goals:
> - deduplicate code
> - reduce branching and improve readability
> - fix leaking NativeBuffer by applying try-with-resource where applicable
> - fix UnsupportedOperationException if trying to read to a Buffer that doesn't provide a backing array
>
> I'd need someones assistance to create a bunch of issues for these tasks. I can provide an issue description on this mailing list, but I don't have access to the issue tracker.
>
I've created the following two issues for the above, we might want
another one to mechanically change the usages of NativeBuffer from
try-finally to try-with-resources.
https://bugs.openjdk.java.net/browse/JDK-8262957
https://bugs.openjdk.java.net/browse/JDK-8262958
Since you've contributed several changes in this area then we should see
about getting you author role so that you get access to JBS.
-Alan
More information about the nio-dev
mailing list