Skip to content

Commit

Permalink
Merge pull request #474 from gaul/stringbuilder
Browse files Browse the repository at this point in the history
Prefer unsynchronized StringBuilder
  • Loading branch information
stleary committed Jul 26, 2019
2 parents a03a015 + 4d45146 commit c8ae720
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CDL.java
Expand Up @@ -55,7 +55,7 @@ public class CDL {
private static String getValue(JSONTokener x) throws JSONException {
char c;
char q;
StringBuffer sb;
StringBuilder sb;
do {
c = x.next();
} while (c == ' ' || c == '\t');
Expand All @@ -65,7 +65,7 @@ private static String getValue(JSONTokener x) throws JSONException {
case '"':
case '\'':
q = c;
sb = new StringBuffer();
sb = new StringBuilder();
for (;;) {
c = x.next();
if (c == q) {
Expand Down Expand Up @@ -275,7 +275,7 @@ public static String toString(JSONArray names, JSONArray ja)
if (names == null || names.length() == 0) {
return null;
}
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < ja.length(); i += 1) {
JSONObject jo = ja.optJSONObject(i);
if (jo != null) {
Expand Down

0 comments on commit c8ae720

Please sign in to comment.