Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.equinox.cm.test/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.cm.test/src/org/eclipse/equinox/cm/test/ManagedServiceTest.java14
-rw-r--r--bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationImpl.java3
3 files changed, 16 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.cm.test/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.cm.test/META-INF/MANIFEST.MF
index 35188f5f..a1b9acaa 100644
--- a/bundles/org.eclipse.equinox.cm.test/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.cm.test/META-INF/MANIFEST.MF
@@ -4,7 +4,7 @@ Bundle-Name: Test Plug-in
Bundle-SymbolicName: org.eclipse.equinox.cm.test
Bundle-Version: 1.0.0
Bundle-Activator: org.eclipse.equinox.cm.test.Activator
-Import-Package: junit.framework;version="[3.8.0,4.0.0)",
+Import-Package: junit.framework;version="3.8.1",
org.osgi.framework;version="1.3.0",
org.osgi.service.cm;version="1.2.0",
org.osgi.service.event;version="1.1.0",
diff --git a/bundles/org.eclipse.equinox.cm.test/src/org/eclipse/equinox/cm/test/ManagedServiceTest.java b/bundles/org.eclipse.equinox.cm.test/src/org/eclipse/equinox/cm/test/ManagedServiceTest.java
index 28671dd1..2d671c3b 100644
--- a/bundles/org.eclipse.equinox.cm.test/src/org/eclipse/equinox/cm/test/ManagedServiceTest.java
+++ b/bundles/org.eclipse.equinox.cm.test/src/org/eclipse/equinox/cm/test/ManagedServiceTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others
+ * Copyright (c) 2007, 2010 IBM Corporation and others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -126,6 +126,18 @@ public class ManagedServiceTest extends TestCase {
assertEquals(2, updateCount);
}
+ String location = config.getBundleLocation();
+ config.setBundleLocation("bogus");
+ synchronized (lock) {
+ config.update();
+ locked = true;
+ lock.wait(100);
+ assertTrue(locked);
+ assertEquals(2, updateCount);
+ locked = false;
+ }
+ config.setBundleLocation(location);
+
dict.remove(Constants.SERVICE_PID);
synchronized (lock) {
reg.setProperties(dict);
diff --git a/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationImpl.java b/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationImpl.java
index 3af8b628..630dc898 100644
--- a/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationImpl.java
+++ b/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2009 Cognos Incorporated, IBM Corporation and others.
+ * Copyright (c) 2005, 2010 Cognos Incorporated, IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -228,6 +228,7 @@ class ConfigurationImpl implements Configuration {
checkDeleted();
configurationAdminFactory.checkConfigurationPermission();
this.bundleLocation = bundleLocation;
+ boundBundle = null; // always reset the boundBundle when setBundleLocation is called
} finally {
unlock();
}

Back to the top