aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/tools
diff options
context:
space:
mode:
authorTimothy Hoffman <4001421+tim-hoffman@users.noreply.github.com>2021-07-16 10:55:33 -0500
committerTimothy Hoffman <4001421+tim-hoffman@users.noreply.github.com>2021-07-16 10:55:33 -0500
commitb4279f68174129f8b7b6180e6782641884daf013 (patch)
treefdc6f35a9e2c39214d2d9ff76028eff11dd6af07 /src/main/javassist/tools
parent047f7c71be30d1fce5773c8e9c014052acac14df (diff)
downloadjavassist-b4279f68174129f8b7b6180e6782641884daf013.tar.gz
javassist-b4279f68174129f8b7b6180e6782641884daf013.zip
Replace StringBuffer with StringBuilder and other minor String optimizations
Diffstat (limited to 'src/main/javassist/tools')
-rw-r--r--src/main/javassist/tools/rmi/StubGenerator.java2
-rw-r--r--src/main/javassist/tools/web/Webserver.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/javassist/tools/rmi/StubGenerator.java b/src/main/javassist/tools/rmi/StubGenerator.java
index b0817ab5..a06ebc60 100644
--- a/src/main/javassist/tools/rmi/StubGenerator.java
+++ b/src/main/javassist/tools/rmi/StubGenerator.java
@@ -183,7 +183,7 @@ public class StubGenerator implements Translator {
if (!rtclass.isArray())
name = rtclass.getName();
else {
- StringBuffer sbuf = new StringBuffer();
+ StringBuilder sbuf = new StringBuilder();
do {
sbuf.append("[]");
rtclass = rtclass.getComponentType();
diff --git a/src/main/javassist/tools/web/Webserver.java b/src/main/javassist/tools/web/Webserver.java
index d90e8e34..99e15faf 100644
--- a/src/main/javassist/tools/web/Webserver.java
+++ b/src/main/javassist/tools/web/Webserver.java
@@ -222,7 +222,7 @@ public class Webserver {
}
private String readLine(InputStream in) throws IOException {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
int c;
while ((c = in.read()) >= 0 && c != 0x0d)
buf.append((char)c);