RFR: 6400876: (bf) Remove sun.nio.ByteBuffered and releated obsolete code

Jaikiran Pai jpai at openjdk.org
Tue Oct 28 10:26:39 UTC 2025


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.

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

Commit messages:
 - 6400876: (bf) Remove sun.nio.ByteBuffered and releated obsolete code

Changes: https://git.openjdk.org/jdk/pull/28016/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28016&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-6400876
  Stats: 66 lines in 2 files changed: 0 ins; 65 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/28016.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28016/head:pull/28016

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


More information about the core-libs-dev mailing list