diff options
author | Thomas Watson | 2014-07-02 19:45:52 +0000 |
---|---|---|
committer | Thomas Watson | 2014-07-02 19:46:28 +0000 |
commit | 855ffcdb61166bd8a5f81e2ac004cfc93ccc583e (patch) | |
tree | 8844d9feee8040b547808f9637fc7f434da95c71 | |
parent | cc01d9849b99361da1166571e69036a1ad1ea872 (diff) | |
download | rt.equinox.framework-855ffcdb61166bd8a5f81e2ac004cfc93ccc583e.tar.gz rt.equinox.framework-855ffcdb61166bd8a5f81e2ac004cfc93ccc583e.tar.xz rt.equinox.framework-855ffcdb61166bd8a5f81e2ac004cfc93ccc583e.zip |
Bug 438652 - NPE when exporting a bundle with 'Deployable Plug-ins and
Fragments'
Add new testcase
Change-Id: Ie0d2dae2c7f42f3cdae5a4b245557467c3361ddb
Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
-rw-r--r-- | bundles/org.eclipse.osgi.tests/META-INF/MANIFEST.MF | 2 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/services/resolver/StateResolverTest.java | 33 |
2 files changed, 33 insertions, 2 deletions
diff --git a/bundles/org.eclipse.osgi.tests/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.tests/META-INF/MANIFEST.MF index 088c0aa5e..66079ee0f 100644 --- a/bundles/org.eclipse.osgi.tests/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.osgi.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Core OSGi Tests Bundle-SymbolicName: org.eclipse.osgi.tests;singleton:=true -Bundle-Version: 3.10.0.qualifier +Bundle-Version: 3.11.0.qualifier Bundle-ClassPath: osgitests.jar Bundle-Vendor: Eclipse.org Bundle-Localization: plugin diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/services/resolver/StateResolverTest.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/services/resolver/StateResolverTest.java index 1c236bd95..18d5fbad5 100644 --- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/services/resolver/StateResolverTest.java +++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/services/resolver/StateResolverTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2013 IBM Corporation and others. + * Copyright (c) 2003, 2014 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 @@ -3996,6 +3996,37 @@ public class StateResolverTest extends AbstractStateTest { assertTrue("3.0", testNativeBundle3.isResolved()); //$NON-NLS-1$ } + public void testNativeCodeResolution06() throws BundleException { + State state = buildEmptyState(); + Dictionary[] props = new Dictionary[] {new Hashtable(), new Hashtable(), new Hashtable()}; + + // empty props[0] + + props[1].put("osgi.ws", "win32"); //$NON-NLS-1$ //$NON-NLS-2$ + props[1].put("osgi.os", "win32"); //$NON-NLS-1$ //$NON-NLS-2$ + props[1].put("osgi.arch", "x86_64"); //$NON-NLS-1$ //$NON-NLS-2$ + + props[2].put("osgi.ws", "win32"); //$NON-NLS-1$ //$NON-NLS-2$ + props[2].put("osgi.os", "win32"); //$NON-NLS-1$ //$NON-NLS-2$ + props[2].put("osgi.arch", "x86"); //$NON-NLS-1$ //$NON-NLS-2$ + + state.setPlatformProperties(props); + + Hashtable manifest = new Hashtable(); + long bundleID = 0; + + manifest.clear(); + manifest.put(Constants.BUNDLE_MANIFESTVERSION, "2"); //$NON-NLS-1$ + manifest.put(Constants.BUNDLE_SYMBOLICNAME, "NativeBundle1"); //$NON-NLS-1$ + manifest.put(Constants.BUNDLE_VERSION, "1.0.0"); //$NON-NLS-1$ + manifest.put(Constants.BUNDLE_NATIVECODE, "Bundle-NativeCode: nativefile1.txt;processor=x86;osname=win32"); //$NON-NLS-1$ + BundleDescription testNativeBundle1 = state.getFactory().createBundleDescription(state, manifest, "NativeBundle", bundleID++); //$NON-NLS-1$ + + state.addBundle(testNativeBundle1); + state.resolve(); + assertTrue("1.0", testNativeBundle1.isResolved()); //$NON-NLS-1$ + } + public void testMultiStateAdd01() throws BundleException { State state1 = buildEmptyState(); |