Money.equals currently calls getNumberStripped on the receiver and the
argument to compare two BigDecimals for equality. This ends up calling
stripTrailingZeros for both BigDecimals.
The same can be achieved without allocations using
BigDecimal.compareTo.
Money.equals currently calls getNumberStripped on the receiver and the argument to compare two BigDecimals for equality. This ends up calling stripTrailingZeros for both BigDecimals. The same can be achieved without allocations using BigDecimal.compareTo.
This change is