Skip to content

Commit

Permalink
add carets
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Fiddian-Green <[email protected]>
  • Loading branch information
andrewfg committed Jan 22, 2025
1 parent 05ceabe commit 5b60850
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public State calculate(@Nullable Set<Item> items) {
List<QuantityType> referenceUnitQuantities = referenceUnitQuantityTypes(items);
if (!referenceUnitQuantities.isEmpty()) {
return referenceUnitQuantities.stream()
.reduce(new QuantityType(0, referenceUnit), QuantityType::add)
.reduce(new QuantityType<>(0, referenceUnit), QuantityType::add)
.divide(BigDecimal.valueOf(referenceUnitQuantities.size()));
}
}
Expand Down Expand Up @@ -159,7 +159,7 @@ public State calculate(@Nullable Set<Item> items) {
if (items != null) {
List<QuantityType> referenceUnitQuantities = referenceUnitQuantityTypes(items);
if (!referenceUnitQuantities.isEmpty()) {
return referenceUnitQuantities.stream().reduce(new QuantityType(0, referenceUnit),
return referenceUnitQuantities.stream().reduce(new QuantityType<>(0, referenceUnit),
QuantityType::add);
}
}
Expand Down

0 comments on commit 5b60850

Please sign in to comment.