Skip to content

Commit 20bcf0e

Browse files
committed
6400876: (bf) Remove sun.nio.ByteBuffered and related obsolete code
Reviewed-by: djelinski, vyazici, alanb
1 parent c97d50d commit 20bcf0e

File tree

3 files changed

+1
-67
lines changed

3 files changed

+1
-67
lines changed

src/java.base/share/classes/jdk/internal/loader/Resource.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,6 @@
3333
import java.util.jar.Manifest;
3434
import java.nio.ByteBuffer;
3535
import java.util.Arrays;
36-
import sun.nio.ByteBuffered;
3736

3837
/**
3938
* This class is used to represent a Resource that has been loaded
@@ -130,10 +129,6 @@ public byte[] getBytes() throws IOException {
130129
* @return Resource data or null.
131130
*/
132131
public ByteBuffer getByteBuffer() throws IOException {
133-
InputStream in = cachedInputStream();
134-
if (in instanceof ByteBuffered) {
135-
return ((ByteBuffered)in).getByteBuffer();
136-
}
137132
return null;
138133
}
139134

src/java.base/share/classes/sun/nio/ByteBuffered.java

Lines changed: 0 additions & 60 deletions
This file was deleted.

test/micro/org/openjdk/bench/jdk/internal/jrtfs/ImageReaderBenchmark.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,6 @@ private static void reportMissingClassesAndFail(ColdStart state, int errors) thr
10621062
"/modules/java.base/jdk/internal/loader/URLClassPath$FileLoader.class",
10631063
"/modules/java.base/jdk/internal/loader/Resource.class",
10641064
"/modules/java.base/java/io/FileCleanable.class",
1065-
"/modules/java.base/sun/nio/ByteBuffered.class",
10661065
"/modules/java.base/java/security/SecureClassLoader$CodeSourceKey.class",
10671066
"/modules/java.base/java/security/PermissionCollection.class",
10681067
"/modules/java.base/java/security/Permissions.class",

0 commit comments

Comments
 (0)