]> source.dussan.org Git - aspectj.git/commitdiff
optimizations: working with Abraham on these: this one avoids trailing ':' which...
authoraclement <aclement>
Tue, 17 Aug 2010 18:46:01 +0000 (18:46 +0000)
committeraclement <aclement>
Tue, 17 Aug 2010 18:46:01 +0000 (18:46 +0000)
weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java
weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt
weaver/testdata/StaticTjpBeforeHelloWorld.txt
weaver/testdata/TjpAround2HelloWorld.txt
weaver/testdata/TjpAroundHelloWorld.txt
weaver/testdata/TjpBeforeHelloWorld.txt

index 018b45309aa630a7aab0a1bd012b0b0654ae71e3..79ae0c6fcffc94433c9b892d43baefc0009629f8 100644 (file)
@@ -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();
        }
index c9efdf94a2d58b07e2a41fea05da3132ff5f1095..847ee5214944383eeb336fea4d0d3698a1b8a593 100644 (file)
@@ -63,8 +63,8 @@ public class HelloWorld extends java.lang.Object:
                     LDC "9"
                     LDC "main"
                     LDC "HelloWorld"
-                    LDC "[Ljava.lang.String;:"
-                    LDC "args:"
+                    LDC "[Ljava.lang.String;"
+                    LDC "args"
                     LDC ""
                     LDC "void"
                     INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;
index 419571043e8c3c30090a1a3bf296fca6d7e94bec..587838f4f059c1638f7c96c775feb8de6b5fbeaf 100644 (file)
@@ -76,8 +76,8 @@ public class HelloWorld extends java.lang.Object:
                     LDC "1"
                     LDC "println"
                     LDC "java.io.PrintStream"
-                    LDC "java.lang.String:"
-                    LDC "arg0:"
+                    LDC "java.lang.String"
+                    LDC "arg0"
                     LDC ""
                     LDC "void"
                     INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;
@@ -90,8 +90,8 @@ public class HelloWorld extends java.lang.Object:
                     LDC "9"
                     LDC "main"
                     LDC "HelloWorld"
-                    LDC "[Ljava.lang.String;:"
-                    LDC "args:"
+                    LDC "[Ljava.lang.String;"
+                    LDC "args"
                     LDC ""
                     LDC "void"
                     INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;
index 4d29b07c4439dadb8220ed13afd4271e98cfe98a..6a1affae88beabb9a5ed98733f422ff205ed4f15 100644 (file)
@@ -272,8 +272,8 @@ public class HelloWorld extends java.lang.Object:
                     LDC "1"
                     LDC "println"
                     LDC "java.io.PrintStream"
-                    LDC "java.lang.String:"
-                    LDC "arg0:"
+                    LDC "java.lang.String"
+                    LDC "arg0"
                     LDC ""
                     LDC "void"
                     INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;
@@ -286,8 +286,8 @@ public class HelloWorld extends java.lang.Object:
                     LDC "9"
                     LDC "main"
                     LDC "HelloWorld"
-                    LDC "[Ljava.lang.String;:"
-                    LDC "args:"
+                    LDC "[Ljava.lang.String;"
+                    LDC "args"
                     LDC ""
                     LDC "void"
                     INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;
index 18b6e7572430ea3a8485e3435ba10d4ff1ab4280..3643d2c074f0436dbecdeabbad51d7e537e586ac 100644 (file)
@@ -184,8 +184,8 @@ public class HelloWorld extends java.lang.Object:
                     LDC "1"
                     LDC "println"
                     LDC "java.io.PrintStream"
-                    LDC "java.lang.String:"
-                    LDC "arg0:"
+                    LDC "java.lang.String"
+                    LDC "arg0"
                     LDC ""
                     LDC "void"
                     INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;
@@ -198,8 +198,8 @@ public class HelloWorld extends java.lang.Object:
                     LDC "9"
                     LDC "main"
                     LDC "HelloWorld"
-                    LDC "[Ljava.lang.String;:"
-                    LDC "args:"
+                    LDC "[Ljava.lang.String;"
+                    LDC "args"
                     LDC ""
                     LDC "void"
                     INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;
index 9a73e56051134dead2f11bc78db57f0a5fd6b744..c8ed93a863f487fcae8aa5a62d0fa9bfdc61237f 100644 (file)
@@ -104,8 +104,8 @@ public class HelloWorld extends java.lang.Object:
                     LDC "1"
                     LDC "println"
                     LDC "java.io.PrintStream"
-                    LDC "java.lang.String:"
-                    LDC "arg0:"
+                    LDC "java.lang.String"
+                    LDC "arg0"
                     LDC ""
                     LDC "void"
                     INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;
@@ -118,8 +118,8 @@ public class HelloWorld extends java.lang.Object:
                     LDC "9"
                     LDC "main"
                     LDC "HelloWorld"
-                    LDC "[Ljava.lang.String;:"
-                    LDC "args:"
+                    LDC "[Ljava.lang.String;"
+                    LDC "args"
                     LDC ""
                     LDC "void"
                     INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;