--- old/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java 2019-05-31 08:53:45.000000000 -0700 +++ new/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java 2019-05-31 08:53:45.000000000 -0700 @@ -507,7 +507,7 @@ @Override public Annotation[][] getParameterAnnotations() { - if ((getConstMethodFlags() & config().constMethodHasParameterAnnotations) == 0) { + if ((getConstMethodFlags() & config().constMethodHasParameterAnnotations) == 0 || isClassInitializer()) { return new Annotation[signature.getParameterCount(false)][0]; } return runtime().reflection.getParameterAnnotations(this); @@ -515,7 +515,7 @@ @Override public Annotation[] getAnnotations() { - if ((getConstMethodFlags() & config().constMethodHasMethodAnnotations) == 0) { + if ((getConstMethodFlags() & config().constMethodHasMethodAnnotations) == 0 || isClassInitializer()) { return new Annotation[0]; } return runtime().reflection.getMethodAnnotations(this); @@ -523,7 +523,7 @@ @Override public Annotation[] getDeclaredAnnotations() { - if ((getConstMethodFlags() & config().constMethodHasMethodAnnotations) == 0) { + if ((getConstMethodFlags() & config().constMethodHasMethodAnnotations) == 0 || isClassInitializer()) { return new Annotation[0]; } return runtime().reflection.getMethodDeclaredAnnotations(this); @@ -531,7 +531,7 @@ @Override public T getAnnotation(Class annotationClass) { - if ((getConstMethodFlags() & config().constMethodHasMethodAnnotations) == 0) { + if ((getConstMethodFlags() & config().constMethodHasMethodAnnotations) == 0 || isClassInitializer()) { return null; } return runtime().reflection.getMethodAnnotation(this, annotationClass);