diff --git a/Mage.Verify/src/main/java/mage/verify/MtgJson.java b/Mage.Verify/src/main/java/mage/verify/MtgJson.java index b187667140..e0b2d133ee 100644 --- a/Mage.Verify/src/main/java/mage/verify/MtgJson.java +++ b/Mage.Verify/src/main/java/mage/verify/MtgJson.java @@ -2,6 +2,7 @@ package mage.verify; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; +import mage.util.StreamUtils; import java.io.File; import java.io.FileInputStream; @@ -94,9 +95,15 @@ public final class MtgJson { } stream = new FileInputStream(file); } - ZipInputStream zipInputStream = new ZipInputStream(stream); - zipInputStream.getNextEntry(); - return new ObjectMapper().readValue(zipInputStream, ref); + ZipInputStream zipInputStream = null; + try { + zipInputStream = new ZipInputStream(stream); + zipInputStream.getNextEntry(); + return new ObjectMapper().readValue(zipInputStream, ref); + } finally { + StreamUtils.closeQuietly(zipInputStream); + } + } public static Map sets() {