Modified JarRevision to log when an embedded JAR file is not found as
opposed to throwing an exception; this will need to be modified later
to fire a framework INFO event.
git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@420838 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/org.apache.felix.framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java b/org.apache.felix.framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java
index 8722834..330d04e 100644
--- a/org.apache.felix.framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java
+++ b/org.apache.felix.framework/src/main/java/org/apache/felix/framework/cache/BundleCache.java
@@ -194,9 +194,6 @@
/**
* This method copies an input stream to the specified file.
- * <p>
- * Security: This method must be called from within a <tt>doPrivileged()</tt>
- * block since it accesses the disk.
* @param is the input stream to copy.
* @param outputFile the file to which the input stream should be copied.
**/
diff --git a/org.apache.felix.framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java b/org.apache.felix.framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java
index 22423b6..48c703d 100644
--- a/org.apache.felix.framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java
+++ b/org.apache.felix.framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java
@@ -376,9 +376,6 @@
/**
* This method extracts an embedded JAR file from the bundle's
* JAR file.
- * <p>
- * Security: This method must be called from within a <tt>doPrivileged()</tt>
- * block since it accesses the disk.
* @param id the identifier of the bundle that owns the embedded JAR file.
* @param jarPath the path to the embedded JAR file inside the bundle JAR file.
**/
@@ -404,7 +401,10 @@
ZipEntry ze = bundleJar.getEntry(jarPath);
if (ze == null)
{
- throw new IOException("No JAR entry: " + jarPath);
+// TODO: FRAMEWORK - Per the spec, this should fire a FrameworkEvent.INFO event;
+// need to create an "Eventer" class like "Logger" perhaps.
+ getLogger().log(Logger.LOG_INFO, "Class path entry not found: " + jarPath);
+ return;
}
// If the zip entry is a directory, then ignore it since
// we don't need to extact it; otherwise, it points to an
@@ -439,4 +439,4 @@
}
}
}
-}
\ No newline at end of file
+}