You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2018/08/26 11:41:31 UTC
svn commit: r1839199 - in /poi/trunk: build.gradle
src/testcases/org/apache/poi/ss/usermodel/TestExcelStyleDateFormatter.java
Author: centic
Date: Sun Aug 26 11:41:31 2018
New Revision: 1839199
URL: http://svn.apache.org/viewvc?rev=1839199&view=rev
Log:
Set locale provider to JRE,CLDR for tests to have compatible date formatting in JDK 9+
Modified:
poi/trunk/build.gradle
poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestExcelStyleDateFormatter.java
Modified: poi/trunk/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/build.gradle?rev=1839199&r1=1839198&r2=1839199&view=diff
==============================================================================
--- poi/trunk/build.gradle (original)
+++ poi/trunk/build.gradle Sun Aug 26 11:41:31 2018
@@ -138,6 +138,9 @@ subprojects {
systemProperties['user.dir'] = workingDir
systemProperties['POI.testdata.path'] = '../../test-data'
+
+ // this is necessary for JDK 9+ to keep formatting dates the same way as in previous JDK-versions
+ systemProperties['java.locale.providers'] = 'JRE,CLDR'
}
jacoco {
Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestExcelStyleDateFormatter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestExcelStyleDateFormatter.java?rev=1839199&r1=1839198&r2=1839199&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestExcelStyleDateFormatter.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestExcelStyleDateFormatter.java Sun Aug 26 11:41:31 2018
@@ -69,7 +69,8 @@ public class TestExcelStyleDateFormatter
new StringBuffer(),
new FieldPosition(java.text.DateFormat.MONTH_FIELD)).toString();
//System.err.println(result + " - " + getUnicode(result.charAt(0)));
- assertEquals("Failed for locale " + locale + " and date " + testDates.get(i) + ", having: " + result,
+ assertEquals("Failed for locale " + locale + ", provider: " + System.getProperty("java.locale.providers") +
+ " and date " + testDates.get(i) + ", having: " + result,
getUnicode(testMap.get(locale).get(i).charAt(0)), getUnicode(result.charAt(0)));
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org