Skip to content

Commit

Permalink
chore(quality): [eclipse-tractusx#841] rename variable for better rea…
Browse files Browse the repository at this point in the history
…dability
  • Loading branch information
dsmf committed Jul 29, 2024
1 parent f0f30d0 commit 84aa7d9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ public ItemContainer process(final ItemContainer.ItemContainerBuilder itemContai

try {
final var dtrKeys = List.of(new DigitalTwinRegistryKey(itemId.getGlobalAssetId(), itemId.getBpn()));
final var eithers = digitalTwinRegistryService.fetchShells(dtrKeys);
final var shell = eithers.stream()
final var shells = digitalTwinRegistryService.fetchShells(dtrKeys);
final var shell = shells.stream()
// we use findFirst here, because we query only for one
// DigitalTwinRegistryKey here
.map(Either::getOrNull)
.filter(Objects::nonNull)
.findFirst()
.orElseThrow(() -> shellNotFound(eithers));
.orElseThrow(() -> shellNotFound(shells));

itemContainerBuilder.shell(
jobData.isAuditContractNegotiation() ? shell : shell.withoutContractAgreementId());
Expand Down

0 comments on commit 84aa7d9

Please sign in to comment.