Make default file limit for bundle cache unlimited. (FELIX-3071)
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1173310 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java b/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java
index 8d609ae..f9c1828 100644
--- a/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java
+++ b/framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java
@@ -103,16 +103,18 @@
m_logger = logger;
m_configMap = configMap;
+ int limit = 0;
String limitStr = (String) m_configMap.get(CACHE_FILELIMIT_PROP);
- limitStr = (limitStr == null) ? "10" : limitStr;
- int limit;
- try
+ if (limitStr != null)
{
- limit = Integer.parseInt(limitStr);
- }
- catch (NumberFormatException ex)
- {
- limit = 10;
+ try
+ {
+ limit = Integer.parseInt(limitStr);
+ }
+ catch (NumberFormatException ex)
+ {
+ limit = 0;
+ }
}
m_zipFactory = new WeakZipFileFactory(limit);