Skip to content

Commit c8ae720

Browse files
authored
Merge pull request stleary#474 from gaul/stringbuilder
Prefer unsynchronized StringBuilder
2 parents a03a015 + 4d45146 commit c8ae720

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CDL.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public class CDL {
5555
private static String getValue(JSONTokener x) throws JSONException {
5656
char c;
5757
char q;
58-
StringBuffer sb;
58+
StringBuilder sb;
5959
do {
6060
c = x.next();
6161
} while (c == ' ' || c == '\t');
@@ -65,7 +65,7 @@ private static String getValue(JSONTokener x) throws JSONException {
6565
case '"':
6666
case '\'':
6767
q = c;
68-
sb = new StringBuffer();
68+
sb = new StringBuilder();
6969
for (;;) {
7070
c = x.next();
7171
if (c == q) {
@@ -275,7 +275,7 @@ public static String toString(JSONArray names, JSONArray ja)
275275
if (names == null || names.length() == 0) {
276276
return null;
277277
}
278-
StringBuffer sb = new StringBuffer();
278+
StringBuilder sb = new StringBuilder();
279279
for (int i = 0; i < ja.length(); i += 1) {
280280
JSONObject jo = ja.optJSONObject(i);
281281
if (jo != null) {

0 commit comments

Comments
 (0)