Mercurial > hg > graal-jvmci-8
diff jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java @ 23382:c9915c22a5a9
Make all get[Declared]Annotation methods look the same.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Tue, 10 May 2016 11:17:23 +0200 |
parents | b11f345e4af4 |
children | a920338dd4d4 |
line wrap: on
line diff
--- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java Mon May 09 09:37:36 2016 -0700 +++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java Tue May 10 11:17:23 2016 +0200 @@ -473,13 +473,19 @@ @Override public Annotation[] getAnnotations() { Executable javaMethod = toJava(); - return javaMethod == null ? new Annotation[0] : javaMethod.getAnnotations(); + if (javaMethod != null) { + return javaMethod.getAnnotations(); + } + return new Annotation[0]; } @Override public Annotation[] getDeclaredAnnotations() { Executable javaMethod = toJava(); - return javaMethod == null ? new Annotation[0] : javaMethod.getDeclaredAnnotations(); + if (javaMethod != null) { + return javaMethod.getDeclaredAnnotations(); + } + return new Annotation[0]; } @Override