openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curti...@apache.org
Subject svn commit: r945172 - /openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAFacadeHelper.java
Date Mon, 17 May 2010 14:10:30 GMT
Author: curtisr7
Date: Mon May 17 14:10:30 2010
New Revision: 945172

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

Modified:
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAFacadeHelper.java

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAFacadeHelper.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAFacadeHelper.java?rev=945172&r1=945171&r2=945172&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAFacadeHelper.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAFacadeHelper.java
Mon May 17 14:10:30 2010
@@ -20,6 +20,7 @@ package org.apache.openjpa.persistence;
 
 import java.math.BigDecimal;
 import java.math.BigInteger;
+import java.util.Arrays;
 import java.util.Collection;
 
 import javax.persistence.EntityManager;
@@ -305,9 +306,13 @@ public class JPAFacadeHelper {
      * Return a collection of OpenJPA oids for the given native oid collection.
      */
     public static Collection<Object> toOpenJPAObjectIds(ClassMetaData meta, Collection<Object>
oids) {
-        return toOpenJPAObjectIds(meta, oids);
+        if (oids == null || oids.size() == 0) {
+            return oids;
+        }
+        return Arrays.asList(toOpenJPAObjectIds(meta, oids.toArray()));
     }
 
+    
     /**
      * Translate from a OpenJPA identity class to a native one.
      */



Mime
View raw message