return new list
[jSite2.git] / src / net / pterodactylus / util / io / MimeTypes.java
index 387372a..449b7c1 100644 (file)
@@ -29,7 +29,6 @@ import java.util.Map;
  * Handles MIME types and maps them to file extensions.
  * 
  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
  */
 public class MimeTypes {
 
@@ -769,8 +768,8 @@ public class MimeTypes {
         * 
         * @return All known MIME types
         */
-       public List<String> getAllMimeTypes() {
-               return mimeTypes;
+       public static List<String> getAllMimeTypes() {
+               return new ArrayList<String>(mimeTypes);
        }
 
        /**
@@ -781,7 +780,7 @@ public class MimeTypes {
         * @return A list of MIME types, or an empty list if there are no registered
         *         MIME types for the extension
         */
-       public List<String> getMimeTypes(String extension) {
+       public static List<String> getMimeTypes(String extension) {
                if (extensionMimeTypes.containsKey(extension)) {
                        return extensionMimeTypes.get(extension);
                }