Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jpa
diff options
context:
space:
mode:
authorkmoore2010-05-05 20:51:18 +0000
committerkmoore2010-05-05 20:51:18 +0000
commit403412d647306807ee8380972076ecc8d2c5185b (patch)
tree752893ca209c4392cade7716e56c27b2b96dabd2 /jpa
parent4e6a214b701e62f1977aace972a7973a5c4e3158 (diff)
downloadwebtools.dali-403412d647306807ee8380972076ecc8d2c5185b.tar.gz
webtools.dali-403412d647306807ee8380972076ecc8d2c5185b.tar.xz
webtools.dali-403412d647306807ee8380972076ecc8d2c5185b.zip
311788 - null checks to prevent NPE when the relationship is invalid
Diffstat (limited to 'jpa')
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/JoinColumnInJoiningStrategyStateObject.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/JoinColumnInJoiningStrategyStateObject.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/JoinColumnInJoiningStrategyStateObject.java
index a3d67d7cd0..4cd5c81bf9 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/JoinColumnInJoiningStrategyStateObject.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/JoinColumnInJoiningStrategyStateObject.java
@@ -57,7 +57,8 @@ public class JoinColumnInJoiningStrategyStateObject
}
protected Schema getDbSchema() {
- return getRelationshipSource().getDbSchema();
+ TypeMapping typeMapping = getRelationshipSource();
+ return typeMapping == null ? null : typeMapping.getDbSchema();
}
protected TypeMapping getRelationshipSource() {
@@ -75,8 +76,8 @@ public class JoinColumnInJoiningStrategyStateObject
if (joinColumn != null) {
return joinColumn.getDefaultTable();
}
-
- return getRelationshipSource().getPrimaryTableName();
+ TypeMapping typeMapping = getRelationshipSource();
+ return typeMapping == null ? null : typeMapping.getPrimaryTableName();
}
@Override

Back to the top