mirror of
https://gitee.com/dromara/hutool.git
synced 2025-07-31 16:11:50 +08:00
fix code
This commit is contained in:
parent
43f4f4f6ec
commit
61c10f7b52
@ -555,8 +555,9 @@ public class ZipUtil {
|
||||
if (limit > 0) {
|
||||
final Enumeration<? extends ZipEntry> zipEntries = zipFile.entries();
|
||||
long zipFileSize = 0L;
|
||||
ZipEntry zipEntry;
|
||||
while (zipEntries.hasMoreElements()) {
|
||||
ZipEntry zipEntry = zipEntries.nextElement();
|
||||
zipEntry = zipEntries.nextElement();
|
||||
zipFileSize += zipEntry.getSize();
|
||||
if (zipFileSize > limit) {
|
||||
throw new IllegalArgumentException("The file size exceeds the limit");
|
||||
|
Loading…
Reference in New Issue
Block a user