Sorry if you get this twice, I forgot to compress the class, mailman complaints.. -------
Hi all! I've added a few fixes on my DecimalFormat implementation. The class is now complete for 1.5 and I would like to take it into the next classpath version, even though it misses a couple of little things in functionality. This class will probably be replace by the ICU4J classes or merged with the ones of the JDK if and when appropriate, but for now this is a cleanroom implementation and the best one we have (and still, there is lot of work to do on it...). I want to improve the parser code, as it is still a bit of a mess, but when I started this class I had no idea about the internals of DecimalFormat. It passes all the mauve tests, except few minor ones, the only real stopper could be this case: apply (harness, df, "##0.####E0"); harness.check (df.format (12345), "12.345E3"); fails with this result: FAIL: gnu.testlet.java.text.DecimalFormat.formatExp: pattern ##.###E0 (number 1) got 1.234E4 but expected 1.2345E4 As you can see, it misses the last digit. I believe this is a corner case, so I would not mind right now for that (though it is clearly wrong, as the pattern ask for 3 digits after the dot, they have to be present if the result is nonzero.) For the formatToCharacterIterator stuff I got some hints from the ICU4J class, this is stated on top of the file, and is the only method I did not wrote by myself. And I have to say that this is also pretty straightforward, but still it gave me clues about what to do. Is this ok? Last but not least, I've also fixed a couple of mauve tests, I will commit them as soon as I finish another test I'm writing that I want to commit too. I wait for comments!! Mario -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/
2006-11-22-DecimalFormat_rc6.patch.tar.gz
Description: application/compressed-tar