diff options
Diffstat (limited to 'src/java/org/apache/poi/ss/usermodel/DataFormatter.java')
-rw-r--r-- | src/java/org/apache/poi/ss/usermodel/DataFormatter.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/java/org/apache/poi/ss/usermodel/DataFormatter.java b/src/java/org/apache/poi/ss/usermodel/DataFormatter.java index 766ded18fe..6cb9d4d71c 100644 --- a/src/java/org/apache/poi/ss/usermodel/DataFormatter.java +++ b/src/java/org/apache/poi/ss/usermodel/DataFormatter.java @@ -440,8 +440,8 @@ public class DataFormatter { Matcher dateMatcher = daysAsText.matcher(formatStr); if (dateMatcher.find()) { - String match = dateMatcher.group(0); - formatStr = dateMatcher.replaceAll(match.toUpperCase().replaceAll("D", "E")); + String match = dateMatcher.group(0).toUpperCase(Locale.ROOT).replaceAll("D", "E"); + formatStr = dateMatcher.replaceAll(match); } // Convert excel date format to SimpleDateFormat. @@ -903,8 +903,9 @@ public class DataFormatter { /** * @return a <tt>DecimalFormat</tt> with parseIntegerOnly set <code>true</code> */ - /* package */ static DecimalFormat createIntegerOnlyFormat(String fmt) { - DecimalFormat result = new DecimalFormat(fmt); + private static DecimalFormat createIntegerOnlyFormat(String fmt) { + DecimalFormatSymbols dsf = DecimalFormatSymbols.getInstance(Locale.ROOT); + DecimalFormat result = new DecimalFormat(fmt, dsf); result.setParseIntegerOnly(true); return result; } |