Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java
index 60e2c7792..ae0d40d2b 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java
@@ -2189,6 +2189,23 @@ public class SystemBundleTests extends AbstractBundleTests {
}
}
+ static final String nullTest = "null.test";
+
+ public void testNullConfigurationValue() throws BundleException {
+ System.setProperty(nullTest, "system");
+ File config = OSGiTestsActivator.getContext().getDataFile(getName()); //$NON-NLS-1$
+ Map<String, Object> configuration = new HashMap<String, Object>();
+ configuration.put(Constants.FRAMEWORK_STORAGE, config.getAbsolutePath());
+ configuration.put(nullTest, null);
+ Equinox equinox = new Equinox(configuration);
+ equinox.start();
+ String nullValue = equinox.getBundleContext().getProperty(nullTest);
+ assertNull(nullTest + " is not null: " + nullValue, nullValue);
+ String systemNullValue = System.getProperty(nullTest);
+ assertEquals("Wrong system null value.", "system", systemNullValue);
+ equinox.stop();
+ }
+
private static File[] createBundles(File outputDir, int bundleCount) throws IOException {
outputDir.mkdirs();

Back to the top