Skip to content

Commit

Permalink
Fix issue with autoimport zip archives from classpath #19
Browse files Browse the repository at this point in the history
(cherry picked from commit 689cb89)
  • Loading branch information
Evgeny Zaharchenko committed Oct 24, 2018
1 parent 5f03338 commit 880ac44
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import javax.inject.Inject;
import java.io.*;
import java.util.zip.ZipFile;

import static com.google.common.io.Files.getFileExtension;
import static java.lang.String.format;
Expand Down Expand Up @@ -48,7 +47,9 @@ public class DefaultAutoImportProcessor implements AutoImportProcessor {
@Override
public void processFile(String filePath) throws Exception {
FileType fileType = FileType.getEnum(getFileExtension(filePath));

if (!resources.getResource(filePath).exists()) {
throw new FileNotFoundException(filePath);
}
switch (fileType) {
case ZIP:
processZipFile(filePath);
Expand Down

0 comments on commit 880ac44

Please sign in to comment.