RFR: JDK-8193877- DateTimeFormatterBuilder throws ClassCastException when using padding
Pallavi Sonal
pallavi.sonal at oracle.com
Wed Apr 18 12:41:51 UTC 2018
Hi,
Please review the changes to the following issue:
Bug : https://bugs.openjdk.java.net/browse/JDK-8193877
The proposed fix is located at:
Webrev : http://cr.openjdk.java.net/~rpatil/8193877/webrev.00/
When padding is used in a pattern where there are unpadded values adjacent to padded ones (like "pdQ") , the previous PrinterParser (used for parsing 'd' in the example ) is fetched to use its settings for parsing the next value('Q' in the example). But , in cases like this , it is a PadPrinterDecoratorParser instead of an assumed NumberPrinterParser and a ClassCastException is thrown.
The fix has been done to check such cases where the previous parserprinter is PadPrinterDecoratorParser and use the new NumberPrinterParser instead for parsing the next value.
All the tier1 and tier2 Mach 5 tests have passed.
Thanks,
Pallavi Sonal
More information about the core-libs-dev
mailing list