<i18n dev> hg: jdk8/tl/jdk: 7180362: RFE: Implement date cutover functionality for currency.properties file

Seán Coffey sean.coffey at oracle.com
Sat Sep 8 05:33:25 PDT 2012


On 08/09/2012 10:14, Alan Bateman wrote:
> On 07/09/2012 21:19, sean.coffey at oracle.com wrote:
>> Changeset: fffbb33df102
>> Author:    coffeys
>> Date:      2012-09-07 21:22 +0100
>> URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/fffbb33df102
>>
>> 7180362: RFE: Implement date cutover functionality for 
>> currency.properties file
>> Reviewed-by: naoto
>>
>> ! src/share/classes/java/util/Currency.java
>> ! test/java/util/Currency/PropertiesTest.java
>> ! test/java/util/Currency/PropertiesTest.sh
>> ! test/java/util/Currency/currency.properties
>>
> A post push comment but this looks very strange:
>
> private static boolean isPastCutoverDate(String s)
>        throws IndexOutOfBoundsException, NullPointerException, 
> ParseException {
>
> I assume this should declare ParseException only as the other two are 
> runtime exceptions.
good point Alan. I think a low priority bug can be logged to track this.
>
> Also shouldn't the parsing be made more robust so that 
> replaceCurrencyData doesn't need to catch and ignore IOOBE and NPE?
Looks like I should be checking for IAE rather than IOOBE. 
http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html#SimpleDateFormat(java.lang.String, 
java.util.Locale) 
<http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html#SimpleDateFormat%28java.lang.String,%20java.util.Locale%29>

I would never expect these exceptions to materialize (pattern checks 
syntax first) but figured that the multicatch block in 
replaceCurrencyData was suitable as a catch all since that's where we do 
most of the logging of INFO messages if we do encounter errors with 
currency.properties file.

There could be more bug fixes to Currency class in coming weeks & months 
for JDK8 - we can probably tidy this up then.

regards,
Sean.
>
> -Alan.
>
>
>
>
>
>
>



More information about the i18n-dev mailing list