changeset 7878:cc9469a82088 jdk7u75-b31

8068405: GenerateCurrencyData throws RuntimeException for old data Reviewed-by: naoto
author robm
date Mon, 05 Jan 2015 11:41:17 -0800
parents fe2318e110e1
children 82b308867300
files make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java src/share/classes/java/util/CurrencyData.properties
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java	Mon Dec 29 11:42:21 2014 -0800
+++ b/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java	Mon Jan 05 11:41:17 2015 -0800
@@ -281,8 +281,8 @@
             checkCurrencyCode(newCurrency);
             String timeString = currencyInfo.substring(4, length - 4);
             long time = format.parse(timeString).getTime();
-            if (Math.abs(time - System.currentTimeMillis()) > ((long) 10) * 365 * 24 * 60 * 60 * 1000) {
-                throw new RuntimeException("time is more than 10 years from present: " + time);
+            if (Math.abs(time - System.currentTimeMillis()) > ((long) 20) * 365 * 24 * 60 * 60 * 1000) {
+                throw new RuntimeException("time is more than 10 years from present: " + time + " " + timeString + " " + currencyInfo);
             }
             specialCaseCutOverTimes[specialCaseCount] = time;
             specialCaseOldCurrencies[specialCaseCount] = oldCurrency;
--- a/src/share/classes/java/util/CurrencyData.properties	Mon Dec 29 11:42:21 2014 -0800
+++ b/src/share/classes/java/util/CurrencyData.properties	Mon Jan 05 11:41:17 2015 -0800
@@ -532,7 +532,7 @@
 # TUNISIA
 TN=TND
 # TURKEY
-TR=TRL;2004-12-31-22-00-00;TRY
+TR=TRY
 # TURKMENISTAN
 TM=TMT
 # TURKS AND CAICOS ISLANDS