tika-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r933255 - /lucene/tika/trunk/tika-core/src/main/java/org/apache/tika/mime/MediaType.java
Date Mon, 12 Apr 2010 14:42:34 GMT
Author: jukka
Date: Mon Apr 12 14:42:33 2010
New Revision: 933255

URL: http://svn.apache.org/viewvc?rev=933255&view=rev
Log:
TIKA-404: Media-type handling depends on the locale

Modified:
    lucene/tika/trunk/tika-core/src/main/java/org/apache/tika/mime/MediaType.java

Modified: lucene/tika/trunk/tika-core/src/main/java/org/apache/tika/mime/MediaType.java
URL: http://svn.apache.org/viewvc/lucene/tika/trunk/tika-core/src/main/java/org/apache/tika/mime/MediaType.java?rev=933255&r1=933254&r2=933255&view=diff
==============================================================================
--- lucene/tika/trunk/tika-core/src/main/java/org/apache/tika/mime/MediaType.java (original)
+++ lucene/tika/trunk/tika-core/src/main/java/org/apache/tika/mime/MediaType.java Mon Apr
12 14:42:33 2010
@@ -18,6 +18,7 @@ package org.apache.tika.mime;
 
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.Locale;
 import java.util.Map;
 import java.util.SortedMap;
 import java.util.TreeMap;
@@ -133,8 +134,8 @@ public final class MediaType {
 
     public MediaType(
             String type, String subtype, Map<String, String> parameters) {
-        this.type = type.trim().toLowerCase();
-        this.subtype = subtype.trim().toLowerCase();
+        this.type = type.trim().toLowerCase(Locale.ENGLISH);
+        this.subtype = subtype.trim().toLowerCase(Locale.ENGLISH);
         this.parameters = new TreeMap<String, String>();
         for (Map.Entry<String, String> entry : parameters.entrySet()) {
             this.parameters.put(



Mime
View raw message