Withdrawn: 8298658: Platform-specific type leaks to platform independent code.

duke duke at openjdk.org
Tue Mar 28 20:41:42 UTC 2023


On Wed, 14 Dec 2022 13:37:32 GMT, Alfonso² Peterssen <duke at openjdk.org> wrote:

> This is not a cosmetic change, it enforces the isolation of platform-specific code from the user-facing API.
> 
> `sun.nio.fs.DefaultFileSystemProvider#instance()` has a platform-specific return type. This makes the platform-independent `java.nio.file.FileSystems.DefaultFileSystemHolder#getDefaultProvider()` have a platform-dependent call e.g. INVOKESTATIC with different signatures.
> 
> The platform-specific return types were introduced in [JDK-8213406](https://bugs.openjdk.org/browse/JDK-8213406), the common SPI type was used before. There's no reason to leak types to platform-independent code, except for tests, which could just cast.
> 
> This change is motivated by [Espresso](https://github.com/oracle/graal/tree/master/espresso), a meta-circular, spec-compliant JVM written in Java. Espresso aims to provide a custom Java IO/NIO implementation on top of any vanilla JDK as a viable alternative to the imminent removal of `SecurityManager`.

This pull request has been closed without being integrated.

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

PR: https://git.openjdk.org/jdk/pull/11674


More information about the nio-dev mailing list