geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: r158799 - geronimo/trunk/specs/activation/src/java/javax/activation/FileTypeMap.java
Date Wed, 23 Mar 2005 17:12:10 GMT
Author: jboynes
Date: Wed Mar 23 09:12:08 2005
New Revision: 158799

URL: http://svn.apache.org/viewcvs?view=rev&rev=158799
Log:
always return same default map

Modified:
    geronimo/trunk/specs/activation/src/java/javax/activation/FileTypeMap.java

Modified: geronimo/trunk/specs/activation/src/java/javax/activation/FileTypeMap.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/specs/activation/src/java/javax/activation/FileTypeMap.java?view=diff&r1=158798&r2=158799
==============================================================================
--- geronimo/trunk/specs/activation/src/java/javax/activation/FileTypeMap.java (original)
+++ geronimo/trunk/specs/activation/src/java/javax/activation/FileTypeMap.java Wed Mar 23
09:12:08 2005
@@ -46,8 +46,11 @@
      * Returns the default FileTypeMap
      * @return the default FileTYpeMap; if null returns a MimetypesFileTypeMap
      */
-    public static FileTypeMap getDefaultFileTypeMap() {
-        return defaultFileTypeMap != null ? defaultFileTypeMap : new MimetypesFileTypeMap();
+    public synchronized static FileTypeMap getDefaultFileTypeMap() {
+        if (defaultFileTypeMap == null) {
+            defaultFileTypeMap = new MimetypesFileTypeMap();
+        }
+        return defaultFileTypeMap;
     }
 
     public FileTypeMap() {



Mime
View raw message