]> source.dussan.org Git - javassist.git/commitdiff
Fix NPE when there are no parameter annotations.
authoradrian <adrian@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Wed, 15 Feb 2006 22:29:35 +0000 (22:29 +0000)
committeradrian <adrian@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Wed, 15 Feb 2006 22:29:35 +0000 (22:29 +0000)
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@247 30ef5769-5b8d-40dd-aea6-55b5d6557bb3

src/main/javassist/CtClassType.java

index dbb19340746402b6250aca4d34e4b6cfd9ef2430..3902a3bd86a52448218a597f0489eb0413fdd26c 100644 (file)
@@ -426,8 +426,10 @@ class CtClassType extends CtClass {
         int numParameters = 0;
         if (a1 != null) 
             numParameters = a1.numParameters();
-        else
+        else if (a2 != null)
             numParameters = a2.numParameters();
+        else
+           return new Object[0][];
 
         Object[][] result = new Object[numParameters][];
         ClassLoader cl = Thread.currentThread().getContextClassLoader();