< prev index next >

src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/SharedLibraryJVMCIReflection.java

Print this page

        

@@ -138,12 +138,11 @@
         throw new InternalError("missing substitution: " + className + " " + methodName);
     }
 
     @Override
     Annotation[] getAnnotations(HotSpotResolvedObjectTypeImpl holder) {
-        Annotation[] annotations = getClassAnnotations(holder.getName());
-        return annotations == null ? new Annotation[0] : annotations;
+        return getClassAnnotations(holder.getName());
     }
 
     @Override
     Annotation[] getDeclaredAnnotations(HotSpotResolvedObjectTypeImpl holder) {
         throw new HotSpotJVMCIUnsupportedOperationError("unimplemented");

@@ -154,15 +153,11 @@
         throw new HotSpotJVMCIUnsupportedOperationError("unimplemented");
     }
 
     @Override
     Annotation[][] getParameterAnnotations(HotSpotResolvedJavaMethodImpl javaMethod) {
-        Annotation[][] annotations = getParameterAnnotations(javaMethod.getDeclaringClass().getName(), javaMethod.getName());
-        if (annotations == null) {
-            return new Annotation[javaMethod.signature.getParameterCount(false)][0];
-        }
-        return annotations;
+        return getParameterAnnotations(javaMethod.getDeclaringClass().getName(), javaMethod.getName());
     }
 
     @Override
     Type[] getGenericParameterTypes(HotSpotResolvedJavaMethodImpl javaMethod) {
         throw new HotSpotJVMCIUnsupportedOperationError("unimplemented");

@@ -173,12 +168,11 @@
         throw new HotSpotJVMCIUnsupportedOperationError("unimplemented");
     }
 
     @Override
     Annotation[] getMethodAnnotations(HotSpotResolvedJavaMethodImpl javaMethod) {
-        Annotation[] annotations = getMethodAnnotationsInternal(javaMethod);
-        return annotations == null ? new Annotation[0] : annotations;
+        return getMethodAnnotationsInternal(javaMethod);
     }
 
     @Override
     <T extends Annotation> T getMethodAnnotation(HotSpotResolvedJavaMethodImpl javaMethod, Class<T> annotationClass) {
         Annotation[] methodAnnotations = getMethodAnnotations(javaMethod);
< prev index next >