Only adding non blank names
@@ -77,9 +77,11 @@ public class CodeLocationNameProvider3 extends CodeLocationNameProvider {
}
if (null != additionalNamePieces && !additionalNamePieces.isEmpty()) {
for (final String additionalNamePiece : additionalNamePieces) {
+ if (StringUtils.isNotBlank(additionalNamePiece)) {
name = String.format("%s/%s", name, additionalNamePiece);
}
}
+ }
if (StringUtils.isNotBlank(suffix)) {
name = String.format("%s/%s", name, suffix);
}
@@ -103,9 +105,11 @@ public class CodeLocationNameProvider3 extends CodeLocationNameProvider {
final List<String> shortenedAdditionalNamePieces = new ArrayList<>();
if (null != additionalNamePieces && !additionalNamePieces.isEmpty()) {
for (final String additionalNamePiece : additionalNamePieces) {
+ if (StringUtils.isNotBlank(additionalNamePiece)) {
shortenedAdditionalNamePieces.add(shortenPiece(additionalNamePiece));
}
}
+ }
return createCommonName(shortenedPathPiece, shortenedProjectName, shortenedProjectVersionName, shortenedPrefix, shortenedSuffix, codeLocationType, bomToolType, shortenedAdditionalNamePieces);
}
