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

This commit is contained in:
Looly
2023-09-08 23:24:56 +08:00
parent ce56d9331a
commit 4771078cf4
2 changed files with 2 additions and 3 deletions

View File

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