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 dcf4bfafe25..1e5441b77f2 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.Annotation; @@ -83,8 +89,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()); } @@ -633,8 +638,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 3e9d02d5509..6096395b0c7 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.access.SharedSecrets; @@ -1280,8 +1286,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 028577c229c..734113976d4 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.access.SharedSecrets; @@ -771,8 +777,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 proxy) {