From 1cef932cc41b07b325c5e71fa66bfef065d4b041 Mon Sep 17 00:00:00 2001 From: "Richard G. Curtis" Date: Mon, 17 May 2010 14:09:03 +0000 Subject: [PATCH] OPENJPA-1563: Fix StackOverlfowError in JPAFacadeHelper. git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@945171 13f79535-47bb-0310-9956-ffa450edef68 --- .../openjpa/persistence/util/TestJPAFacadeHelper.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/util/TestJPAFacadeHelper.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/util/TestJPAFacadeHelper.java index e3f45e441..f03ac207f 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/util/TestJPAFacadeHelper.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/util/TestJPAFacadeHelper.java @@ -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 SingleEMFTestCase { 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 oids) method sig. + Collection ids = new ArrayList(); + ids.add(new AllFieldTypes()); + JPAFacadeHelper.toOpenJPAObjectIds(cmd, ids); fail("Didn't fail!"); } catch (UserException re) { // expected