Author: fbricon
Date: 2012-02-28 11:12:11 -0500 (Tue, 28 Feb 2012)
New Revision: 39174
Modified:
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/utils/xpl/JSFAppConfigUtils.java
Log:
JBIDE-11078 fix NPE when creating utility project with war packaging
Modified:
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/utils/xpl/JSFAppConfigUtils.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/utils/xpl/JSFAppConfigUtils.java 2012-02-28
16:09:23 UTC (rev 39173)
+++
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/utils/xpl/JSFAppConfigUtils.java 2012-02-28
16:12:11 UTC (rev 39174)
@@ -74,14 +74,15 @@
List<String> filesList = Collections.emptyList();
if (ModuleCoreNature.isFlexibleProject(project)) {
IModelProvider provider = ModelProviderManager.getModelProvider(project);
- Object webAppObj = provider.getModelObject();
- if (webAppObj != null){
- if (webAppObj instanceof WebApp)
- filesList = getConfigFilesForJ2EEApp(project);
- else if (webAppObj instanceof org.eclipse.jst.javaee.web.WebApp)
- filesList = getConfigFilesForJEEApp((org.eclipse.jst.javaee.web.WebApp)webAppObj);
+ if (provider != null) {
+ Object webAppObj = provider.getModelObject();
+ if (webAppObj != null){
+ if (webAppObj instanceof WebApp)
+ filesList = getConfigFilesForJ2EEApp(project);
+ else if (webAppObj instanceof org.eclipse.jst.javaee.web.WebApp)
+ filesList = getConfigFilesForJEEApp((org.eclipse.jst.javaee.web.WebApp)webAppObj);
+ }
}
-
}
return filesList;
}
Show replies by date