File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
src/main/java/org/variantsync/diffdetective/load Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 11package org .variantsync .diffdetective .load ;
22
33import net .lingala .zip4j .ZipFile ;
4- import net .lingala .zip4j .exception .ZipException ;
54import org .apache .commons .io .FilenameUtils ;
65import org .eclipse .jgit .api .Git ;
76import org .eclipse .jgit .api .errors .GitAPIException ;
@@ -86,10 +85,9 @@ public static Git fromZip(Path pathToZip) {
8685 return fromDirectory (unzippedRepoName );
8786 }
8887
89- try {
90- ZipFile zipFile = new ZipFile (pathToZip .toFile ());
88+ try (ZipFile zipFile = new ZipFile (pathToZip .toFile ())) {
9189 zipFile .extractAll (targetDir .toString ());
92- } catch (ZipException e ) {
90+ } catch (IOException e ) {
9391 Logger .warn ("Failed to extract git repo from {} to {}" , pathToZip , targetDir );
9492 return null ;
9593 }
You can’t perform that action at this time.
0 commit comments