BuildClasspathMojo.execute() at line 199-205:
Set<Artifact> artifacts = getResolvedDependencies(true);
if (artifacts == null || artifacts.isEmpty()) {
getLog().info("No dependencies found.");
}
List<Artifact> artList = new ArrayList<>(artifacts); // NPE if null
When getResolvedDependencies() returns null, the code logs "No dependencies found." but then falls through to new ArrayList<>(null), which throws NullPointerException. There is no return statement after the null/empty check.
If artifacts is empty (not null), execution continues normally and produces an empty classpath string, which is harmless but inconsistent.
BuildClasspathMojo.execute()at line 199-205:When
getResolvedDependencies()returnsnull, the code logs "No dependencies found." but then falls through tonew ArrayList<>(null), which throws NullPointerException. There is noreturnstatement after the null/empty check.If
artifactsis empty (not null), execution continues normally and produces an empty classpath string, which is harmless but inconsistent.