OPENJPA-912 Potential NPE in setInverseRelation

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@741994 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Catalina Wei 2009-02-08 01:43:45 +00:00
parent 0416d6b54c
commit 80aea14f18
2 changed files with 6 additions and 1 deletions

View File

@ -392,6 +392,10 @@ public class JDBCStoreManager
for (Iterator itr = ((Collection) coll).iterator();
itr.hasNext();) {
PersistenceCapable pc = (PersistenceCapable) itr.next();
if (pc == null)
continue;
OpenJPAStateManager sm = (OpenJPAStateManager) pc.
pcGetStateManager();
FieldMapping[] fmd = ((ClassMapping) sm.getMetaData()).

View File

@ -32,7 +32,8 @@ public class TestChainEntities extends SingleEMFTestCase {
long aid;
public void setUp () {
setUp (ChainEntityA.class, ChainEntityB.class, ChainEntityC.class);
setUp (DROP_TABLES,
ChainEntityA.class, ChainEntityB.class, ChainEntityC.class);
// Create A
ChainEntityA a = new ChainEntityA ();
a.setName ("TEST_A");