use equalsIgnoreCase for case-insensitive string comparisons

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1761843 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2016-09-22 03:48:49 +00:00
parent 8455e01772
commit 43f7d5bfdc

View File

@ -20,7 +20,6 @@ package org.apache.poi.hssf.usermodel;
import java.util.Arrays; import java.util.Arrays;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Locale;
import java.util.Vector; import java.util.Vector;
import org.apache.poi.hssf.model.InternalWorkbook; import org.apache.poi.hssf.model.InternalWorkbook;
@ -90,7 +89,7 @@ public final class HSSFDataFormat implements DataFormat {
public short getFormat(String pFormat) { public short getFormat(String pFormat) {
// Normalise the format string // Normalise the format string
String format; String format;
if (pFormat.toUpperCase(Locale.ROOT).equals("TEXT")) { if (pFormat.equalsIgnoreCase("TEXT")) {
format = "@"; format = "@";
} else { } else {
format = pFormat; format = pFormat;