Skip to content

Commit

Permalink
Remove unnecessary warning
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
goneall committed Jan 7, 2025
1 parent e02c365 commit ca634e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/org/spdx/library/ModelCopyManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,10 @@ private String sourceUriToObjectUri(String sourceUri, IdType idType, IModelStore
}
if (Objects.isNull(toNamespace) || toNamespace.isEmpty() ||
sourceUri.startsWith(toNamespace)) {
logger.warn("{} already exists - possibly overwriting properties due to a copy from a different model store.", sourceUri);
if (!sourceUri.startsWith("https://spdx.org")) {
// It is not a pre-defined SPDX URI
logger.warn("{} already exists - possibly overwriting properties due to a copy from a different model store.", sourceUri);
}
return sourceUri;
}
switch (idType) {
Expand Down

0 comments on commit ca634e6

Please sign in to comment.