mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 11:25:30 -04:00
Merge pull request #474 from gaul/stringbuilder
Prefer unsynchronized StringBuilder
This commit is contained in:
commit
c8ae720caf
6
CDL.java
6
CDL.java
@ -55,7 +55,7 @@ public class CDL {
|
|||||||
private static String getValue(JSONTokener x) throws JSONException {
|
private static String getValue(JSONTokener x) throws JSONException {
|
||||||
char c;
|
char c;
|
||||||
char q;
|
char q;
|
||||||
StringBuffer sb;
|
StringBuilder sb;
|
||||||
do {
|
do {
|
||||||
c = x.next();
|
c = x.next();
|
||||||
} while (c == ' ' || c == '\t');
|
} while (c == ' ' || c == '\t');
|
||||||
@ -65,7 +65,7 @@ public class CDL {
|
|||||||
case '"':
|
case '"':
|
||||||
case '\'':
|
case '\'':
|
||||||
q = c;
|
q = c;
|
||||||
sb = new StringBuffer();
|
sb = new StringBuilder();
|
||||||
for (;;) {
|
for (;;) {
|
||||||
c = x.next();
|
c = x.next();
|
||||||
if (c == q) {
|
if (c == q) {
|
||||||
@ -275,7 +275,7 @@ public class CDL {
|
|||||||
if (names == null || names.length() == 0) {
|
if (names == null || names.length() == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (int i = 0; i < ja.length(); i += 1) {
|
for (int i = 0; i < ja.length(); i += 1) {
|
||||||
JSONObject jo = ja.optJSONObject(i);
|
JSONObject jo = ja.optJSONObject(i);
|
||||||
if (jo != null) {
|
if (jo != null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user