Hi,
Il giorno ven, 18/01/2007 alle 21.20 UTC, Mario Torre ha scritto:
> Sadly this class continue to be not trivial... I think there are other
> problems in the parsers that your patch exposed:
>
> FAIL: gnu.testlet.java.text.DecimalFormat.parse: pattern #,##0.00
> (number 2)
> got 3 but expected 3110
The wrong part of my patch is this.
- break;
- }
+ {
+ i--;
+ break;
+ }
+ }
+ else <-----
+ { <-----
+ i--; <-----
+ break; <-----
+ } <-----
With this "else", the parsing breaks at the character ',' which is
used in the format such as "#,##0.00".
But without this "else", the parsing goes on ignoring any invalid
characters.