mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
gnu: openjdk10: Fix time bomb in ‘GenerateCurrencyData.java’.
Fixes <https://issues.guix.gnu.org/68333>, as well.
This is a companion to commit 5c0f77f424
.
* 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
This commit is contained in:
parent
a252ab6f88
commit
fc891f004a
3 changed files with 16 additions and 1 deletions
|
@ -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 \
|
||||
|
|
|
@ -1154,7 +1154,8 @@ (define-public openjdk10
|
|||
(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)
|
||||
|
|
13
gnu/packages/patches/openjdk-currency-time-bomb2.patch
Normal file
13
gnu/packages/patches/openjdk-currency-time-bomb2.patch
Normal file
|
@ -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;
|
Loading…
Reference in a new issue