summaryrefslogtreecommitdiffstats
path: root/weaver/src
diff options
context:
space:
mode:
authoraclement <aclement>2010-08-17 18:46:01 +0000
committeraclement <aclement>2010-08-17 18:46:01 +0000
commit55cd615ec9a8d68653d45b0d7407f43d357c6ecd (patch)
tree3bf605e03a8a52faba097bb58fa449129202b3f2 /weaver/src
parent16adee6b2928350a3c469de0d051c6d9c10dc5a3 (diff)
downloadaspectj-55cd615ec9a8d68653d45b0d7407f43d357c6ecd.tar.gz
aspectj-55cd615ec9a8d68653d45b0d7407f43d357c6ecd.zip
optimizations: working with Abraham on these: this one avoids trailing ':' which will create a CP hit more frequently.
Diffstat (limited to 'weaver/src')
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java
index 018b45309..79ae0c6fc 100644
--- a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java
+++ b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java
@@ -1389,10 +1389,12 @@ public final class LazyClassGen {
if (types == null) {
return "";
}
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
for (int i = 0, len = types.length; i < len; i++) {
+ if (i > 0) {
+ buf.append(':');
+ }
buf.append(makeString(types[i]));
- buf.append(':');
}
return buf.toString();
}
@@ -1401,10 +1403,12 @@ public final class LazyClassGen {
if (names == null) {
return "";
}
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
for (int i = 0, len = names.length; i < len; i++) {
+ if (i > 0) {
+ buf.append(':');
+ }
buf.append(names[i]);
- buf.append(':');
}
return buf.toString();
}