Commit 19f97d1
committed
fix: use classpath constant for commercial average template resource lookup (#268)
BenchmarkScore.java:965 passed scoreCardDir (a java.io.File representing
the filesystem output directory) to getResourceAsStream(), which expects a
classpath resource path. With the default config (resultsfileordir: "results"),
File.toString() accidentally produces "scorecard" — matching the classpath
prefix. But any nested resultsfileordir path (e.g. "some/dir/results") causes
getParent() to return a non-null prefix, producing an invalid classpath like
"some/dir/scorecard/commercialAveTemplate.html", which resolves to null and
throws NullPointerException.
Fix: use the SCORECARDDIRNAME constant ("scorecard"), consistent with
ToolReport.java:64 and the vulntemplate loading at line 910.1 parent ee31e2d commit 19f97d1
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
962 | 962 | | |
963 | 963 | | |
964 | 964 | | |
965 | | - | |
| 965 | + | |
966 | 966 | | |
967 | 967 | | |
968 | 968 | | |
| |||
0 commit comments