Skip to content

Commit

Permalink
Use BigDecimal#add(java.math.BigDecimal, java.math.MathContext) #532
Browse files Browse the repository at this point in the history
  • Loading branch information
rexim committed Jan 26, 2018
1 parent f07e6e3 commit 6dc8535
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/cactoos/scalar/AvgOf.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public AvgOf(final Iterable<Scalar<Number>> src) {
len -> len > 0,
len -> new Reduced<>(
BigDecimal.ZERO,
BigDecimal::add,
(sum, value) -> sum.add(value, MathContext.DECIMAL128),
new Mapped<>(
number -> BigDecimal.valueOf(
number.value().doubleValue()
Expand Down

0 comments on commit 6dc8535

Please sign in to comment.