Skip to content

Commit

Permalink
Updated issue instance id calculation to handle duplicate files
Browse files Browse the repository at this point in the history
  • Loading branch information
rsenden committed Oct 2, 2020
1 parent 2be900c commit 17d044c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions sampleData/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.gitignore.*
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ public final String getFilePathOrName() {
}

public final String getDependencyIdentifier() {
return StringUtils.defaultIfBlank(sha256,
StringUtils.defaultIfBlank(sha1,
StringUtils.defaultIfBlank(md5, getFilePathOrName())));
return getFilePathOrName() + "-" + StringUtils.defaultIfBlank(sha256,
StringUtils.defaultIfBlank(sha1, md5));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@

class OWASPDependencyCheckParserPluginTest {
private static final String[] SAMPLE_FILES = {
//"dependency-check-report-java.json",
//"dependency-check-report-php.json",
"dependency-check-report-java.json",
"dependency-check-report-php.json",
"dependency-check-report-with-npm.json",
//"dependency-check-report.gitignore.json"
};

private final ScanData getScanData(final String fileName) {
Expand Down

0 comments on commit 17d044c

Please sign in to comment.