修复toJSONString导致CPU使用率高的问题

This commit is contained in:
Looly 2023-09-08 23:24:49 +08:00
parent c8b56ed2b9
commit afafd8ac05

View File

@ -146,9 +146,7 @@ public interface JSON extends Converter, Cloneable, Serializable {
*/
default String toJSONString(final int indentFactor) throws JSONException {
final StringWriter sw = new StringWriter();
synchronized (sw.getBuffer()) {
return this.write(sw, indentFactor, 0, null).toString();
}
return this.write(sw, indentFactor, 0, null).toString();
}
/**