RFR: JDK-8260966 (fs) Consolidate Linux and macOS implementations of UserDefinedFileAttributeView [v2]
Alan Bateman
alanb at openjdk.java.net
Mon Mar 1 18:21:39 UTC 2021
On Mon, 1 Mar 2021 13:42:29 GMT, Sebastian Stenzel <github.com+1204330+overheadhunter at openjdk.org> wrote:
>> 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?
If it's okay with you, then I'd prefer to do it in this PR. So let's get this PR out of the way and then discuss the refactoring in a follow-on PR.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2604
More information about the nio-dev
mailing list