style: comment/clarify some code that may raise questions
@@ -60,6 +60,7 @@ public class YarnTransformer {
if (externalId.isPresent()) {
return externalId.get();
} else {
+ // If we don't construct an external ID here (which seems pointless), an exception will be thrown (which is worse; see IDETECT-1974)
StringDependencyId stringDependencyId = (StringDependencyId) dependencyId;
logger.warn(String.format("Missing yarn dependency. Dependency '%s' is missing from %s.", stringDependencyId.getValue(), yarnLockResult.getYarnLockFilePath()));
return externalIdFactory.createNameVersionExternalId(Forge.NPMJS, stringDependencyId.getValue());
