mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -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");
|
||||
|
Reference in New Issue
Block a user