commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary D. Gregory (Jira)" <j...@apache.org>
Subject [jira] [Updated] (CONFIGURATION-766) BigDecimal(double) should not be used
Date Tue, 29 Oct 2019 13:38:00 GMT

     [ https://issues.apache.org/jira/browse/CONFIGURATION-766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gary D. Gregory updated CONFIGURATION-766:
------------------------------------------
     External issue ID: 37
    External issue URL: https://github.com/apache/commons-configuration/pull/37

> BigDecimal(double) should not be used
> -------------------------------------
>
>                 Key: CONFIGURATION-766
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-766
>             Project: Commons Configuration
>          Issue Type: Bug
>         Environment: A single occurrence in file PropertyConverter.java, line 393:
> {code:java}
> return new BigDecimal(n.doubleValue());
> {code}
>            Reporter: Haris Adzemovic
>            Priority: Minor
>
> Static analysis with SonarQube shows a violation of ruleĀ [S2111|[https://rules.sonarsource.com/java/type/Bug/RSPEC-2111]]
- a dangerous use of the BigDecimal constructor.
> Fixed by using BigDecimal.valueOf(param) instead.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message