Removing excessive synchronization

This commit is contained in:
Grzegorz Olędzki
2023-09-30 21:36:11 +02:00
parent ef68cdf810
commit 61bb60e752
2 changed files with 7 additions and 13 deletions

View File

@@ -1646,9 +1646,7 @@ public class JSONArray implements Iterable<Object> {
@SuppressWarnings("resource")
public String toString(int indentFactor) throws JSONException {
StringWriter sw = new StringWriter();
synchronized (sw.getBuffer()) {
return this.write(sw, indentFactor, 0).toString();
}
return this.write(sw, indentFactor, 0).toString();
}
/**