mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 07:43:40 +01:00
added type checking for CPEAnalyzer to avoid exceptions
Former-commit-id: 6f407c839f4c2f74900f46901f4a8452abe83e06
This commit is contained in:
@@ -131,7 +131,10 @@ public class Engine extends org.owasp.dependencycheck.Engine {
|
||||
CPEAnalyzer cpe = null;
|
||||
final MavenProject project = getRootParent();
|
||||
if (project != null) {
|
||||
cpe = (CPEAnalyzer) project.getContextValue(CPE_ANALYZER_KEY);
|
||||
Object obj = project.getContextValue(CPE_ANALYZER_KEY);
|
||||
if (obj instanceof CPEAnalyzer) {
|
||||
cpe = (CPEAnalyzer) project.getContextValue(CPE_ANALYZER_KEY);
|
||||
}
|
||||
}
|
||||
return cpe;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user