deepsourcestatus / test-repository

BigDecimal constructed from double may be imprecise JAVA-W0008
Bug risk
Major
3 occurrences in this check
BigDecimal value passed to method put constructed from double valued expression result may be imprecise
42    BigDecimal b = new BigDecimal(44.32);
43    hm.put("f", new BigDecimal(3.1));
44    hm.put("f", new BigDecimal(ConfigData.ds()));
45    hm.put("a", new BigDecimal(getThis().getThing()));46
47    synchronized (hm) {
48    }
BigDecimal value passed to method put constructed from double value 3.1 may be imprecise
40    HashMap<String, BigDecimal> hm = new HashMap<>();
41
42    BigDecimal b = new BigDecimal(44.32);
43    hm.put("f", new BigDecimal(3.1));44    hm.put("f", new BigDecimal(ConfigData.ds()));
45    hm.put("a", new BigDecimal(getThis().getThing()));
46
BigDecimal value b constructed from double value 44.32 may be imprecise
39
40    HashMap<String, BigDecimal> hm = new HashMap<>();
41
42    BigDecimal b = new BigDecimal(44.32);43    hm.put("f", new BigDecimal(3.1));
44    hm.put("f", new BigDecimal(ConfigData.ds()));
45    hm.put("a", new BigDecimal(getThis().getThing()));