cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r571946 - /cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/bridge/DataMapConverter.java
Date Sun, 02 Sep 2007 10:49:53 GMT
Author: aadamchik
Date: Sun Sep  2 03:49:52 2007
New Revision: 571946

URL: http://svn.apache.org/viewvc?rev=571946&view=rev
Log:
better NPE detection

Modified:
    cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/bridge/DataMapConverter.java

Modified: cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/bridge/DataMapConverter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/bridge/DataMapConverter.java?rev=571946&r1=571945&r2=571946&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/bridge/DataMapConverter.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/bridge/DataMapConverter.java
Sun Sep  2 03:49:52 2007
@@ -414,6 +414,13 @@
             JpaId jpaTargetId = targetEntity.getAttributes().getId(
                     jpaJoin.getReferencedColumnName());
 
+            if (jpaTargetId == null) {
+                throw new IllegalArgumentException("Null id "
+                        + targetEntity.getName()
+                        + "."
+                        + jpaJoin.getReferencedColumnName());
+            }
+
             ObjRelationship objRelationship = (ObjRelationship) targetPath.getObject();
             DataMap dataMap = objRelationship.getSourceEntity().getDataMap();
 



Mime
View raw message