felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r1053396 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java
Date Tue, 28 Dec 2010 17:19:33 GMT
Author: rickhall
Date: Tue Dec 28 17:19:32 2010
New Revision: 1053396

URL: http://svn.apache.org/viewvc?rev=1053396&view=rev
Log:
Avoid using Java 5 Boolean.parseBoolean() method. (FELIX-2749)

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java?rev=1053396&r1=1053395&r2=1053396&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java
Tue Dec 28 17:19:32 2010
@@ -109,8 +109,10 @@ public class BundleCache
         }
 
         Object locking = m_configMap.get(CACHE_LOCKING_PROP);
-        locking = (locking == null) ? "true" : locking.toString();
-        if (Boolean.parseBoolean((String) locking))
+        locking = (locking == null)
+            ? Boolean.TRUE.toString()
+            : locking.toString().toLowerCase();
+        if (((String) locking).equals(Boolean.TRUE.toString()))
         {
             File lockFile = new File(cacheDir, CACHE_LOCK_NAME);
             FileChannel fc = null;



Mime
View raw message