From fc891f004aff40e34c23fc101aeea5d05e7555ae Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 10 Jan 2024 22:09:49 +0100 Subject: gnu: openjdk10: Fix time bomb in ‘GenerateCurrencyData.java’. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes , as well. This is a companion to commit 5c0f77f4241c9beac0c82deae946bfdc70b49ff0. * gnu/packages/java.scm (openjdk10)[source]: Add patch. * gnu/packages/patches/openjdk-currency-time-bomb2.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Change-Id: I42fc14d305883f672cd6764a0ee6462852e41a5b --- gnu/packages/patches/openjdk-currency-time-bomb2.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 gnu/packages/patches/openjdk-currency-time-bomb2.patch (limited to 'gnu/packages/patches') 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; -- cgit v1.2.3