You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/12/10 15:21:19 UTC

(commons-bcel) branch master updated: Replace internal StringBuffer with StringBuilder

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bcel.git


The following commit(s) were added to refs/heads/master by this push:
     new 9ed06e47 Replace internal StringBuffer with StringBuilder
9ed06e47 is described below

commit 9ed06e477a3cdf5fe082a4b8c20c857ff1e728a7
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Dec 10 10:21:15 2023 -0500

    Replace internal StringBuffer with StringBuilder
---
 src/examples/Mini/ASTFunDecl.java                         | 2 +-
 src/main/java/org/apache/bcel/util/InstructionFinder.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/examples/Mini/ASTFunDecl.java b/src/examples/Mini/ASTFunDecl.java
index 6002a168..2a3fadf5 100644
--- a/src/examples/Mini/ASTFunDecl.java
+++ b/src/examples/Mini/ASTFunDecl.java
@@ -317,7 +317,7 @@ public class ASTFunDecl extends SimpleNode implements MiniParserTreeConstants {
         }
 
         if (!ignore) {
-            final StringBuffer buf = new StringBuffer();
+            final StringBuilder buf = new StringBuilder();
 
             body.code(buf);
             out.println(getVarDecls());
diff --git a/src/main/java/org/apache/bcel/util/InstructionFinder.java b/src/main/java/org/apache/bcel/util/InstructionFinder.java
index 07750cf5..62169817 100644
--- a/src/main/java/org/apache/bcel/util/InstructionFinder.java
+++ b/src/main/java/org/apache/bcel/util/InstructionFinder.java
@@ -369,7 +369,7 @@ public class InstructionFinder {
 //    }
 
 //    private static final String pattern2string( String pattern, boolean make_string ) {
-//        StringBuffer buf = new StringBuffer();
+//        StringBuilder buf = new StringBuilder();
 //        for (int i = 0; i < pattern.length(); i++) {
 //            char ch = pattern.charAt(i);
 //            if (ch >= OFFSET) {