Further UserDefinedFileAttributeView improvements and fixes
Sebastian Stenzel
sebastian.stenzel at gmail.com
Wed Mar 10 16:42:08 UTC 2021
> On 3. Mar 2021, at 17:54, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>
> 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
I started working on JDK-8262958 as well, now. Since it will contain multiple changes that build upon each other, I want to ask how to deal with it.
My suggestion: I keep this PR a draft for now and have you review each change for itself. Or does it _need_ to be marked RFR to spit out individual webrevs?
https://github.com/openjdk/jdk/pull/2916
More information about the nio-dev
mailing list