changeset 23378:b11f345e4af4

Return empty array instead of null in getDeclaredAnnotations.
author Roland Schatz <roland.schatz@oracle.com>
date Mon, 09 May 2016 11:31:54 +0200
parents 3039c53c72d3
children 24505bf61633
files jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java	Fri May 06 11:01:40 2016 -0700
+++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java	Mon May 09 11:31:54 2016 +0200
@@ -479,7 +479,7 @@
     @Override
     public Annotation[] getDeclaredAnnotations() {
         Executable javaMethod = toJava();
-        return javaMethod == null ? null : javaMethod.getDeclaredAnnotations();
+        return javaMethod == null ? new Annotation[0] : javaMethod.getDeclaredAnnotations();
     }
 
     @Override