mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复ZipUtil
中zlib和unZlib调用后资源未释放问题(issue#3976@Github)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# 🚀Changelog
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
# 5.8.39(2025-06-14)
|
||||
# 5.8.39(2025-06-20)
|
||||
|
||||
### 🐣新特性
|
||||
* 【ai 】 增加SSE流式返回函数参数callback,增加超时时间配置,豆包、grok新增文生图接口,豆包生成视频支持使用model,新增HutoolAI平台
|
||||
@@ -21,6 +21,7 @@
|
||||
* 【core 】 修复`ThreadUtil`中中断异常处理丢失中断信息的问题,解决ConcurrencyTester资源未释放的问题(pr#1358@Gitee)
|
||||
* 【core 】 修复`TEL_400_800`正则规则太窄问题(issue#3967@Github)
|
||||
* 【core 】 修复`ClassUti`isNormalClass判断未排除String问题(issue#3965@Github)
|
||||
* 【core 】 修复`ZipUtil`中zlib和unZlib调用后资源未释放问题(issue#3976@Github)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
# 5.8.38(2025-05-13)
|
||||
|
@@ -926,7 +926,7 @@ public class ZipUtil {
|
||||
*/
|
||||
public static byte[] zlib(InputStream in, int level, int length) {
|
||||
final ByteArrayOutputStream out = new ByteArrayOutputStream(length);
|
||||
Deflate.of(in, out, false).deflater(level);
|
||||
Deflate.of(in, out, false).deflater(level).close();
|
||||
return out.toByteArray();
|
||||
}
|
||||
|
||||
@@ -974,7 +974,7 @@ public class ZipUtil {
|
||||
*/
|
||||
public static byte[] unZlib(InputStream in, int length) {
|
||||
final ByteArrayOutputStream out = new ByteArrayOutputStream(length);
|
||||
Deflate.of(in, out, false).inflater();
|
||||
Deflate.of(in, out, false).inflater().close();
|
||||
return out.toByteArray();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user