Skip to content

Commit

Permalink
remove redundant check
Browse files Browse the repository at this point in the history
  • Loading branch information
ibaisismile committed Sep 27, 2024
1 parent c2c5bb8 commit 13dad66
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,8 @@ protected List<IDomainResource> getComponents(
Optional<KnowledgeArtifactAdapter> maybeArtifact =
VisitorHelper.tryGetLatestVersion(preReleaseReference, repository);
if (maybeArtifact.isPresent()) {
if (resourcesToUpdate.stream()
.noneMatch(rtu ->
rtu.getId().equals(maybeArtifact.get().getId().toString())
&& (rtu.getExtension().stream()
.anyMatch(ext -> ext.getUrl().equals(isOwnedUrl))))) {
if (resourcesToUpdate.stream().noneMatch(rtu -> rtu.getId()
.equals(maybeArtifact.get().getId().toString()))) {
resourcesToUpdate.add(maybeArtifact.get().get());
getComponents(maybeArtifact.get(), repository, resourcesToUpdate);
}
Expand Down

0 comments on commit 13dad66

Please sign in to comment.