Author: max.andersen(a)jboss.com
Date: 2007-11-09 19:45:53 -0500 (Fri, 09 Nov 2007)
New Revision: 4830
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
Log:
JBIDE-1288 Fix NPE
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2007-11-09
16:15:24 UTC (rev 4829)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2007-11-10
00:45:53 UTC (rev 4830)
@@ -406,7 +406,10 @@
ArrayList<String> l = new ArrayList<String>();
for (int i = 0; i < es.length; i++) {
if(es[i].getEntryKind() != IClasspathEntry.CPE_SOURCE) continue;
- l.add(project.findMember(es[i].getPath().removeFirstSegments(1)).getLocation().toString());
+ IResource member = project.findMember(es[i].getPath().removeFirstSegments(1);
+ if(member.exists()) { // The member might not exist!
+ l.add(member.getLocation().toString());
+ }
}
return l.toArray(new String[0]);
} catch (Exception e) {
Show replies by date