Updated to the latest dependency manager snapshot. Misc fixes for EE compatibility.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@925672 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/deploymentadmin/autoconf/pom.xml b/deploymentadmin/autoconf/pom.xml
index 13e34a3..fdc24e4 100644
--- a/deploymentadmin/autoconf/pom.xml
+++ b/deploymentadmin/autoconf/pom.xml
@@ -44,7 +44,7 @@
<dependency>
<groupId>${pom.groupId}</groupId>
<artifactId>org.apache.felix.dependencymanager</artifactId>
- <version>2.0.1</version>
+ <version>3.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/deploymentadmin/autoconf/src/main/java/org/apache/felix/deployment/rp/autoconf/Activator.java b/deploymentadmin/autoconf/src/main/java/org/apache/felix/deployment/rp/autoconf/Activator.java
index 0754c52..7159190 100644
--- a/deploymentadmin/autoconf/src/main/java/org/apache/felix/deployment/rp/autoconf/Activator.java
+++ b/deploymentadmin/autoconf/src/main/java/org/apache/felix/deployment/rp/autoconf/Activator.java
@@ -21,8 +21,8 @@
import java.util.Dictionary;
import java.util.Properties;
-import org.apache.felix.dependencymanager.DependencyActivatorBase;
-import org.apache.felix.dependencymanager.DependencyManager;
+import org.apache.felix.dm.DependencyActivatorBase;
+import org.apache.felix.dm.DependencyManager;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
import org.osgi.service.cm.ConfigurationAdmin;
diff --git a/deploymentadmin/autoconf/src/main/java/org/apache/felix/deployment/rp/autoconf/PersistencyManager.java b/deploymentadmin/autoconf/src/main/java/org/apache/felix/deployment/rp/autoconf/PersistencyManager.java
index b253a65..0438cbd 100644
--- a/deploymentadmin/autoconf/src/main/java/org/apache/felix/deployment/rp/autoconf/PersistencyManager.java
+++ b/deploymentadmin/autoconf/src/main/java/org/apache/felix/deployment/rp/autoconf/PersistencyManager.java
@@ -50,7 +50,8 @@
return;
}
File targetDir = m_root;
- name = name.replaceAll("/", File.separator);
+ name = name.replace('/', File.separatorChar);
+
if (name.startsWith(File.separator)) {
name = name.substring(1);
}
@@ -103,7 +104,7 @@
* @throws IOException If the resource could not be properly read.
*/
public List load(String name) throws IOException {
- name = name.replaceAll("/", File.separator);
+ name = name.replace('/', File.separatorChar);
List resources = new ArrayList();
File resourcesFile = new File(m_root, name);
if (resourcesFile.exists()) {
@@ -111,15 +112,19 @@
try {
in = new ObjectInputStream(new FileInputStream(resourcesFile));
resources = (List) in.readObject();
- } catch (FileNotFoundException fnfe) {
+ }
+ catch (FileNotFoundException fnfe) {
throw new IOException("Resource does not exist: " + name);
- } catch (ClassNotFoundException cnfe) {
+ }
+ catch (ClassNotFoundException cnfe) {
throw new IOException("Unable to recreate persisted object from file: " + name);
- } finally {
+ }
+ finally {
if (in != null) {
try {
in.close();
- } catch (Exception e) {
+ }
+ catch (Exception e) {
// not much we can do
}
}
diff --git a/deploymentadmin/service/pom.xml b/deploymentadmin/service/pom.xml
index d12e2de..9a5181d 100644
--- a/deploymentadmin/service/pom.xml
+++ b/deploymentadmin/service/pom.xml
@@ -44,7 +44,7 @@
<dependency>
<groupId>${pom.groupId}</groupId>
<artifactId>org.apache.felix.dependencymanager</artifactId>
- <version>2.0.1</version>
+ <version>3.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
diff --git a/deploymentadmin/service/src/main/java/org/apache/felix/deploymentadmin/Activator.java b/deploymentadmin/service/src/main/java/org/apache/felix/deploymentadmin/Activator.java
index 6a4a86c..15f584f 100644
--- a/deploymentadmin/service/src/main/java/org/apache/felix/deploymentadmin/Activator.java
+++ b/deploymentadmin/service/src/main/java/org/apache/felix/deploymentadmin/Activator.java
@@ -18,8 +18,8 @@
*/
package org.apache.felix.deploymentadmin;
-import org.apache.felix.dependencymanager.DependencyActivatorBase;
-import org.apache.felix.dependencymanager.DependencyManager;
+import org.apache.felix.dm.DependencyActivatorBase;
+import org.apache.felix.dm.DependencyManager;
import org.osgi.framework.BundleContext;
import org.osgi.service.deploymentadmin.DeploymentAdmin;
import org.osgi.service.event.EventAdmin;
diff --git a/deploymentadmin/service/src/main/java/org/apache/felix/deploymentadmin/DeploymentAdminImpl.java b/deploymentadmin/service/src/main/java/org/apache/felix/deploymentadmin/DeploymentAdminImpl.java
index aef5aac..6003deb 100644
--- a/deploymentadmin/service/src/main/java/org/apache/felix/deploymentadmin/DeploymentAdminImpl.java
+++ b/deploymentadmin/service/src/main/java/org/apache/felix/deploymentadmin/DeploymentAdminImpl.java
@@ -314,7 +314,7 @@
private void sendCompleteEvent(String name, boolean success) {
Dictionary props = new Hashtable();
props.put(Constants.EVENTPROPERTY_DEPLOYMENTPACKAGE_NAME, name);
- props.put(Constants.EVENTPROPERTY_SUCCESSFUL, Boolean.valueOf(success));
+ props.put(Constants.EVENTPROPERTY_SUCCESSFUL, new Boolean(success));
Event completeEvent = new Event(Constants.EVENTTOPIC_COMPLETE, props);
m_eventAdmin.postEvent(completeEvent);
}