OPENJPA-1563: Fix StackOverlfowError in JPAFacadeHelper.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@945171 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Richard G. Curtis 2010-05-17 14:09:03 +00:00
parent 4c0dbdb6fc
commit 1cef932cc4
1 changed files with 8 additions and 1 deletions

View File

@ -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<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