aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/java.scm3
-rw-r--r--gnu/packages/patches/openjdk-currency-time-bomb2.patch13
3 files changed, 16 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 5850736700..0fcac73d4c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1744,6 +1744,7 @@ dist_patch_DATA = \
%D%/packages/patches/openbox-python3.patch \
%D%/packages/patches/opencolorio-fix-build-with-gcc11.patch \
%D%/packages/patches/openjdk-currency-time-bomb.patch \
+ %D%/packages/patches/openjdk-currency-time-bomb2.patch \
%D%/packages/patches/openjdk-9-pointer-comparison.patch \
%D%/packages/patches/openjdk-9-setsignalhandler.patch \
%D%/packages/patches/openjdk-10-idlj-reproducibility.patch \
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index ea30ce10d1..4993988696 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -1154,7 +1154,8 @@ new Date();"))
(patches (search-patches
"openjdk-10-idlj-reproducibility.patch"
"openjdk-10-pointer-comparison.patch"
- "openjdk-10-setsignalhandler.patch"))))
+ "openjdk-10-setsignalhandler.patch"
+ "openjdk-currency-time-bomb2.patch"))))
(arguments
(substitute-keyword-arguments (package-arguments openjdk9)
((#:phases phases)
diff --git a/gnu/packages/patches/openjdk-currency-time-bomb2.patch b/gnu/packages/patches/openjdk-currency-time-bomb2.patch
new file mode 100644
index 0000000000..d2ea04d63b
--- /dev/null
+++ b/gnu/packages/patches/openjdk-currency-time-bomb2.patch
@@ -0,0 +1,13 @@
+Fix a time bomb present in the OpenJDK tools.
+
+--- a/make/jdk/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java
++++ b/make/jdk/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java
+@@ -285,7 +285,7 @@ public class GenerateCurrencyData {
+ 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);
++ System.err.println("note: time is more than 10 years from \"present\": " + time);
+ }
+ specialCaseCutOverTimes[specialCaseCount] = time;
+ specialCaseOldCurrencies[specialCaseCount] = oldCurrency;