This rule is defined by the following XPath expression:
//AllocationExpression[ClassOrInterfaceType[@Image="BigDecimal"] and ./Arguments/ArgumentList /Expression/PrimaryExpression/PrimaryPrefix/Literal[(not (ends-with (@Image,'"'))) and contains(@Image,".")]]
Example:
import java.math.BigDecimal; public class Test { public static void main(String[] args) { // this would trigger the rule BigDecimal bd=new BigDecimal(1.123); // this wouldn't trigger the rule BigDecimal bd=new BigDecimal("1.123"); // this wouldn't trigger the rule BigDecimal bd=new BigDecimal(12); } }