diff --git a/src/java.base/share/classes/java/lang/reflect/Executable.java b/src/java.base/share/classes/java/lang/reflect/Executable.java index 8196a3a299d..6cb28fa1b09 100644 --- a/src/java.base/share/classes/java/lang/reflect/Executable.java +++ b/src/java.base/share/classes/java/lang/reflect/Executable.java @@ -23,6 +23,12 @@ * questions. */ +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2023, 2023 All Rights Reserved + * =========================================================================== + */ + package java.lang.reflect; import java.lang.annotation.*; @@ -77,8 +83,7 @@ boolean equalParamTypes(Class[] params1, Class[] params2) { Annotation[][] parseParameterAnnotations(byte[] parameterAnnotations) { return AnnotationParser.parseParameterAnnotations( parameterAnnotations, - SharedSecrets.getJavaLangAccess(). - getConstantPool(getDeclaringClass()), + com.ibm.oti.vm.VM.getConstantPoolFromAnnotationBytes(getDeclaringClass(), parameterAnnotations), getDeclaringClass()); } @@ -603,8 +608,7 @@ private Map, Annotation> declaredAnnotations() { } else { declAnnos = AnnotationParser.parseAnnotations( getAnnotationBytes(), - SharedSecrets.getJavaLangAccess(). - getConstantPool(getDeclaringClass()), + com.ibm.oti.vm.VM.getConstantPoolFromAnnotationBytes(getDeclaringClass(), getAnnotationBytes()), getDeclaringClass() ); } diff --git a/src/java.base/share/classes/java/lang/reflect/Field.java b/src/java.base/share/classes/java/lang/reflect/Field.java index 599a06ce75b..736bba29cea 100644 --- a/src/java.base/share/classes/java/lang/reflect/Field.java +++ b/src/java.base/share/classes/java/lang/reflect/Field.java @@ -23,6 +23,12 @@ * questions. */ +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2023, 2023 All Rights Reserved + * =========================================================================== + */ + package java.lang.reflect; import jdk.internal.misc.SharedSecrets; @@ -1174,8 +1180,7 @@ private Map, Annotation> declaredAnnotations() { } else { declAnnos = AnnotationParser.parseAnnotations( annotations, - SharedSecrets.getJavaLangAccess() - .getConstantPool(getDeclaringClass()), + com.ibm.oti.vm.VM.getConstantPoolFromAnnotationBytes(getDeclaringClass(), annotations), getDeclaringClass()); } declaredAnnotations = declAnnos; diff --git a/src/java.base/share/classes/java/lang/reflect/Method.java b/src/java.base/share/classes/java/lang/reflect/Method.java index ec35fe09643..c1d449e73dc 100644 --- a/src/java.base/share/classes/java/lang/reflect/Method.java +++ b/src/java.base/share/classes/java/lang/reflect/Method.java @@ -23,6 +23,12 @@ * questions. */ +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2023, 2023 All Rights Reserved + * =========================================================================== + */ + package java.lang.reflect; import jdk.internal.HotSpotIntrinsicCandidate; @@ -673,8 +679,7 @@ public Object getDefaultValue() { getReturnType()); Object result = AnnotationParser.parseMemberValue( memberType, ByteBuffer.wrap(annotationDefault), - SharedSecrets.getJavaLangAccess(). - getConstantPool(getDeclaringClass()), + com.ibm.oti.vm.VM.getConstantPoolFromAnnotationBytes(getDeclaringClass(), annotationDefault), getDeclaringClass()); if (result instanceof ExceptionProxy) { if (result instanceof TypeNotPresentExceptionProxy) {