Java
'BigDecimal' legacy method called
Warning
New
Last modified: 03 December 2024 Reports calls to BigDecimal.divide()
or BigDecimal.setScale()
that use integer constants to specify the rounding mode. Since JDK 1.5, consider using methods that take the RoundingMode
enum
parameter instead.
Example:
new BigDecimal("42").setScale(2, BigDecimal.ROUND_FLOOR);
After the quick-fix is applied:
new BigDecimal("42").setScale(2, RoundingMode.FLOOR);
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
BigDecimalLegacyMethod
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Java, 243.23126 |
Thanks for your feedback!
Was this page helpful?