aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2017-06-24 00:15:20 +0000
committerPJ Fanning <fanningpj@apache.org>2017-06-24 00:15:20 +0000
commit840904ed91b83e75550fdab0c07123caed92c7b6 (patch)
treed398a0f28c5bbec6316a466b31dd6322fb23ba8d
parent9856c7c6633e91767f5834ccd140897c89c83396 (diff)
downloadpoi-840904ed91b83e75550fdab0c07123caed92c7b6.tar.gz
poi-840904ed91b83e75550fdab0c07123caed92c7b6.zip
[Bug 60422] Tidy up test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799722 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java b/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java
index 03b8398e3e..d98133de19 100644
--- a/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java
+++ b/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java
@@ -858,18 +858,16 @@ public class TestDataFormatter {
*/
@Test
public void testBug60422() {
- Locale defaultLocale = Locale.getDefault();
- Locale.setDefault(Locale.GERMANY);
LocaleUtil.setUserLocale(Locale.ROOT);
try {
char euro = '\u20AC';
- DataFormatter df = new DataFormatter();
+ DataFormatter df = new DataFormatter(Locale.GERMANY);
String formatString = String.format(
"_-* #,##0.00\\ \"%s\"_-;\\-* #,##0.00\\ \"%s\"_-;_-* \"-\"??\\ \"%s\"_-;_-@_-",
euro, euro, euro);
assertEquals("4.33 " + euro, df.formatRawCellContents(4.33, 178, formatString));
} finally {
- Locale.setDefault(defaultLocale);
+ LocaleUtil.resetUserLocale();
}
}
}