Skip to content

Commit

Permalink
Fix backward compatibility for AnalysisRunner
Browse files Browse the repository at this point in the history
  • Loading branch information
Vogel612 committed Mar 17, 2022
1 parent b5b8b57 commit 2566c4f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Expand Up @@ -30,6 +30,7 @@
import edu.umd.cs.findbugs.BugRanker;
import edu.umd.cs.findbugs.DetectorFactoryCollection;
import edu.umd.cs.findbugs.FindBugs2;
import edu.umd.cs.findbugs.IFindBugsEngine;
import edu.umd.cs.findbugs.Plugin;
import edu.umd.cs.findbugs.PluginException;
import edu.umd.cs.findbugs.Priorities;
Expand Down Expand Up @@ -83,6 +84,12 @@ public AnalysisRunner addAuxClasspathEntry(Path path) {
return this;
}

@Nonnull
public BugCollectionBugReporter run(Path... files) {
return this.run((engine) -> {
}, files);
}

@Nonnull
public BugCollectionBugReporter run(Consumer<IFindBugsEngine> engineCustomization, Path... files) {
DetectorFactoryCollection.resetInstance(new DetectorFactoryCollection());
Expand Down
Expand Up @@ -104,6 +104,7 @@ public BugCollection performAnalysis(Consumer<IFindBugsEngine> engineCustomizati
// TODO let users specify SlashedClassName, then find its file path automatically
@Nonnull
public BugCollection performAnalysis(Path... paths) {
return performAnalysis(e -> {}, paths);
return performAnalysis(e -> {
}, paths);
}
}

0 comments on commit 2566c4f

Please sign in to comment.