Skip to content

Commit 2bdd183

Browse files
committed
test: Fix AssemblyAnalyzerTest to be robust to Grok availability
Signed-off-by: Chad Wilson <[email protected]>
1 parent 9cbfb35 commit 2bdd183

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/main/java/org/owasp/dependencycheck/analyzer/AssemblyAnalyzer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,9 @@ private File extractGrokAssembly() throws InitializationException {
427427
*/
428428
@Override
429429
public void closeAnalyzer() throws Exception {
430-
FileUtils.delete(grokAssembly.getParentFile());
430+
if (grokAssembly != null) {
431+
FileUtils.delete(grokAssembly.getParentFile());
432+
}
431433
}
432434

433435
@Override

0 commit comments

Comments
 (0)