RFR: JDK-8262957 (fs) Fail fast in UnixFileStore.isExtendedAttributesEnabled

Sebastian Stenzel github.com+1204330+overheadhunter at openjdk.java.net
Wed Mar 24 08:39:38 UTC 2021


On Fri, 5 Mar 2021 06:51:29 GMT, Sebastian Stenzel <github.com+1204330+overheadhunter at openjdk.org> wrote:

>> It's somewhat subjective. What you have is fine, I just would have done is differently to avoid too many return paths.
>> 
>> I think we should clean up the close(-1) case while we are in the area, separate PR of course.
>
> All right, will you create another bug report for the `close(-1)` issue?

I just wanted to create another issue, but then I noticed that `close(-1)` is allowed as per contract: https://github.com/openjdk/jdk/blob/45e1bab87ccebd498d4f927a008dd89a47dd177b/src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java#L90-L97

We can still change this, of course, but I wouldn't consider this a necessary change for this PR and would therefore suggest to deal with this another time.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2816


More information about the nio-dev mailing list