RFR: 6400876: (bf) Remove sun.nio.ByteBuffered and releated obsolete code
Volkan Yazici
vyazici at openjdk.org
Tue Oct 28 10:54:02 UTC 2025
On Tue, 28 Oct 2025 10:18:57 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
> Can I please get a review of this change which removes an obsolete internal interface?
>
> The `sun.nio.ByteBuffered` interface is internal to the java.base module and does not have any implementations in the JDK. The only place where we use this is in `jdk.internal.loader.Resource` (another internal class within java.base). The usage itself is a mere `instanceof` check against the `InputStream` corresponding to that `Resource`. Given that there are no implementations of this interface, that check is redundant.
>
> tier testing is currently in progress with this change, and given the nature of this change, no new tests have been introduced.
Nice clean up!
Agreed with @djelinski that `Resource` docs could use a cleanup as well. Personally, I'd expect an empty `git grep ByteBuffered` output.
Spotted another usage:
https://github.com/openjdk/jdk/blob/9625993611bb6acf84d428bea4a65d33b9d66e5f/test/micro/org/openjdk/bench/jdk/internal/jrtfs/ImageReaderBenchmark.java#L1065
-------------
PR Review: https://git.openjdk.org/jdk/pull/28016#pullrequestreview-3388061046
More information about the core-libs-dev
mailing list