groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject groovy git commit: Trivial refactoring: Avoid string concatenation as argument to 'StringBuilder.append()' call
Date Thu, 19 Apr 2018 08:12:14 GMT
Repository: groovy
Updated Branches:
  refs/heads/master 20abd8312 -> d19ccbabb


Trivial refactoring: Avoid string concatenation as argument to 'StringBuilder.append()' call


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/d19ccbab
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/d19ccbab
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/d19ccbab

Branch: refs/heads/master
Commit: d19ccbabb0b32fcebd72606731b14cdf913e63fd
Parents: 20abd83
Author: sunlan <sunlan@apache.org>
Authored: Thu Apr 19 16:12:00 2018 +0800
Committer: sunlan <sunlan@apache.org>
Committed: Thu Apr 19 16:12:00 2018 +0800

----------------------------------------------------------------------
 .../java/org/codehaus/groovy/classgen/AsmClassGenerator.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/d19ccbab/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java b/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
index bfb70f7..476337b 100644
--- a/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
+++ b/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
@@ -435,11 +435,11 @@ public class AsmClassGenerator extends ClassGenerator {
                     tracer.p.print(p);
                     p.flush();
                 }
-                StringBuilder outBuffer = new StringBuilder();
+                StringBuilder outBuffer = new StringBuilder(64);
                 outBuffer.append("ASM reporting processing error for ");
-                outBuffer.append(controller.getClassNode().toString() + "#" + node.getName());
-                outBuffer.append(" with signature " + node.getTypeDescriptor());
-                outBuffer.append(" in " + sourceFile + ":" + node.getLineNumber());
+                outBuffer.append(controller.getClassNode().toString()).append("#").append(node.getName());
+                outBuffer.append(" with signature ").append(node.getTypeDescriptor());
+                outBuffer.append(" in ").append(sourceFile).append(":").append(node.getLineNumber());
                 if (writer != null) {
                     outBuffer.append("\nLast known generated bytecode in last generated method
or constructor:\n");
                     outBuffer.append(writer);


Mime
View raw message