mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复toJSONString导致CPU使用率高的问题
This commit is contained in:
@@ -32,6 +32,7 @@
|
|||||||
* 【core 】 修复DateUtil.age年龄计算问题(issue#I7XMYW@Gitee)
|
* 【core 】 修复DateUtil.age年龄计算问题(issue#I7XMYW@Gitee)
|
||||||
* 【core 】 修复JSONUtil.parse()溢出问题(issue#3289@Github)
|
* 【core 】 修复JSONUtil.parse()溢出问题(issue#3289@Github)
|
||||||
* 【core 】 修复Tailer stop NPE问题(pr#1067@Gitee)
|
* 【core 】 修复Tailer stop NPE问题(pr#1067@Gitee)
|
||||||
|
* 【json 】 修复toJSONString导致CPU使用率高的问题(issue#3297@Github)
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
# 5.8.21(2023-07-29)
|
# 5.8.21(2023-07-29)
|
||||||
|
@@ -117,9 +117,7 @@ public interface JSON extends Cloneable, Serializable, IJSONTypeConverter {
|
|||||||
*/
|
*/
|
||||||
default String toJSONString(int indentFactor) throws JSONException {
|
default String toJSONString(int indentFactor) throws JSONException {
|
||||||
final StringWriter sw = new StringWriter();
|
final StringWriter sw = new StringWriter();
|
||||||
synchronized (sw.getBuffer()) {
|
return this.write(sw, indentFactor, 0).toString();
|
||||||
return this.write(sw, indentFactor, 0).toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user