File tree Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -1646,9 +1646,7 @@ public String toString() {
1646
1646
@ SuppressWarnings ("resource" )
1647
1647
public String toString (int indentFactor ) throws JSONException {
1648
1648
StringWriter sw = new StringWriter ();
1649
- synchronized (sw .getBuffer ()) {
1650
- return this .write (sw , indentFactor , 0 ).toString ();
1651
- }
1649
+ return this .write (sw , indentFactor , 0 ).toString ();
1652
1650
}
1653
1651
1654
1652
/**
Original file line number Diff line number Diff line change @@ -2191,13 +2191,11 @@ public Object optQuery(JSONPointer jsonPointer) {
2191
2191
@ SuppressWarnings ("resource" )
2192
2192
public static String quote (String string ) {
2193
2193
StringWriter sw = new StringWriter ();
2194
- synchronized (sw .getBuffer ()) {
2195
- try {
2196
- return quote (string , sw ).toString ();
2197
- } catch (IOException ignored ) {
2198
- // will never happen - we are writing to a string writer
2199
- return "" ;
2200
- }
2194
+ try {
2195
+ return quote (string , sw ).toString ();
2196
+ } catch (IOException ignored ) {
2197
+ // will never happen - we are writing to a string writer
2198
+ return "" ;
2201
2199
}
2202
2200
}
2203
2201
@@ -2584,9 +2582,7 @@ public String toString() {
2584
2582
@ SuppressWarnings ("resource" )
2585
2583
public String toString (int indentFactor ) throws JSONException {
2586
2584
StringWriter w = new StringWriter ();
2587
- synchronized (w .getBuffer ()) {
2588
- return this .write (w , indentFactor , 0 ).toString ();
2589
- }
2585
+ return this .write (w , indentFactor , 0 ).toString ();
2590
2586
}
2591
2587
2592
2588
/**
You can’t perform that action at this time.
0 commit comments