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 2022/05/01 12:46:11 UTC

[commons-bcel] 42/49: StringBuffer -> 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

commit 82ab1d662851881ff8677175978a5c744d5aca8e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun May 1 08:38:25 2022 -0400

    StringBuffer -> StringBuilder.
---
 src/examples/patchclass.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/examples/patchclass.java b/src/examples/patchclass.java
index 91fcb944..7c02e578 100644
--- a/src/examples/patchclass.java
+++ b/src/examples/patchclass.java
@@ -63,7 +63,7 @@ public class patchclass {
         ConstantUtf8 c;
         String str;
         int index, old_index;
-        StringBuffer buf;
+        StringBuilder buf;
 
         // Loop through constant pool
         for (short i = 0; i < constant_pool.length; i++) {
@@ -73,7 +73,7 @@ public class patchclass {
                     str = c.getBytes();
 
                     if ((index = str.indexOf(old)) != -1) { // `old' found in str
-                        buf = new StringBuffer();           // target buffer
+                        buf = new StringBuilder();           // target buffer
                         old_index = 0;                      // String start offset
 
                         // While we have something to replace