summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorxiexiaoqun <xiexiaoqun@yeah.net>2021-08-21 06:28:57 +0800
committerJens Geyer <Jens-G@users.noreply.github.com>2021-08-22 18:38:49 +0200
commit72f04b4e2ca46306ff88b33eda25a7e14df5e895 (patch)
tree77b671371fc680a1178b90f1113a1fc222bbbc87 /lib
parenta265236febefca37d3aa74b544112a2f724b3ea8 (diff)
downloadthrift-72f04b4e2ca46306ff88b33eda25a7e14df5e895.tar.gz
Change StringBuffer to StringBuilder for more efficiency
Diffstat (limited to 'lib')
-rw-r--r--lib/java/src/org/apache/thrift/protocol/TSimpleJSONProtocol.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/java/src/org/apache/thrift/protocol/TSimpleJSONProtocol.java b/lib/java/src/org/apache/thrift/protocol/TSimpleJSONProtocol.java
index 38e10e19c..6a3ee55d9 100644
--- a/lib/java/src/org/apache/thrift/protocol/TSimpleJSONProtocol.java
+++ b/lib/java/src/org/apache/thrift/protocol/TSimpleJSONProtocol.java
@@ -308,7 +308,7 @@ public class TSimpleJSONProtocol extends TProtocol {
public void writeString(String str) throws TException {
writeContext_.write();
int length = str.length();
- StringBuffer escape = new StringBuffer(length + 16);
+ StringBuilder escape = new StringBuilder(length + 16);
escape.append(QUOTE);
for (int i = 0; i < length; ++i) {
char c = str.charAt(i);