openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r746282 - in /openjpa/branches/1.2.x: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestChainEntities.java
Date Fri, 20 Feb 2009 16:17:44 GMT
Author: mikedd
Date: Fri Feb 20 16:17:43 2009
New Revision: 746282

URL: http://svn.apache.org/viewvc?rev=746282&view=rev
Log:
OPENJPA-912. Merging changes from trunk originally written by Catalina Wei. Check for null.

Modified:
    openjpa/branches/1.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java
    openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestChainEntities.java

Modified: openjpa/branches/1.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java?rev=746282&r1=746281&r2=746282&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java
(original)
+++ openjpa/branches/1.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java
Fri Feb 20 16:17:43 2009
@@ -406,6 +406,10 @@
                     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()).

Modified: openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestChainEntities.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestChainEntities.java?rev=746282&r1=746281&r2=746282&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestChainEntities.java
(original)
+++ openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestChainEntities.java
Fri Feb 20 16:17:43 2009
@@ -32,7 +32,8 @@
 	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");



Mime
View raw message