RFR: JDK-8260966 (fs) Consolidate Linux and macOS implementations of UserDefinedFileAttributeView [v2]
Sebastian Stenzel
github.com+1204330+overheadhunter at openjdk.java.net
Mon Mar 1 13:45:42 UTC 2021
On Mon, 1 Mar 2021 12:54:34 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Sebastian Stenzel has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Restored indentation from former LinuxUserDefinedFileAttributeView and LinuxNativeDispatcher
>
> src/java.base/unix/classes/sun/nio/fs/UnixUserDefinedFileAttributeView.java line 49:
>
>> 47:
>> 48: // returns the maximum supported length of xattr names (in bytes, including namespace)
>> 49: protected abstract int maxNameLength();
>
> I think we should move this declaration to after the constructor to avoid having an abstract method declared in the middle of private API elements. I'd probably use /** .. */ style for the method description as it's not private.
Will change the comment style.
Regarding method order: I agree. However, this class needs refactoring due to code duplication and complex branching anyway, as I have proposed in my original PR. I can sure move this single method, but then it will still be "field, field, method, method, field, field, constructor, method, ..."
Having this in mind, can you confirm this should be done in _this_ PR or don't you think it'd fit into the follow-up cleanup better?
-------------
PR: https://git.openjdk.java.net/jdk/pull/2604
More information about the nio-dev
mailing list