Menu

#1187 double variable with AvoidDecimalLiteralsInBigDecimalConstructor

PMD-5.1.3
closed
None
PMD
3-Major
Bug
2015-03-02
2014-04-16
No

Hi,

why this is not flagged as a violation?

double d = 0.1;
new BigDecimal(d);

Discussion

  • Andreas Dangel

    Andreas Dangel - 2014-08-14
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -2,5 +2,7 @@
    
     why this is not flagged as a violation?
    
    -# double d = 0.1;
    -# new BigDecimal(d);
    +~~~~~
    +double d = 0.1;
    +new BigDecimal(d);
    +~~~~~
    
    • status: open --> closed
    • assigned_to: Andreas Dangel
    • Milestone: New Tickets --> PMD-next
     
  • Andreas Dangel

    Andreas Dangel - 2014-08-14

    This will be fixed with the next release.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.