Skip to content

Conversation

@chadlwilson
Copy link
Collaborator

Description of Change

Currently AssemblyAnalyzerTest fails on teardown if you don't have grok available, but it does not appear to be required for the test itself.

[ERROR] org.owasp.dependencycheck.analyzer.AssemblyAnalyzerTest.testLog4Net -- Time elapsed: 0.089 s <<< ERROR!
org.owasp.dependencycheck.analyzer.exception.UnexpectedAnalysisException: java.lang.NullPointerException: Cannot invoke "java.io.File.getParentFile()" because "this.grokAssembly" is null
	at org.owasp.dependencycheck.analyzer.AssemblyAnalyzerTest.tearDown(AssemblyAnalyzerTest.java:184)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

It's also nullable during run:

if (grokAssembly == null) {
LOGGER.warn("GrokAssembly didn't get deployed");
return;
}

This prevents a basic mvn package run to succeed.

Related issues

N/A

Have test cases been added to cover the new functionality?

yes

Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
@boring-cyborg boring-cyborg bot added the core changes to core label Sep 23, 2025
@jeremylong jeremylong merged commit 6008202 into dependency-check:main Sep 23, 2025
8 checks passed
@jeremylong jeremylong added this to the 12.1.6 milestone Sep 23, 2025
@chadlwilson chadlwilson deleted the assembly-analyzer-test branch September 23, 2025 11:19
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

core changes to core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants