summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaren Butzke2012-10-31 10:38:16 (EDT)
committerKaren Butzke2012-10-31 10:38:16 (EDT)
commit5accb3e76e9c12d2142da10506b25c0c929de885 (patch)
tree1dd8c7c886b48307c16fcae37861379fe7a9878f
parent1401a964d72e96fa98c6c26e8c5db16a453c5826 (diff)
downloadwebtools.dali-5accb3e76e9c12d2142da10506b25c0c929de885.zip
webtools.dali-5accb3e76e9c12d2142da10506b25c0c929de885.tar.gz
webtools.dali-5accb3e76e9c12d2142da10506b25c0c929de885.tar.bz2
fixed NPE with binary class root structure nodev201210312255
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java
index cf94122..330804c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java
@@ -978,7 +978,9 @@ public abstract class AbstractJavaPersistentType
}
public void gatherRootStructureNodes(JpaFile jpaFile, Collection<JpaStructureNode> rootStructureNodes) {
- if (this.getResource().equals(jpaFile.getFile())) {
+ IResource resource = this.getResource();
+ // the resource can be null if the resource type is "external"
+ if (resource != null && resource.equals(jpaFile.getFile())) {
rootStructureNodes.add(this);
}
}