SOLR-3672: toLowerCase() is verboten

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1367386 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2012-07-31 01:42:03 +00:00
parent 1cac548005
commit 1231dafae2
1 changed files with 3 additions and 2 deletions

View File

@ -25,6 +25,7 @@ import java.io.InputStream;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.util.Locale;
import java.util.HashMap; import java.util.HashMap;
import java.util.Set; import java.util.Set;
import java.util.HashSet; import java.util.HashSet;
@ -392,7 +393,7 @@ public class SimplePostTool {
private String guessType(File file) { private String guessType(File file) {
String name = file.getName(); String name = file.getName();
String suffix = name.substring(name.lastIndexOf(".")+1); String suffix = name.substring(name.lastIndexOf(".")+1);
return mimeMap.get(suffix.toLowerCase()); return mimeMap.get(suffix.toLowerCase(Locale.ROOT));
} }
/** /**
@ -570,4 +571,4 @@ public class SimplePostTool {
return p.matcher(file.getName()).find(); return p.matcher(file.getName()).find();
} }
} }
} }