Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Won't Fix
-
Affects Version/s: 1.6.3
-
Fix Version/s: None
-
Component/s: parser
-
Labels:None
-
Environment:suse linux enterprise 64 bit
-
Number of attachments :
Description
hi i just tried some groovy by following http://pleac.sourceforge.net/pleac_groovy/numbers.html
code:
import java.text.* int nb = 0 try { nb = NumberFormat.getInstance().parse('33.5') // '.5' will be ignored nb = NumberFormat.getInstance().parse('abc') } catch (ParseException ex) { assert ex.getMessage().contains('abc') } assert nb == 33
i get the error Caught: java.lang.AssertionError: Expression: (nb == 33). Values: nb = 335
and when i do println nb it gives me the value 335 !
i categorize this as blocker because it can block the whole system if youre working with floats castings
greeets umit