Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Alexander Kuppe2013-10-23 05:59:28 +0000
committerMarkus Alexander Kuppe2013-10-23 05:59:28 +0000
commitad1ec7941c4cdacb806bd8bbbebeb05cd723c275 (patch)
tree8b225eab51f0da4f440f9533fb48fa0798371ade /protocols/bundles
parentd99dcbbc354f9230dc97eb1ff97185edee8ae67e (diff)
downloadorg.eclipse.ecf-ad1ec7941c4cdacb806bd8bbbebeb05cd723c275.tar.gz
org.eclipse.ecf-ad1ec7941c4cdacb806bd8bbbebeb05cd723c275.tar.xz
org.eclipse.ecf-ad1ec7941c4cdacb806bd8bbbebeb05cd723c275.zip
RESOLVED - [r-OSGi] NPE in recurseInterfaceHierarchy() if a parameterR-Release_HEAD-sdk_feature-124_2013-10-24_14-25-50
user data type implements/extends system type like java.io.Serializable https://bugs.eclipse.org/420112
Diffstat (limited to 'protocols/bundles')
-rw-r--r--protocols/bundles/ch.ethz.iks.r_osgi.remote/src/main/java/ch/ethz/iks/r_osgi/impl/ProxyGenerator.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/protocols/bundles/ch.ethz.iks.r_osgi.remote/src/main/java/ch/ethz/iks/r_osgi/impl/ProxyGenerator.java b/protocols/bundles/ch.ethz.iks.r_osgi.remote/src/main/java/ch/ethz/iks/r_osgi/impl/ProxyGenerator.java
index 54ac6751c..a7936092a 100644
--- a/protocols/bundles/ch.ethz.iks.r_osgi.remote/src/main/java/ch/ethz/iks/r_osgi/impl/ProxyGenerator.java
+++ b/protocols/bundles/ch.ethz.iks.r_osgi.remote/src/main/java/ch/ethz/iks/r_osgi/impl/ProxyGenerator.java
@@ -374,9 +374,19 @@ class ProxyGenerator implements ClassVisitor, Opcodes {
final ClassReader reader;
if (bytes == null) {
try {
- reader = new ClassReader(Class.forName(
- superIface.replace('/', '.'))
- .getClassLoader().getResourceAsStream(
+ final Class clazz = Class.forName(
+ superIface.replace('/', '.'));
+ ClassLoader classLoader = clazz
+ .getClassLoader();
+ if (classLoader == null) {
+ // For classes loaded by the bootstrap CL, the
+ // CL will be null. This happens e.g. on classes
+ // like java.io.Serializable (or other classes
+ // provided by the JRE).
+ // (see https://bugs.eclipse.org/420112)
+ classLoader = getClass().getClassLoader();
+ }
+ reader = new ClassReader(classLoader.getResourceAsStream(
superIface + ".class")); //$NON-NLS-1$
} catch (final IOException ioe) {
throw new IOException("While processing " //$NON-NLS-1$

Back to the top