From: adrian Date: Wed, 15 Mar 2006 17:11:30 +0000 (+0000) Subject: We also need to keep the annotation default attribute after a prune. X-Git-Tag: rel_3_17_1_ga~370 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=42d7a2b9d57bb1aff44d1a68534727d11a992dda;p=javassist.git We also need to keep the annotation default attribute after a prune. git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@258 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- diff --git a/src/main/javassist/bytecode/MethodInfo.java b/src/main/javassist/bytecode/MethodInfo.java index 93079920..10c77be0 100644 --- a/src/main/javassist/bytecode/MethodInfo.java +++ b/src/main/javassist/bytecode/MethodInfo.java @@ -140,6 +140,11 @@ public final class MethodInfo { newAttributes.add(visibleAnnotations); } + AnnotationDefaultAttribute defaultAttribute + = (AnnotationDefaultAttribute) getAttribute(AnnotationDefaultAttribute.tag); + if (defaultAttribute != null) + newAttributes.add(defaultAttribute); + ExceptionsAttribute ea = getExceptionsAttribute(); if (ea != null) newAttributes.add(ea);