Skip to content

Commit 7cf1352

Browse files
authored
Merge pull request #21022 from JasonFengJ9/jdk25access
JDK25 removes JavaLangAccess.getCharsLatin1()/getCharsUTF16()
2 parents dadf77a + b10612c commit 7cf1352

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

jcl/src/java.base/share/classes/java/lang/Access.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ public boolean addEnableNativeAccess(ModuleLayer moduleLayer, String moduleName)
551551
return moduleLayer.addEnableNativeAccess(moduleName);
552552
}
553553

554+
/*[IF JAVA_SPEC_VERSION < 25]*/
554555
@Override
555556
public int getCharsLatin1(long i, int index, byte[] buf) {
556557
return StringLatin1.getChars(i, index, buf);
@@ -560,6 +561,7 @@ public int getCharsLatin1(long i, int index, byte[] buf) {
560561
public int getCharsUTF16(long i, int index, byte[] buf) {
561562
return StringUTF16.getChars(i, index, buf);
562563
}
564+
/*[ENDIF] JAVA_SPEC_VERSION < 25 */
563565

564566
@Override
565567
public void putCharUTF16(byte[] val, int index, int c) {

0 commit comments

Comments
 (0)