Skip to content

Commit 25c292b

Browse files
authored
Merge pull request #1386 from blackducksoftware/dev/dterry/pnpm-null-pointer
fix potential null sonar found
2 parents ff9edd3 + f5a78cc commit 25c292b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

detectable/src/main/java/com/blackduck/integration/detectable/detectables/pnpm/lockfile/process/PnpmYamlTransformer.java

+5
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ private String convertRawEntryToPackageId(String name, String version, PnpmLinke
212212
}
213213

214214
private Optional<NameVersion> parseNameVersionFromId(String id) {
215+
if (id == null) {
216+
logger.debug("The provided id is null.");
217+
return Optional.empty();
218+
}
219+
215220
// ids follow format: /name@version in v6, name@version in v9
216221
try {
217222
id = removeExtraVersionInformation(id);

0 commit comments

Comments
 (0)