Browse Source

fixed a bug of accesses to annotation arguments (cont.).

did minor refactoring.
tags/rel_3_19_0_ga
chibash 9 years ago
parent
commit
1663f10c67
1 changed files with 5 additions and 15 deletions
  1. 5
    15
      src/main/javassist/bytecode/SignatureAttribute.java

+ 5
- 15
src/main/javassist/bytecode/SignatureAttribute.java View File

@@ -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) {

Loading…
Cancel
Save