AppendableWriter增加checkNotClosed(issue#IDMZ5K@Gitee)

This commit is contained in:
Looly
2026-02-01 19:35:00 +08:00
parent 8d2c5b0449
commit 7e0199c1a9
2 changed files with 3 additions and 0 deletions

View File

@@ -7,6 +7,7 @@
* 【captcha】 `AbstractCaptcha`增加`setStroke`方法支持线条粗细issue#IDJQ15@Gitee
* 【core 】 `BooleanUtil`新增 exactlyOneTrue 方法用于互斥条件校验issue#IDJQ15@Gitee
* 【core 】 `DateUtil.normalize`方法中正则预编译提升效率pr#4221@Gitee
* 【core 】 `AppendableWriter`增加checkNotClosedissue#IDMZ5K@Gitee
### 🐞Bug修复
* 【json 】 修复`JSONUtil.wrap`忽略错误问题issue#4210@Github

View File

@@ -66,11 +66,13 @@ public class AppendableWriter extends Writer implements Appendable {
@Override
public void write(final String str) throws IOException {
checkNotClosed();
appendable.append(str);
}
@Override
public void write(final char[] cbuf) throws IOException {
checkNotClosed();
appendable.append(CharBuffer.wrap(cbuf));
}