Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer unsynchronized StringBuilder #474

Merged
merged 1 commit into from Jul 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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