From c1cc93a2ef0cfae891b303b696327b2510dbeafd Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sat, 24 Jun 2017 00:15:20 +0000 Subject: [PATCH] [Bug 60422] Tidy up test case git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799722 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/ss/usermodel/TestDataFormatter.java | 6 ++---- 1 file 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 03b8398e3..d98133de1 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(); } } }