Author: max.andersen(a)jboss.com
Date: 2007-07-24 13:21:40 -0400 (Tue, 24 Jul 2007)
New Revision: 2636
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/InnerModelHelper.java
Log:
avoid NPE being thrown by manual checking for error
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/InnerModelHelper.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/InnerModelHelper.java 2007-07-24
17:20:36 UTC (rev 2635)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/InnerModelHelper.java 2007-07-24
17:21:40 UTC (rev 2636)
@@ -5,6 +5,7 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jst.ws.internal.common.J2EEUtils;
+import org.eclipse.wst.common.componentcore.ComponentCore;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelConstants;
import org.jboss.tools.common.model.XModelObject;
@@ -23,12 +24,11 @@
IPath webInfPath = null;
- try {
+ if(ComponentCore.createComponent(project)!=null) {
webInfPath = J2EEUtils.getWebInfPath(project);
- } catch (Exception e) {
- //ignore
}
+
if(webInfPath == null) return model;
IFolder webInfFolder = ResourcesPlugin.getWorkspace().getRoot().getFolder(webInfPath);