Updates to abstract analyzer and subclasses - removed duplicate code

Former-commit-id: 618c113750bf2af612d9e476fd6992db5147fcdc
This commit is contained in:
Jeremy Long
2013-04-19 18:46:01 -04:00
parent 811f85c127
commit 616da84891
9 changed files with 60 additions and 71 deletions

View File

@@ -37,7 +37,7 @@ import org.owasp.dependencycheck.dependency.Dependency;
import org.owasp.dependencycheck.dependency.Evidence;
import org.owasp.dependencycheck.dependency.Evidence.Confidence;
import org.owasp.dependencycheck.dependency.EvidenceCollection;
import org.owasp.dependencycheck.analyzer.Analyzer;
/**
* CPEAnalyzer is a utility class that takes a project dependency and attempts
* to discern if there is an associated CPE. It uses the evidence contained
@@ -45,7 +45,7 @@ import org.owasp.dependencycheck.dependency.EvidenceCollection;
*
* @author Jeremy Long (jeremy.long@gmail.com)
*/
public class CPEAnalyzer implements org.owasp.dependencycheck.analyzer.Analyzer {
public class CPEAnalyzer implements Analyzer {
/**
* The maximum number of query results to return.
@@ -512,4 +512,12 @@ public class CPEAnalyzer implements org.owasp.dependencycheck.analyzer.Analyzer
public void initialize() throws Exception {
this.open();
}
/**
* Used to indicate if any steps should be taken after the analysis. The
* abstract implementation returns NOTHING.
* @return NOTHING
*/
public PostAnalysisAction getPostAnalysisAction() {
return PostAnalysisAction.NOTHING;
}
}

View File

@@ -28,7 +28,7 @@ import org.owasp.dependencycheck.analyzer.AnalysisPhase;
import org.owasp.dependencycheck.dependency.Dependency;
import org.owasp.dependencycheck.dependency.Vulnerability;
import org.owasp.dependencycheck.dependency.Identifier;
import org.owasp.dependencycheck.analyzer.Analyzer;
/**
* NvdCveAnalyzer is a utility class that takes a project dependency and
* attempts to discern if there is an associated CVEs. It uses the the
@@ -36,7 +36,7 @@ import org.owasp.dependencycheck.dependency.Identifier;
*
* @author Jeremy Long (jeremy.long@gmail.com)
*/
public class NvdCveAnalyzer implements org.owasp.dependencycheck.analyzer.Analyzer {
public class NvdCveAnalyzer implements Analyzer {
/**
* The maximum number of query results to return.
@@ -159,4 +159,13 @@ public class NvdCveAnalyzer implements org.owasp.dependencycheck.analyzer.Analyz
public void initialize() throws Exception {
this.open();
}
/**
* Used to indicate if any steps should be taken after the analysis. The
* abstract implementation returns NOTHING.
* @return NOTHING
*/
public PostAnalysisAction getPostAnalysisAction() {
return PostAnalysisAction.NOTHING;
}
}