Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2015-08-11 15:32:36 +0000
committerThomas Watson2015-08-11 15:32:36 +0000
commit52896896aac837cb5d716383f38a6da44fd4796b (patch)
tree3676c6fea97c0ad3368e7b770a387698ec54db7f /bundles/org.eclipse.osgi.tests/bundles_src
parenta01aa517aa6aa58815d8db1b948db89611ca9dce (diff)
downloadrt.equinox.framework-52896896aac837cb5d716383f38a6da44fd4796b.tar.gz
rt.equinox.framework-52896896aac837cb5d716383f38a6da44fd4796b.tar.xz
rt.equinox.framework-52896896aac837cb5d716383f38a6da44fd4796b.zip
Bug 471551 - SchemaFactory - Loading behaves differently by switchingI20150811-1400
from java 7 to 8
Diffstat (limited to 'bundles/org.eclipse.osgi.tests/bundles_src')
-rwxr-xr-xbundles/org.eclipse.osgi.tests/bundles_src/test.bug471551/META-INF/MANIFEST.MF8
-rwxr-xr-xbundles/org.eclipse.osgi.tests/bundles_src/test.bug471551/test/bug471551/Activator.java39
2 files changed, 47 insertions, 0 deletions
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.bug471551/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.tests/bundles_src/test.bug471551/META-INF/MANIFEST.MF
new file mode 100755
index 000000000..9280f6ce9
--- /dev/null
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/test.bug471551/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: test.bug471551
+Bundle-Version: 1.0
+Import-Package: org.osgi.framework,
+ org.osgi.framework.wiring,
+ javax.xml.validation
+Bundle-Activator: test.bug471551.Activator
+
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.bug471551/test/bug471551/Activator.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.bug471551/test/bug471551/Activator.java
new file mode 100755
index 000000000..eb5da92e1
--- /dev/null
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/test.bug471551/test/bug471551/Activator.java
@@ -0,0 +1,39 @@
+
+/*******************************************************************************
+ * Copyright (c) 2015 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.bug471551;
+
+import javax.xml.validation.SchemaFactory;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.wiring.BundleWiring;
+
+public class Activator implements BundleActivator {
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ ClassLoader cl = context.getBundle().adapt(BundleWiring.class).getClassLoader();
+ ClassLoader currentTCCL = Thread.currentThread().getContextClassLoader();
+ Thread.currentThread().setContextClassLoader(cl);
+ try {
+ SchemaFactory sf = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
+ System.out.println("SchemaFactory with TCCL: " + sf.getClass().getName());
+ } finally {
+ Thread.currentThread().setContextClassLoader(currentTCCL);
+ }
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ // nothing
+ }
+
+}

Back to the top