diff options
author | adrian <adrian@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2006-02-15 22:29:35 +0000 |
---|---|---|
committer | adrian <adrian@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2006-02-15 22:29:35 +0000 |
commit | 14e86c40429c91e8951c828456bff233fdc01113 (patch) | |
tree | 182a359ec5d3a71a3459ce9febeb69c1ac6ed5f1 /src/main/javassist/CtClassType.java | |
parent | 7bb1f60c5b48f2ef8c481fd00e61763bc9e02f19 (diff) | |
download | javassist-14e86c40429c91e8951c828456bff233fdc01113.tar.gz javassist-14e86c40429c91e8951c828456bff233fdc01113.zip |
Fix NPE when there are no parameter annotations.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@247 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/CtClassType.java')
-rw-r--r-- | src/main/javassist/CtClassType.java | 4 |
1 files changed, 3 insertions, 1 deletions
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(); |