diff options
author | jperkin <jperkin@pkgsrc.org> | 2015-01-06 11:19:19 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2015-01-06 11:19:19 +0000 |
commit | 9263c8f7f137e1c0c2a2a39b8d4924fee6f5c261 (patch) | |
tree | cc8cd174f1dcd2a2399b59fdc647bd3c17f95c19 /lang/openjdk7/patches | |
parent | 96b845d200e3418a254168564dd20b7046f9afcd (diff) | |
download | pkgsrc-9263c8f7f137e1c0c2a2a39b8d4924fee6f5c261.tar.gz |
Extend valid currency data to 15 years to avoid lag in upstream updates,
fixes current problems with the Turkish data which expired at the end of
last year.
Diffstat (limited to 'lang/openjdk7/patches')
-rw-r--r-- | lang/openjdk7/patches/patch-jdk_make_tools_src_build_tools_generatecurrencydata_GenerateCurrencyData.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lang/openjdk7/patches/patch-jdk_make_tools_src_build_tools_generatecurrencydata_GenerateCurrencyData.java b/lang/openjdk7/patches/patch-jdk_make_tools_src_build_tools_generatecurrencydata_GenerateCurrencyData.java new file mode 100644 index 00000000000..4412b5e09f2 --- /dev/null +++ b/lang/openjdk7/patches/patch-jdk_make_tools_src_build_tools_generatecurrencydata_GenerateCurrencyData.java @@ -0,0 +1,17 @@ +$NetBSD: patch-jdk_make_tools_src_build_tools_generatecurrencydata_GenerateCurrencyData.java,v 1.1 2015/01/06 11:19:19 jperkin Exp $ + +Extend valid currency data to 15 years to avoid lag in upstream updates. + +--- jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java.orig 2014-11-02 07:18:20.000000000 +0000 ++++ jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java +@@ -281,8 +281,8 @@ public class GenerateCurrencyData { + 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) 15) * 365 * 24 * 60 * 60 * 1000) { ++ throw new RuntimeException("time is more than 15 years from present: " + time); + } + specialCaseCutOverTimes[specialCaseCount] = time; + specialCaseOldCurrencies[specialCaseCount] = oldCurrency; |