We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ZipFile
GitLoader
1 parent 184b1c8 commit 299f34bCopy full SHA for 299f34b
1 file changed
src/main/java/org/variantsync/diffdetective/load/GitLoader.java
@@ -1,7 +1,6 @@
1
package org.variantsync.diffdetective.load;
2
3
import net.lingala.zip4j.ZipFile;
4
-import net.lingala.zip4j.exception.ZipException;
5
import org.apache.commons.io.FilenameUtils;
6
import org.eclipse.jgit.api.Git;
7
import org.eclipse.jgit.api.errors.GitAPIException;
@@ -86,10 +85,9 @@ public static Git fromZip(Path pathToZip) {
86
85
return fromDirectory(unzippedRepoName);
87
}
88
89
- try {
90
- ZipFile zipFile = new ZipFile(pathToZip.toFile());
+ try (ZipFile zipFile = new ZipFile(pathToZip.toFile())) {
91
zipFile.extractAll(targetDir.toString());
92
- } catch (ZipException e) {
+ } catch (IOException e) {
93
Logger.warn("Failed to extract git repo from {} to {}", pathToZip, targetDir);
94
return null;
95
0 commit comments