mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: openjdk9: 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 (openjdk9)[source]: Add patch.
* gnu/packages/patches/openjdk-currency-time-bomb.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
Change-Id: I45ca1fe5bad922307eba64d46a330a8f233c0f55
This commit is contained in:
parent
6c453e04b8
commit
db7488a7fb
3 changed files with 17 additions and 2 deletions
13
gnu/packages/patches/openjdk-currency-time-bomb.patch
Normal file
13
gnu/packages/patches/openjdk-currency-time-bomb.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
Fix a time bomb present in the OpenJDK tools.
|
||||
|
||||
--- a/jdk/make/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java
|
||||
+++ b/jdk/make/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…
Add table
Add a link
Reference in a new issue