openjdk team mailing list archive
-
openjdk team
-
Mailing list archive
-
Message #10722
Bug#775044: openjdk-7: FTBFS: java.lang.RuntimeException: time is more than 10 years from present: 1104530400000
Daniel Schepler wrote:
Version: 7u71-2.5.3-2
This isn't limited to the testing/unstable version of openjdk-7. I just
encountered it with while merging the raspbian changes into wheezy's
openjdk-6 and I strongly suspect it affects all versions of openjdk-6
and openjdk-7 in all releases of Debian.
Moritz Mühlenhoff write:
Patch attached, this fixes the build for me.
What concerns me is that while this fixes this particular case it
doesn't fix the root cause. Basically it appears that any currency which
has a transition rule also has a timebomb 10 years after the transition
date and it appears there are at least a couple more timebombs set to go
off in the not too distant future.
Personally I would rather see the timebomb code removed/disabled. I do
not belive Debian should knowingly be shipping timebombed code.
I have just prepared a patch against wheezy's openjdk-6 to disable the
timebomb code. I have attatched this patch which I am currently in the
process of testing.
Theres also the issue that new transitions don't seem to have been
getting added to the file. I'm not sure how critical this is because I
don't know how much software uses the data in question.
--- openjdk-ecj/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java 2014-10-08 15:35:08.000000000 +0000
+++ openjdk/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java 2015-01-16 20:04:19.000000000 +0000
@@ -281,9 +281,9 @@
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);
- }
+ //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);
Follow ups