Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2008-05-12 12:20:25 +0000
committerkmoore2008-05-12 12:20:25 +0000
commit4c5c3fc578b7179c6d7ba91c994689426198c8ac (patch)
tree69e50126c9a589306d29583e31ee75fd7a64a8e3
parent01afce2e2a6133db36f63f7f8fef800026114759 (diff)
downloadwebtools.dali-4c5c3fc578b7179c6d7ba91c994689426198c8ac.tar.gz
webtools.dali-4c5c3fc578b7179c6d7ba91c994689426198c8ac.tar.xz
webtools.dali-4c5c3fc578b7179c6d7ba91c994689426198c8ac.zip
230999 - null check to fix validation exception
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaAttributeMapping.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaAttributeMapping.java
index 4426ec7fc7..24ec2e19f3 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaAttributeMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaAttributeMapping.java
@@ -79,7 +79,11 @@ public abstract class AbstractJavaAttributeMapping<T extends JavaResourceNode> e
}
public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getMappingResource().getTextRange(astRoot);
+ TextRange textRange = null;
+ T mappingResource = getMappingResource();
+ if (mappingResource != null) {
+ textRange = mappingResource.getTextRange(astRoot);
+ }
return (textRange != null) ? textRange : this.getPersistentAttribute().getValidationTextRange(astRoot);
}

Back to the top