mirror of https://github.com/apache/openjpa.git
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:
parent
0416d6b54c
commit
80aea14f18
|
@ -392,6 +392,10 @@ public class JDBCStoreManager
|
||||||
for (Iterator itr = ((Collection) coll).iterator();
|
for (Iterator itr = ((Collection) coll).iterator();
|
||||||
itr.hasNext();) {
|
itr.hasNext();) {
|
||||||
PersistenceCapable pc = (PersistenceCapable) itr.next();
|
PersistenceCapable pc = (PersistenceCapable) itr.next();
|
||||||
|
|
||||||
|
if (pc == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
OpenJPAStateManager sm = (OpenJPAStateManager) pc.
|
OpenJPAStateManager sm = (OpenJPAStateManager) pc.
|
||||||
pcGetStateManager();
|
pcGetStateManager();
|
||||||
FieldMapping[] fmd = ((ClassMapping) sm.getMetaData()).
|
FieldMapping[] fmd = ((ClassMapping) sm.getMetaData()).
|
||||||
|
|
|
@ -32,7 +32,8 @@ public class TestChainEntities extends SingleEMFTestCase {
|
||||||
long aid;
|
long aid;
|
||||||
|
|
||||||
public void setUp () {
|
public void setUp () {
|
||||||
setUp (ChainEntityA.class, ChainEntityB.class, ChainEntityC.class);
|
setUp (DROP_TABLES,
|
||||||
|
ChainEntityA.class, ChainEntityB.class, ChainEntityC.class);
|
||||||
// Create A
|
// Create A
|
||||||
ChainEntityA a = new ChainEntityA ();
|
ChainEntityA a = new ChainEntityA ();
|
||||||
a.setName ("TEST_A");
|
a.setName ("TEST_A");
|
||||||
|
|
Loading…
Reference in New Issue