mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-22 09:09:31 +01:00
Cleanup: Remove enabled flag (reuse flag from AbstractAnalyzer class)
This commit is contained in:
@@ -92,11 +92,6 @@ public class CentralAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
*/
|
*/
|
||||||
protected CentralSearch searcher;
|
protected CentralSearch searcher;
|
||||||
|
|
||||||
/**
|
|
||||||
* Field indicating if the analyzer is enabled.
|
|
||||||
*/
|
|
||||||
private boolean enabled = true;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the analyzer with the configured settings.
|
* Initializes the analyzer with the configured settings.
|
||||||
*
|
*
|
||||||
@@ -105,17 +100,7 @@ public class CentralAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
@Override
|
@Override
|
||||||
public void initialize(Settings settings) {
|
public void initialize(Settings settings) {
|
||||||
super.initialize(settings);
|
super.initialize(settings);
|
||||||
enabled = checkEnabled();
|
setEnabled(checkEnabled());
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determine whether to enable this analyzer or not.
|
|
||||||
*
|
|
||||||
* @return whether the analyzer should be enabled
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean isEnabled() {
|
|
||||||
return enabled;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -215,7 +200,7 @@ public class CentralAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException {
|
public void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException {
|
||||||
if (errorFlag || !isEnabled()) {
|
if (errorFlag) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user