Skip to contentSkip to conversation

Remove currency generation data expiration date

PATCH New Alex Gonzalez 1 participant 3 messages Dec 31, 2014

lore
Share & tools
lore
#0 lore raw

cover Remove currency generation data expiration date

The currency generation class makes a 10 year time expiration check which is now expired. Hence, packages that use it to build are failing.

This commit removes the date expiration check as for embedded system we don't want a system to have an expiration date for building.

Alex Gonzalez (2):
icedtea: openjdk: Remove currency data generation expiration date.
openjdk: Remove currency data generation expiration date.

 ...njdk-remove-currency-data-generation-expi.patch | 25 ++++++++++++++++++++++
 recipes-core/icedtea/icedtea6-native_1.8.11.bb     |  1 +
 ...njdk-remove-currency-data-generation-expi.patch | 25 ++++++++++++++++++++++
 recipes-core/openjdk/openjdk-7-release-25b30.inc   |  2 ++
 4 files changed, 53 insertions(+)
 create mode 100644 recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-openjdk-remove-currency-data-generation-expi.patch
 create mode 100644 recipes-core/openjdk/openjdk-7-25b30/icedtea-openjdk-remove-currency-data-generation-expi.patch
#1 lore raw

PATCH 1/2 icedtea: openjdk: Remove currency data generation expiration date.

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.

---
 ...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
recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-openjdk-remove-currency-data-generation-expi.patch new file +25 -0
new file mode 100644
index 000000000000..eabee677fe0e
@@ -0,0 +1,25 @@
+From 5f5ed54f7f1ed82583f0f42abfa2625a93e96dd9 Mon Sep 17 00:00:00 2001
+From: Alex Gonzalez <[email protected]>
+Date: Wed, 31 Dec 2014 15:04:10 +0100
+Subject: [PATCH] icedtea: openjdk: remove currency data generation expiration
+ date.
+
+Signed-off-by: Alex Gonzalez <[email protected]>
+---
+ .../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);
recipes-core/icedtea/icedtea6-native_1.8.11.bb +1 -0
index 8ed3559be1ee..4b583174a41d 100644
@@ -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"
#2 lore raw

PATCH 2/2 openjdk: Remove currency data generation expiration date.

In reply to Alex Gonzalez

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.

---
 ...njdk-remove-currency-data-generation-expi.patch | 25 ++++++++++++++++++++++
 recipes-core/openjdk/openjdk-7-release-25b30.inc   |  2 ++
 2 files changed, 27 insertions(+)
 create mode 100644 recipes-core/openjdk/openjdk-7-25b30/icedtea-openjdk-remove-currency-data-generation-expi.patch
recipes-core/openjdk/openjdk-7-25b30/icedtea-openjdk-remove-currency-data-generation-expi.patch new file +25 -0
new file mode 100644
index 000000000000..6dd36af54df2
@@ -0,0 +1,25 @@
+From 7df2fd1014a0c31f518be4f6a0018533f469d584 Mon Sep 17 00:00:00 2001
+From: Alex Gonzalez <[email protected]>
+Date: Wed, 31 Dec 2014 16:07:32 +0100
+Subject: [PATCH] icedtea: openjdk: remove currency data generation expiration
+ date
+
+Signed-off-by: Alex Gonzalez <[email protected]>
+---
+ .../src/build/tools/generatecurrencydata/GenerateCurrencyData.java     | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git openjdk/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java openjdk/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java
+index bf335fa22c1d..0e421360fef9 100644
+--- openjdk/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java
++++ openjdk/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);
recipes-core/openjdk/openjdk-7-release-25b30.inc +2 -0
index ccb638168b65..3b7d84e76ba2 100644
@@ -80,6 +80,7 @@ ICEDTEAPATCHES = "\
         file://icedtea-zero-hotspotfix.patch;apply=no \
 	file://icedtea-jdk-nio-use-host-cc.patch;apply=no \
         file://icedtea-unset-NIO_PLATFORM_CLASSES_ROOT_DIR.patch;apply=no \
+        file://icedtea-openjdk-remove-currency-data-generation-expi.patch;apply=no \
 	"
 ICEDTEAPATCHES_append_powerpc = " \
 	file://icedtea-jdk-ppc64-jvm-cfg.patch;apply=no \
@@ -110,6 +111,7 @@ DISTRIBUTION_PATCHES = "\
         patches/icedtea-zero-hotspotfix.patch \
 	patches/icedtea-jdk-nio-use-host-cc.patch \
 	patches/icedtea-unset-NIO_PLATFORM_CLASSES_ROOT_DIR.patch \
+	patches/icedtea-openjdk-remove-currency-data-generation-expi.patch \
 	"
 
 DISTRIBUTION_PATCHES_append_libc-uclibc = "\