Skip to content

Commit 6008202

Browse files
authored
test: Fix AssemblyAnalyzerTest to be robust to Grok availability (#7950)
Signed-off-by: Chad Wilson <[email protected]>
1 parent b3aa3f2 commit 6008202

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)