mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-16 23:40:51 -07:00
Prefer unsynchronized StringBuilder
StringBuffer provides unneeded synchronization. Found via error-prone.
This commit is contained in:
parent
a03a01531a
commit
4d451468fd
1 changed files with 3 additions and 3 deletions
6
CDL.java
6
CDL.java
|
@ -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');
|
||||
|
@ -65,7 +65,7 @@ public class CDL {
|
|||
case '"':
|
||||
case '\'':
|
||||
q = c;
|
||||
sb = new StringBuffer();
|
||||
sb = new StringBuilder();
|
||||
for (;;) {
|
||||
c = x.next();
|
||||
if (c == q) {
|
||||
|
@ -275,7 +275,7 @@ public class CDL {
|
|||
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue