File commons-validator-1.5.0-locale.patch of Package apache-commons-validator

--- commons-validator-1.5.0-src/build.xml	2015-11-19 00:52:34.000000000 +0100
+++ commons-validator-1.5.0-src/build.xml	2018-12-21 14:54:10.838397098 +0100
@@ -109,6 +109,23 @@
   <!-- Download lib dir -->
   <property name="download.lib.dir"        value="lib"/>
 
+<!-- ========== Test Java Version ========================================= -->
+
+  <condition property="isJava9">
+    <not>
+      <or>
+        <equals arg1="${ant.java.version}" arg2="1.1"/>
+        <equals arg1="${ant.java.version}" arg2="1.2"/>
+        <equals arg1="${ant.java.version}" arg2="1.3"/>
+        <equals arg1="${ant.java.version}" arg2="1.4"/>
+        <equals arg1="${ant.java.version}" arg2="1.5"/>
+        <equals arg1="${ant.java.version}" arg2="1.6"/>
+        <equals arg1="${ant.java.version}" arg2="1.7"/>
+        <equals arg1="${ant.java.version}" arg2="1.8"/>
+      </or>
+    </not>
+  </condition>
+
 <!-- ========== Compiler Defaults ========================================= -->
 
 
@@ -323,7 +340,7 @@
   </target>
 
 
-  <target name="test"  depends="compile.tests,test.main,test.checkdigit,test.routines"
+  <target name="test"  depends="compile.tests,test.main,test.checkdigit,test.routines,test.routines.java9"
    description="Run all unit test cases">
   </target>
 
@@ -364,7 +381,25 @@
   </target>
 
   <target name="test.routines"  depends="compile.tests"
-   description="Run routines unit test cases">
+   description="Run routines unit test cases" unless="isJava9">
+    <echo message="Running routines tests ..."/>
+
+    <junit fork="yes" forkmode="once" printsummary="yes" 
+           haltonfailure="${test.failonerror}" 
+           failureproperty="main.test.failed" showoutput="true">
+      <classpath refid="test.classpath"/>
+      <formatter type="plain"/>
+      <batchtest todir="${test.results.dir}">
+         <fileset dir="${test.home}/java">
+           <include name="org/apache/commons/validator/routines/*Test.java" />
+           <exclude name="**/Abstract*Test.java" />
+         </fileset>
+      </batchtest>
+    </junit>
+  </target>
+
+  <target name="test.routines.java9"  depends="compile.tests"
+   description="Run routines unit test cases with Java 9+" if="isJava9">
     <echo message="Running routines tests ..."/>
 
     <junit fork="yes" forkmode="once" printsummary="yes" 
@@ -372,6 +407,7 @@
            failureproperty="main.test.failed" showoutput="true">
       <classpath refid="test.classpath"/>
       <formatter type="plain"/>
+      <sysproperty key="java.locale.providers" value="COMPAT,SPI"/>
       <batchtest todir="${test.results.dir}">
          <fileset dir="${test.home}/java">
            <include name="org/apache/commons/validator/routines/*Test.java" />