Author: max.andersen(a)jboss.com
Date: 2009-03-09 07:22:28 -0400 (Mon, 09 Mar 2009)
New Revision: 14102
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/RegistrationHelper.java
Log:
added null/empty checks for JBIDE-3972
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/RegistrationHelper.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/RegistrationHelper.java 2009-03-09
09:56:54 UTC (rev 14101)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/RegistrationHelper.java 2009-03-09
11:22:28 UTC (rev 14102)
@@ -192,14 +192,14 @@
// There may be a few modules for resources from the same project.
// Ignore module with jboss.singlefile type if there are other module types.
IModule[] modules = ServerUtil.getModules(project);
- if(modules.length>0) {
+ if(modules != null && modules.length>0) {
for (int i = 0; i < modules.length; i++) {
if(!"jboss.singlefile".equals(modules[i].getModuleType().getId())) {
return modules[i];
}
}
}
- return modules[0];
+ return null;
}
public static void runRegisterInServerJob(IProject p, IServer server) {
Show replies by date