Skip to content

Commit ca634e6

Browse files
committed
Remove unnecessary warning
With the introduction of standard creation infos in SPDX 3.0.1, we will be copying the same URIs to different model stores. This removes the warning when this occurs.
1 parent e02c365 commit ca634e6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/org/spdx/library/ModelCopyManager.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,10 @@ private String sourceUriToObjectUri(String sourceUri, IdType idType, IModelStore
448448
}
449449
if (Objects.isNull(toNamespace) || toNamespace.isEmpty() ||
450450
sourceUri.startsWith(toNamespace)) {
451-
logger.warn("{} already exists - possibly overwriting properties due to a copy from a different model store.", sourceUri);
451+
if (!sourceUri.startsWith("https://spdx.org")) {
452+
// It is not a pre-defined SPDX URI
453+
logger.warn("{} already exists - possibly overwriting properties due to a copy from a different model store.", sourceUri);
454+
}
452455
return sourceUri;
453456
}
454457
switch (idType) {

0 commit comments

Comments
 (0)