aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2024-12-14 10:24:29 +0000
committerDominik Stadler <centic@apache.org>2024-12-14 10:24:29 +0000
commit1065c690046971619e0ecdf45a8d3a14eae2ab28 (patch)
treed85cdf30b9c7a7d01c84d4cf05f5a650a6e6eeee
parent20cb0407013c6aecdea519d594373fba20678523 (diff)
downloadpoi-1065c690046971619e0ecdf45a8d3a14eae2ab28.tar.gz
poi-1065c690046971619e0ecdf45a8d3a14eae2ab28.zip
Print out current locale.provider for some test-failures
JDK 24 will break things here and thus we should get more information about which provider is used when running some tests git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922487 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--poi/src/test/java/org/apache/poi/ss/util/Utils.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/poi/src/test/java/org/apache/poi/ss/util/Utils.java b/poi/src/test/java/org/apache/poi/ss/util/Utils.java
index d838bea27c..0bbb220852 100644
--- a/poi/src/test/java/org/apache/poi/ss/util/Utils.java
+++ b/poi/src/test/java/org/apache/poi/ss/util/Utils.java
@@ -27,6 +27,8 @@ import java.util.Date;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class Utils {
+ private static final String provider = System.getProperty("java.locale.providers");
+
public static void addRow(Sheet sheet, int rownum, Object... values) {
Row row = sheet.createRow(rownum);
for (int i = 0; i < values.length; i++) {
@@ -60,7 +62,8 @@ public class Utils {
fe.notifyUpdateCell(cell);
CellValue result = fe.evaluate(cell);
assertEquals(CellType.STRING, result.getCellType());
- assertEquals(expectedResult, result.getStringValue());
+ assertEquals(expectedResult, result.getStringValue(),
+ "Failed with locale provider: " + provider);
}
public static void assertDouble(FormulaEvaluator fe, Cell cell, String formulaText, double expectedResult) {