Skip to content

Commit

Permalink
fix issue #240 (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
BorzdeG authored and jshiell committed Jun 29, 2016
1 parent d5d0471 commit feb12e7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
CheckStyle-IDEA.zip
.DS_Store
/*.iws
*.ipr
*.iml
.idea/
/target/
/build/*
/test-configs/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
Expand Down Expand Up @@ -98,6 +99,9 @@ public List<Problem> inspectFile(@NotNull final PsiFile psiFile,
} catch (CheckStylePluginException e) {
blacklist(configurationLocation);
LOG.error("CheckStyle threw an exception when scanning: " + psiFile.getName(), e);
if (e.getCause() instanceof FileNotFoundException){
plugin.getConfiguration().setActiveConfiguration(null);
}
return NO_PROBLEMS_FOUND;

} catch (Throwable e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public Optional<CheckStyleChecker> checker(@Nullable final Module module,
@Nullable
private CheckStyleChecker checker(@Nullable final Module module,
@Nullable final ConfigurationLocation location,
@Nullable final ClassLoader classLoader) {
@Nullable final ClassLoader classLoader) throws CheckStylePluginException {
LOG.debug("Getting CheckStyle checker with location " + location);

if (location == null) {
Expand Down

0 comments on commit feb12e7

Please sign in to comment.