Commit fed2e4e3 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Fixed GenerateCurrencyData in openjdk9

parent bf462e8b
......@@ -32,6 +32,7 @@ build-9:
mkdir -pv jdk9u-jdk-9.0.4+12/$${subproject} ; \
tar -xf jdk/9.0.4+12/$${subproject}.tar.bz2 --strip-components=1 -C jdk9u-jdk-9.0.4+12/$${subproject} ; \
done
patch -Np1 -d jdk9u-jdk-9.0.4+12 < jdk9u-jdk-9.0.4+12-fix_GenerateCurrencyData.patch
cd jdk9u-jdk-9.0.4+12 && PATH=/build/usr/bin:$$PATH bash configure --enable-unlimited-crypto --disable-warnings-as-errors --with-stdc++lib=dynamic --with-giflib=system --with-lcms=system --with-libjpeg=system --with-libpng=system --with-zlib=system --with-version-build="12" --with-version-pre="" --with-version-opt=""
PATH=/build/usr/bin:$$PATH $(MAKE) -C jdk9u-jdk-9.0.4+12 images
mkdir -p /opt/jdk-9.0.4+12
......
diff -uNr jdk9u-jdk-9.0.4+12/jdk/make/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java jdk9u-jdk-9.0.4+12-fix_GenerateCurrencyData/jdk/make/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java
--- jdk9u-jdk-9.0.4+12/jdk/make/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java 2018-01-13 12:37:38.000000000 +1030
+++ jdk9u-jdk-9.0.4+12-fix_GenerateCurrencyData/jdk/make/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java 2024-01-21 21:10:57.481077478 +1030
@@ -284,8 +284,8 @@
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) 20) * 365 * 24 * 60 * 60 * 1000) {
+ throw new RuntimeException("time is more than 20 years from present: " + time);
}
specialCaseCutOverTimes[specialCaseCount] = time;
specialCaseOldCurrencies[specialCaseCount] = oldCurrency;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment