[oe] [meta-java][PATCH 1/2] icedtea: openjdk: Remove currency data generation expiration date.

Alex Gonzalez alex.gonzalez at digi.com
Wed Dec 31 15:24:45 UTC 2014


The currency data generation class makes a 10 years expiration date check.

It might be reasonable to make sure the input data is updated
periodically, but on an embedded system we don't want to have this type of
built in time expirations.

This commit removes the date expiration check.

Signed-off-by: Alex Gonzalez <alex.gonzalez at digi.com>
---
 ...njdk-remove-currency-data-generation-expi.patch | 25 ++++++++++++++++++++++
 recipes-core/icedtea/icedtea6-native_1.8.11.bb     |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-openjdk-remove-currency-data-generation-expi.patch

diff --git a/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-openjdk-remove-currency-data-generation-expi.patch b/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-openjdk-remove-currency-data-generation-expi.patch
new file mode 100644
index 000000000000..eabee677fe0e
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-openjdk-remove-currency-data-generation-expi.patch
@@ -0,0 +1,25 @@
+From 5f5ed54f7f1ed82583f0f42abfa2625a93e96dd9 Mon Sep 17 00:00:00 2001
+From: Alex Gonzalez <alex.gonzalez at digi.com>
+Date: Wed, 31 Dec 2014 15:04:10 +0100
+Subject: [PATCH] icedtea: openjdk: remove currency data generation expiration
+ date.
+
+Signed-off-by: Alex Gonzalez <alex.gonzalez at digi.com>
+---
+ .../src/build/tools/generatecurrencydata/GenerateCurrencyData.java     | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java b/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java
+index 29201c25909a..f66f523de5bd 100644
+--- a/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java
++++ b/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java
+@@ -281,9 +281,6 @@ 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);
+-            }
+             specialCaseCutOverTimes[specialCaseCount] = time;
+             specialCaseOldCurrencies[specialCaseCount] = oldCurrency;
+             specialCaseOldCurrenciesDefaultFractionDigits[specialCaseCount] = getDefaultFractionDigits(oldCurrency);
diff --git a/recipes-core/icedtea/icedtea6-native_1.8.11.bb b/recipes-core/icedtea/icedtea6-native_1.8.11.bb
index 8ed3559be1ee..4b583174a41d 100644
--- a/recipes-core/icedtea/icedtea6-native_1.8.11.bb
+++ b/recipes-core/icedtea/icedtea6-native_1.8.11.bb
@@ -18,6 +18,7 @@ SRC_URI = "\
 	file://build-hacks-native.patch \
 	file://icedtea-sane-x86-arch-name.patch \
         file://icedtea-fix-jar-path.patch \
+        file://icedtea-openjdk-remove-currency-data-generation-expi.patch;patchdir=../openjdk-src-dir \
 	${ICEDTEA_PATCHES} \
 	"
 SRC_URI[ojdk.md5sum] = "94db01691ab38f98b7d42b2ebf4d5c0b"



More information about the Openembedded-devel mailing list