On Tue, 28 Oct 2025 10:18:57 GMT, Jaikiran Pai <[email protected]> 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 cleanup! [This line](https://github.com/openjdk/jdk/blob/9625993611bb6acf84d428bea4a65d33b9d66e5f/test/micro/org/openjdk/bench/jdk/internal/jrtfs/ImageReaderBenchmark.java#L1065) should probably be removed. src/java.base/share/classes/jdk/internal/loader/Resource.java line 133: > 131: */ > 132: public ByteBuffer getByteBuffer() throws IOException { > 133: InputStream in = cachedInputStream(); The method documentation could use a cleanup as well. ------------- PR Review: https://git.openjdk.org/jdk/pull/28016#pullrequestreview-3387970929 PR Review Comment: https://git.openjdk.org/jdk/pull/28016#discussion_r2468960413
