diff options
author | Andrey Turbanov <turbanoff@gmail.com> | 2021-11-20 17:16:22 +0300 |
---|---|---|
committer | Andrey Turbanov <turbanoff@gmail.com> | 2021-11-20 17:22:06 +0300 |
commit | b1c52e2f5eb624037b8c799c20fbd1b4fd611d9a (patch) | |
tree | 33d7b6e8f733f20514f46e7871b29e26de47913d /loadtime | |
parent | 0f85ca109b9e6ab849e201e76f62d5023cbfcb98 (diff) | |
download | aspectj-b1c52e2f5eb624037b8c799c20fbd1b4fd611d9a.tar.gz aspectj-b1c52e2f5eb624037b8c799c20fbd1b4fd611d9a.zip |
Replace uses of StringBuffer with StringBuilder.
StringBuffer is a legacy synchronized class. StringBuilder is a direct replacement to StringBuffer which generally have better performance.
Diffstat (limited to 'loadtime')
-rw-r--r-- | loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java | 4 | ||||
-rw-r--r-- | loadtime/src/main/java/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java index 0f1d7baca..43a73b1ef 100644 --- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java +++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java @@ -345,7 +345,7 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { * @param definitions */ private void registerOptions(final BcelWeaver weaver, final ClassLoader loader, final List<Definition> definitions) { - StringBuffer allOptions = new StringBuffer(); + StringBuilder allOptions = new StringBuilder(); for (Definition definition : definitions) { allOptions.append(definition.getWeaverOptions()).append(' '); } @@ -956,7 +956,7 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { @Override protected String getDumpDir() { if (dumpDirPerClassloader) { - StringBuffer dir = new StringBuffer(); + StringBuilder dir = new StringBuilder(); dir.append("_ajdump").append(File.separator).append(weavingContext.getId()); return dir.toString(); } else { diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java index 5816a0bc4..459a0f86c 100644 --- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java +++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java @@ -321,7 +321,7 @@ public class ConcreteAspectCodeGen { * @return string repr. */ private String stringify() { - StringBuffer sb = new StringBuffer("<concrete-aspect name='"); + StringBuilder sb = new StringBuilder("<concrete-aspect name='"); sb.append(concreteAspect.name); sb.append("' extends='"); sb.append(concreteAspect.extend); |