Cleanup: Remove enabled flag (reuse flag from AbstractAnalyzer class)

This commit is contained in:
Stefan Neuhaus
2017-10-04 20:34:39 +02:00
parent 6ddc0bfa27
commit bfbec1d0a6

View File

@@ -92,11 +92,6 @@ public class CentralAnalyzer extends AbstractFileTypeAnalyzer {
*/
protected CentralSearch searcher;
/**
* Field indicating if the analyzer is enabled.
*/
private boolean enabled = true;
/**
* Initializes the analyzer with the configured settings.
*
@@ -105,17 +100,7 @@ public class CentralAnalyzer extends AbstractFileTypeAnalyzer {
@Override
public void initialize(Settings settings) {
super.initialize(settings);
enabled = checkEnabled();
}
/**
* Determine whether to enable this analyzer or not.
*
* @return whether the analyzer should be enabled
*/
@Override
public boolean isEnabled() {
return enabled;
setEnabled(checkEnabled());
}
/**
@@ -215,7 +200,7 @@ public class CentralAnalyzer extends AbstractFileTypeAnalyzer {
*/
@Override
public void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException {
if (errorFlag || !isEnabled()) {
if (errorFlag) {
return;
}