Author: tv Date: Fri Jan 4 08:23:54 2019 New Revision: 1850325 URL: http://svn.apache.org/viewvc?rev=1850325&view=rev Log: Fix conditional test
Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/ManagerTestConditional.java Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/ManagerTestConditional.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/ManagerTestConditional.java?rev=1850325&r1=1850324&r2=1850325&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/ManagerTestConditional.java (original) +++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/ManagerTestConditional.java Fri Jan 4 08:23:54 2019 @@ -21,6 +21,8 @@ package org.apache.torque; import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; import org.apache.torque.om.ObjectKey; import org.apache.torque.test.dbobject.Author; @@ -90,9 +92,9 @@ public class ManagerTestConditional exte author2.setName("author2"); author2.save(); - List<ObjectKey> authorKeys = new ArrayList<ObjectKey>(); - authorKeys.add(author1.getPrimaryKey()); - authorKeys.add(author2.getPrimaryKey()); + List<ObjectKey<?>> authorKeys = + Stream.of(author1.getPrimaryKey(), author2.getPrimaryKey()) + .collect(Collectors.toList()); List<Author> authors = AuthorManager.getInstances(authorKeys); assertSame(author1, authors.get(0)); assertSame(author2, authors.get(1)); @@ -119,7 +121,7 @@ public class ManagerTestConditional exte public void testGetInstancesEmpty() throws Exception { List<Author> authors - = AuthorManager.getInstances(new ArrayList<ObjectKey>()); + = AuthorManager.getInstances(new ArrayList<ObjectKey<?>>()); assertEquals(new ArrayList<Author>(), authors); } --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscr...@db.apache.org For additional commands, e-mail: torque-dev-h...@db.apache.org