JDK-8282296 : (se) Pipe.open() creates a Pipe implementation that uses Unix domain sockets (win)
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 19
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-02-23
  • Updated: 2022-03-03
  • Resolved: 2022-02-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 19
19 b12Fixed
Related Reports
Relates :  
Relates :  
Description
src/java.base/windows/classes/sun/nio/ch/PipeImpl.java

    /**
     * Creates a (TCP) Pipe implementation that supports buffering.
     */
    PipeImpl(SelectorProvider sp) throws IOException {
        this(sp, true, false);
    }

The first boolean is `preferAfUnix` - the second one is `buffering` - so this actually creates a Unix Domain pipe with no buffering.

Either the spec or the implementation should be fixed so that they both match.

Note that the only place where this constructor is used seems to be here:

src/java.base/share/classes/sun/nio/ch/SelectorProviderImpl.java:        return new PipeImpl(this);

Comments
Changeset: e540e0a8 Author: Michael McMahon <michaelm@openjdk.org> Date: 2022-02-23 20:02:11 +0000 URL: https://git.openjdk.java.net/jdk/commit/e540e0a81b923cce8b2f2689e01703509a4df1de
23-02-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7597 Date: 2022-02-23 17:37:08 +0000
23-02-2022

The two boolean parameters were mixed up in that one call site as described. It happened in the fix for JDK-8280944.
23-02-2022