From: adrian Date: Wed, 15 Feb 2006 22:29:35 +0000 (+0000) Subject: Fix NPE when there are no parameter annotations. X-Git-Tag: rel_3_17_1_ga~380 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=14e86c40429c91e8951c828456bff233fdc01113;p=javassist.git Fix NPE when there are no parameter annotations. git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@247 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- diff --git a/src/main/javassist/CtClassType.java b/src/main/javassist/CtClassType.java index dbb19340..3902a3bd 100644 --- a/src/main/javassist/CtClassType.java +++ b/src/main/javassist/CtClassType.java @@ -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();