File java8-compatibility.patch of Package icu4j
Description: Fixes the detection of the JDK to allow the compilation with Java 8.
Do not compile the ICUTaglet class which relies on internal JDK classes
no longer available in Java 8.
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
Index: icu4j-55.1/build.xml
===================================================================
--- icu4j-55.1.orig/build.xml
+++ icu4j-55.1/build.xml
@@ -87,6 +87,7 @@
<or>
<contains string="${java.version}" substring="1.7."/>
<contains string="${java.version}" substring="1.8."/>
+ <contains string="${java.version}" substring="1.9."/>
</or>
</condition>
Index: icu4j-55.1/tools/build/build.xml
===================================================================
--- icu4j-55.1.orig/tools/build/build.xml
+++ icu4j-55.1/tools/build/build.xml
@@ -21,7 +21,20 @@
<target name="clean" depends="@clean" description="Clean up the build outputs"/>
- <target name="compile" depends="@compile" description="Compile java source files"/>
+ <target name="compile" description="Compile java source files">
+ <mkdir dir="${bin.dir}"/>
+ <javac
+ srcdir="${src.dir}"
+ destdir="${bin.dir}"
+ classpathref="javac.classpathref"
+ source="${javac.source}"
+ target="${javac.target}"
+ encoding="${java.src.encoding}"
+ debug="${javac.debug}">
+ <compilerarg value="${javac.compilerarg}"/>
+ <exclude name="**/ICUTaglet*"/>
+ </javac>
+ </target>
<target name="copy" depends="@copy" description="Copy non-java runtime files to the project's binary directory"/>