openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curti...@apache.org
Subject svn commit: r945171 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/util/TestJPAFacadeHelper.java
Date Mon, 17 May 2010 14:09:04 GMT
Author: curtisr7
Date: Mon May 17 14:09:03 2010
New Revision: 945171

URL: http://svn.apache.org/viewvc?rev=945171&view=rev
Log:
OPENJPA-1563: Fix StackOverlfowError in JPAFacadeHelper.

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/util/TestJPAFacadeHelper.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/util/TestJPAFacadeHelper.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/util/TestJPAFacadeHelper.java?rev=945171&r1=945170&r2=945171&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/util/TestJPAFacadeHelper.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/util/TestJPAFacadeHelper.java
Mon May 17 14:09:03 2010
@@ -18,6 +18,9 @@
  */
 package org.apache.openjpa.persistence.util;
 
+import java.util.ArrayList;
+import java.util.Collection;
+
 import org.apache.openjpa.meta.ClassMetaData;
 import org.apache.openjpa.meta.MetaDataRepository;
 import org.apache.openjpa.persistence.JPAFacadeHelper;
@@ -115,7 +118,11 @@ public class TestJPAFacadeHelper extends
     public void testNoId() throws Exception {
         ClassMetaData cmd = repo.getMetaData(AllFieldTypes.class, null, true);
         try {
-            JPAFacadeHelper.toOpenJPAObjectId(cmd, new AllFieldTypes());
+            // Don't parameterize this collection to force the JVM to use the 
+            // ...(ClassMetaData meta, Collection<Object> oids) method sig.
+            Collection ids = new ArrayList<AllFieldTypes>();
+            ids.add(new AllFieldTypes());
+            JPAFacadeHelper.toOpenJPAObjectIds(cmd, ids);
             fail("Didn't fail!");
         } catch (UserException re) {
             // expected



Mime
View raw message