I started using Sonar recently in a project, and i got a PMD rule broken about using the constructor new BigDecimal(double val). When i read the java documentat
You would use the double constructor when the data you want to work with already exists as a double value. Having to convert it to a string before converting it to BigDecimal would be a wasteful in that case.