Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): / ext-user (Asha K S)
Created: 01/08/2013
Components: Language
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: cf 10 / 286324
Priority/Frequency: Trivial / Unknown
Locale/System: English / Mac 10 All,Win XP All
Vote Count: 0
There are two places in CFNumberFormat where a BigInteger is being instantiated. My line numbers are probably a little off, (formatting) but they are in the method LsNumberFormat
BigInteger bigOne = new BigInteger("1");
Was replaced with
BigInteger bigOne = BigInteger.ONE;
Due to the PMD warning as follows:
Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN).
Don't create instances of already existing BigInteger (BigInteger.ZERO, BigInteger.ONE) and for 1.5 on, BigInteger.TEN and BigDecimal (BigDecimal.ZERO, BigDecimal.ONE, BigDecimal.TEN)
In OleDateTime there is an unnecessary return in the setDate() method. Not really a big deal, but it does not need to be there.
And finally, the FindBugs one was a little more interesting, and has a large impact in my opinion. In CFNumberFormat's LsNumberFormat method there is a part that looks like this:
if (bDecimal & numberDecimalPos != -1)
FindBugs, I believe rightly so, flags this as using a bitwise & instead of the && operator. I recommend changing it to this (emphasis added)
if (bDecimal && numberDecimalPos != -1)
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3447684
External Customer Info:
External Company:
External Customer Name:
External Customer Email:
Attachments:
Comments: