Why S2129 - BigDecimal constructors are not the same as values

Hi here,

Sorry for the late answer

Thanks @stephenrpalmer for the meaningful concern and @agabrys for this good clarification!

I removed phrase about deprecation from S2129, it should be updated with next release of SonarJava. Also this ticket is created https://jira.sonarsource.com/browse/SONARJAVA-3031 to ignore BigDecimal(double) in S2129, so that only S2111 reports it.

I think these changes should make experience about this rule cleaner.

Regards,
Lena

3 Likes