diff options
8 files changed, 64 insertions, 1 deletions
diff --git a/bundles/org.eclipse.osgi.tests/.classpath b/bundles/org.eclipse.osgi.tests/.classpath index 0ba78979f..cb132ac61 100644 --- a/bundles/org.eclipse.osgi.tests/.classpath +++ b/bundles/org.eclipse.osgi.tests/.classpath @@ -124,5 +124,8 @@ <classpathentry kind="src" output="bundle_tests/ext.framework.osgiee.a.jar" path="bundles_src/ext.framework.osgiee.a"/> <classpathentry kind="src" output="bundle_tests/ext.framework.osgiee.b.jar" path="bundles_src/ext.framework.osgiee.b"/> <classpathentry kind="src" output="bundle_tests/classloader.hooks.a" path="bundles_src/classloader.hooks.a"/> + <classpathentry kind="src" output="bundle_tests/test.bug438904.host" path="bundles_src/test.bug438904.host"/> + <classpathentry kind="src" output="bundle_tests/test.bug438904.frag" path="bundles_src/test.bug438904.frag"/> + <classpathentry kind="src" output="bundle_tests/test.bug438904.global" path="bundles_src/test.bug438904.global"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/bundles/org.eclipse.osgi.tests/build.properties b/bundles/org.eclipse.osgi.tests/build.properties index 987e3da15..8653aa84a 100644 --- a/bundles/org.eclipse.osgi.tests/build.properties +++ b/bundles/org.eclipse.osgi.tests/build.properties @@ -252,6 +252,12 @@ source.bundle_tests/ext.framework.osgiee.b.jar = bundles_src/ext.framework.osgie manifest.bundle_tests/ext.framework.osgiee.b.jar = META-INF/MANIFEST.MF source.bundle_tests/classloader.hooks.a.jar = bundles_src/classloader.hooks.a/ manifest.bundle_tests/classloader.hooks.a.jar = META-INF/MANIFEST.MF +source.bundle_tests/test.bug438904.host.jar = bundles_src/test.bug438904.host/ +manifest.bundle_tests/test.bug438904.host.jar = META-INF/MANIFEST.MF +source.bundle_tests/test.bug438904.frag.jar = bundles_src/test.bug438904.frag/ +manifest.bundle_tests/test.bug438904.frag.jar = META-INF/MANIFEST.MF +source.bundle_tests/test.bug438904.global.jar = bundles_src/test.bug438904.global/ +manifest.bundle_tests/test.bug438904.global.jar = META-INF/MANIFEST.MF jars.compile.order = bundle_tests/ext.framework.b.jar,\ osgitests.jar,\ @@ -373,4 +379,7 @@ jars.compile.order = bundle_tests/ext.framework.b.jar,\ bundle_tests/test.uninstall.start2.jar,\ bundle_tests/ext.framework.osgiee.a.jar,\ bundle_tests/ext.framework.osgiee.b.jar,\ - bundle_tests/classloader.hooks.a.jar + bundle_tests/classloader.hooks.a.jar,\ + bundle_tests/test.bug438904.host.jar,\ + bundle_tests/test.bug438904.frag.jar,\ + bundle_tests/test.bug438904.global.jar diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.bug438904.frag/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.tests/bundles_src/test.bug438904.frag/META-INF/MANIFEST.MF new file mode 100644 index 000000000..c27c4e879 --- /dev/null +++ b/bundles/org.eclipse.osgi.tests/bundles_src/test.bug438904.frag/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Bundle-SymbolicName: test.bug438904.host +Bundle-Version: 1.0 +Export-Package: test.bug438904.host diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.bug438904.frag/test/bug438904/frag/Test2.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.bug438904.frag/test/bug438904/frag/Test2.java new file mode 100644 index 000000000..054485004 --- /dev/null +++ b/bundles/org.eclipse.osgi.tests/bundles_src/test.bug438904.frag/test/bug438904/frag/Test2.java @@ -0,0 +1,15 @@ +/******************************************************************************* + * Copyright (c) 2013 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package test.bug438904.frag; + +public class Test2 { + +} diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.bug438904.global/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.tests/bundles_src/test.bug438904.global/META-INF/MANIFEST.MF new file mode 100644 index 000000000..485f36ddc --- /dev/null +++ b/bundles/org.eclipse.osgi.tests/bundles_src/test.bug438904.global/META-INF/MANIFEST.MF @@ -0,0 +1,4 @@ +Bundle-SymbolicName: test.bug438904.global +Bundle-Version: 1.0 +Eclipse-BuddyPolicy: global + diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.bug438904.host/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.tests/bundles_src/test.bug438904.host/META-INF/MANIFEST.MF new file mode 100644 index 000000000..1254dea39 --- /dev/null +++ b/bundles/org.eclipse.osgi.tests/bundles_src/test.bug438904.host/META-INF/MANIFEST.MF @@ -0,0 +1,5 @@ +Bundle-SymbolicName: test.bug438904.frag +Bundle-Version: 1.0 +Export-Package: test.bug438904.frag +Fragment-Host: test.bug438904.host + diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.bug438904.host/test/bug438904/host/Test1.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.bug438904.host/test/bug438904/host/Test1.java new file mode 100644 index 000000000..89ba446d6 --- /dev/null +++ b/bundles/org.eclipse.osgi.tests/bundles_src/test.bug438904.host/test/bug438904/host/Test1.java @@ -0,0 +1,15 @@ +/******************************************************************************* + * Copyright (c) 2013 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package test.bug438904.host; + +public class Test1 { + +} diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/ClassLoadingBundleTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/ClassLoadingBundleTests.java index 67fa572f3..0fe0ed544 100644 --- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/ClassLoadingBundleTests.java +++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/ClassLoadingBundleTests.java @@ -1651,6 +1651,15 @@ public class ClassLoadingBundleTests extends AbstractBundleTests { } } + public void testBuddyClassloadingBug438904() throws Exception { + Bundle host = installer.installBundle("test.bug438904.host"); + Bundle frag = installer.installBundle("test.bug438904.frag"); + Bundle global = installer.installBundle("test.bug438904.global"); + installer.resolveBundles(new Bundle[] {host, frag, global}); + global.loadClass("test.bug438904.host.Test1"); + global.loadClass("test.bug438904.frag.Test2"); + } + public void testBundleReference01() throws Exception { Bundle test = installer.installBundle("test"); //$NON-NLS-1$ Class clazz = test.loadClass("test1.Activator"); //$NON-NLS-1$ |