From 03944658109fedee06decddde63e1e5269f43cbe Mon Sep 17 00:00:00 2001 From: chiba Date: Mon, 29 May 2006 09:34:15 +0000 Subject: [PATCH] fixed JIRA JASSIST-19. git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@276 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- src/main/javassist/CtBehavior.java | 6 +++--- src/main/javassist/CtClassType.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/javassist/CtBehavior.java b/src/main/javassist/CtBehavior.java index 5eaa1e58..10dda556 100644 --- a/src/main/javassist/CtBehavior.java +++ b/src/main/javassist/CtBehavior.java @@ -166,7 +166,7 @@ public abstract class CtBehavior extends CtMember { ParameterAnnotationsAttribute ainfo2 = (ParameterAnnotationsAttribute) mi.getAttribute(ParameterAnnotationsAttribute.visibleTag); return CtClassType.toAnnotationType(getDeclaringClass().getClassPool(), - ainfo, ainfo2); + ainfo, ainfo2, mi); } /** @@ -324,7 +324,7 @@ public abstract class CtBehavior extends CtMember { * method returns null. * *

Note that an attribute is a data block specified by - * the class file format. + * the class file format. It is not an annotation. * See {@link javassist.bytecode.AttributeInfo}. * * @param name attribute name @@ -341,7 +341,7 @@ public abstract class CtBehavior extends CtMember { * Adds an attribute. The attribute is saved in the class file. * *

Note that an attribute is a data block specified by - * the class file format. + * the class file format. It is not an annotation. * See {@link javassist.bytecode.AttributeInfo}. * * @param name attribute name diff --git a/src/main/javassist/CtClassType.java b/src/main/javassist/CtClassType.java index ed3d9051..372e2b22 100644 --- a/src/main/javassist/CtClassType.java +++ b/src/main/javassist/CtClassType.java @@ -447,7 +447,7 @@ class CtClassType extends CtClass { } static Object[][] toAnnotationType(ClassPool cp, ParameterAnnotationsAttribute a1, - ParameterAnnotationsAttribute a2) + ParameterAnnotationsAttribute a2, MethodInfo minfo) throws ClassNotFoundException { int numParameters = 0; @@ -456,7 +456,7 @@ class CtClassType extends CtClass { else if (a2 != null) numParameters = a2.numParameters(); else - return new Object[0][]; + numParameters = Descriptor.numOfParameters(minfo.getDescriptor()); Object[][] result = new Object[numParameters][]; for (int i = 0; i < numParameters; i++) { -- 2.39.5