• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zalando / jackson-datatype-money / #2246

pending completion
#2246

push

web-flow
Bump maven-compiler-plugin from 3.10.1 to 3.11.0 (#437)

Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.10.1 to 3.11.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.10.1...maven-compiler-plugin-3.11.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

142 of 142 relevant lines covered (100.0%)

1.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/main/java/org/zalando/jackson/datatype/money/DecimalAmountWriter.java
1
package org.zalando.jackson.datatype.money;
2

3
import javax.annotation.Nonnull;
4
import javax.money.MonetaryAmount;
5
import java.math.BigDecimal;
6
import java.math.RoundingMode;
7

8
final class DecimalAmountWriter implements BigDecimalAmountWriter {
1✔
9

10
    @Override
11
    public BigDecimal write(@Nonnull final MonetaryAmount amount) {
12
        final BigDecimal decimal = amount.getNumber().numberValueExact(BigDecimal.class);
1✔
13
        final int defaultFractionDigits = amount.getCurrency().getDefaultFractionDigits();
1✔
14
        final int scale = Math.max(decimal.scale(), defaultFractionDigits);
1✔
15

16
        return decimal.setScale(scale, RoundingMode.UNNECESSARY);
1✔
17
    }
18

19
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc