SLING-2171 : Don't copy resources if they are always available (like from the file system)
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1155290 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index 64f2c2e..95f70d3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -82,7 +82,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.installer.core</artifactId>
- <version>3.2.0</version>
+ <version>3.2.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!-- We use a class from the config admin implementation to read config files -->
diff --git a/src/main/java/org/apache/sling/installer/provider/file/impl/Installer.java b/src/main/java/org/apache/sling/installer/provider/file/impl/Installer.java
index 80ce7c2..cc6bddc 100644
--- a/src/main/java/org/apache/sling/installer/provider/file/impl/Installer.java
+++ b/src/main/java/org/apache/sling/installer/provider/file/impl/Installer.java
@@ -129,19 +129,19 @@
final InputStream is = new FileInputStream(file);
final String digest = String.valueOf(file.lastModified());
// if this is a bundle check for start level directory!
- Dictionary<String, Object> dict = null;
+ final Dictionary<String, Object> dict = new Hashtable<String, Object>();
if ( file.getName().endsWith(".jar") || file.getName().endsWith(".war") ) {
final String parentName = file.getParentFile().getName();
try {
final int startLevel = Integer.valueOf(parentName);
if ( startLevel > 0 ) {
- dict = new Hashtable<String, Object>();
dict.put(InstallableResource.BUNDLE_START_LEVEL, startLevel);
}
} catch (NumberFormatException nfe) {
// ignore this
}
}
+ dict.put(InstallableResource.RESOURCE_URI_HINT, file.toURI().toString());
return new InstallableResource(file.getAbsolutePath(), is, dict, digest,
null, null);
} catch (IOException io) {