Topic
  • 3 replies
  • Latest Post - ‏2012-12-01T04:27:18Z by m.nishino
m.nishino
m.nishino
4 Posts

Pinned topic BigDecimal

‏2012-11-22T03:36:32Z |
Hi,
The rule for detecting places to use BigDecimal#toPlainString() explicitly seems very rough.
Here's a sample:

public class Test{
private BigDecimal b0;
public void func(BigDecimal b){
BigDecimal b1=b; // (A)
this.b0=b; // (B)
String s1=""+b; // (C)
String s2=b+""; // (D)
String s3=""+b.toPlainString(); // (E)
Object o1=""+b; // (F)
Object o2=b+""; // (G)
func2(b); // (H)
}
public void func2(BigDecimal b){
System.out.println(b.toPlainString());
}
}

C, D, F, G are detected. E is not. These are OK. However, the rule also complains on A, B and H.
As a result, in real applications, too much noise are detected.
Can't it be better?

I'm using v2v_v3.5.0.
Updated on 2012-12-01T04:27:18Z at 2012-12-01T04:27:18Z by m.nishino
  • SystemAdmin
    SystemAdmin
    102 Posts

    Re: BigDecimal

    ‏2012-11-26T13:53:22Z  
    Hello, Thanks for you post. We have observed the behavior you describe. It will be corrected in the next release, version 3.5.1, which will be available soon.
  • SystemAdmin
    SystemAdmin
    102 Posts

    Re: BigDecimal

    ‏2012-11-30T14:31:09Z  
    Hi, Version 3.5.1 is now available. The problems you observed with BigDecimal are corrected. Thanks.
  • m.nishino
    m.nishino
    4 Posts

    Re: BigDecimal

    ‏2012-12-01T04:27:18Z  
    Hi, Version 3.5.1 is now available. The problems you observed with BigDecimal are corrected. Thanks.
    Great! It's working as expected.
    Thank you.