From 1663f10c67920394f6cc42d723d99326c0801b9d Mon Sep 17 00:00:00 2001 From: chibash Date: Thu, 11 Sep 2014 01:03:51 +0900 Subject: [PATCH] fixed a bug of accesses to annotation arguments (cont.). did minor refactoring. --- .../bytecode/SignatureAttribute.java | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/main/javassist/bytecode/SignatureAttribute.java b/src/main/javassist/bytecode/SignatureAttribute.java index 0e05f24e..1e148085 100644 --- a/src/main/javassist/bytecode/SignatureAttribute.java +++ b/src/main/javassist/bytecode/SignatureAttribute.java @@ -736,6 +736,10 @@ public class SignatureAttribute extends AttributeInfo { if (parent != null) sbuf.append(parent.toString()).append('.'); + return toString2(sbuf); + } + + private String toString2(StringBuffer sbuf) { sbuf.append(name); if (arguments != null) { sbuf.append('<'); @@ -764,21 +768,7 @@ public class SignatureAttribute extends AttributeInfo { if (parent != null) sbuf.append(parent.jvmTypeName()).append('$'); - sbuf.append(name); - if (arguments != null) { - sbuf.append('<'); - int n = arguments.length; - for (int i = 0; i < n; i++) { - if (i > 0) - sbuf.append(", "); - - sbuf.append(arguments[i].toString()); - } - - sbuf.append('>'); - } - - return sbuf.toString(); + return toString2(sbuf); } void encode(StringBuffer sb) { -- 2.39.5