From e8c97ea3c246ba6c4b0880e9c5dae781f14811db Mon Sep 17 00:00:00 2001 From: Konrad Kolosowski Date: Fri, 21 May 2004 14:49:56 +0000 Subject: 63228 ContainerBase.addChild: start: LifecycleException: start: : java.lang.NullPointerException --- .../appserver/PluginClassLoaderWrapper.java | 54 +++++++++++----------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/PluginClassLoaderWrapper.java b/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/PluginClassLoaderWrapper.java index 6fffcd119..d50b4efd6 100644 --- a/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/PluginClassLoaderWrapper.java +++ b/org.eclipse.help.appserver/src/org/eclipse/help/internal/appserver/PluginClassLoaderWrapper.java @@ -53,33 +53,35 @@ public class PluginClassLoaderWrapper extends URLClassLoader { String id = (String) it.next(); try { Bundle b = Platform.getBundle(id); - // declared classpath - String headers = (String) b.getHeaders().get( - Constants.BUNDLE_CLASSPATH); - ManifestElement[] paths = ManifestElement.parseHeader( - Constants.BUNDLE_CLASSPATH, headers); - if (paths != null) { - for (int i = 0; i < paths.length; i++) { - String path = paths[i].getValue(); - URL url = b.getEntry(path); - if (url != null) - try { - urls.add(Platform.asLocalURL(url)); - } catch (IOException ioe) { - } + if (b != null) { + // declared classpath + String headers = (String) b.getHeaders().get( + Constants.BUNDLE_CLASSPATH); + ManifestElement[] paths = ManifestElement.parseHeader( + Constants.BUNDLE_CLASSPATH, headers); + if (paths != null) { + for (int i = 0; i < paths.length; i++) { + String path = paths[i].getValue(); + URL url = b.getEntry(path); + if (url != null) + try { + urls.add(Platform.asLocalURL(url)); + } catch (IOException ioe) { + } + } } - } - // dev classpath - String[] devpaths = DevClassPathHelper - .getDevClassPath(pluginId); - if(devpaths !=null){ - for (int i = 0; i < devpaths.length; i++) { - URL url = b.getEntry(devpaths[i]); - if (url != null) - try { - urls.add(Platform.asLocalURL(url)); - } catch (IOException ioe) { - } + // dev classpath + String[] devpaths = DevClassPathHelper + .getDevClassPath(pluginId); + if (devpaths != null) { + for (int i = 0; i < devpaths.length; i++) { + URL url = b.getEntry(devpaths[i]); + if (url != null) + try { + urls.add(Platform.asLocalURL(url)); + } catch (IOException ioe) { + } + } } } } catch (BundleException e) { -- cgit v1.2.3