Author: fbricon
Date: 2012-03-01 03:14:15 -0500 (Thu, 01 Mar 2012)
New Revision: 39218
Modified:
branches/jbosstools-3.3.0.Beta1/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/utils/xpl/JSFAppConfigUtils.java
Log:
JBIDE-11078 guard against NPE for non web projects
Modified:
branches/jbosstools-3.3.0.Beta1/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/utils/xpl/JSFAppConfigUtils.java
===================================================================
---
branches/jbosstools-3.3.0.Beta1/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/utils/xpl/JSFAppConfigUtils.java 2012-03-01
07:59:20 UTC (rev 39217)
+++
branches/jbosstools-3.3.0.Beta1/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/utils/xpl/JSFAppConfigUtils.java 2012-03-01
08:14:15 UTC (rev 39218)
@@ -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