Author: scabanovich
Date: 2009-09-28 06:14:43 -0400 (Mon, 28 Sep 2009)
New Revision: 17775
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/XStudioContribution.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4952
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/XStudioContribution.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/XStudioContribution.java 2009-09-28
10:14:01 UTC (rev 17774)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/XStudioContribution.java 2009-09-28
10:14:43 UTC (rev 17775)
@@ -33,12 +33,18 @@
try {
Bundle b = Platform.getBundle(loader);
URL u = b.getResource(resource);
+ if(u == null) {
+ ModelPlugin.getPluginLog().logWarning("Cannot find resource " +
resource + " in plugin " + b); //$NON-NLS-1$ //$NON-NLS-2$
+ return null;
+ }
URLConnection c = u.openConnection();
return c.getInputStream();
} catch (IOException e) {
- e.printStackTrace();
ModelPlugin.getPluginLog().logError(e);
return null;
+ } catch (NoClassDefFoundError e2) {
+ ModelPlugin.getPluginLog().logError(e2);
+ return null;
}
}