Return-Path: X-Original-To: apmail-db-torque-dev-archive@www.apache.org Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5D0896B8B for ; Sun, 31 Jul 2011 13:56:44 +0000 (UTC) Received: (qmail 95150 invoked by uid 500); 31 Jul 2011 13:56:44 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 95131 invoked by uid 500); 31 Jul 2011 13:56:43 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 95123 invoked by uid 500); 31 Jul 2011 13:56:43 -0000 Received: (qmail 95120 invoked by uid 99); 31 Jul 2011 13:56:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Jul 2011 13:56:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Jul 2011 13:56:40 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 752B023888C2; Sun, 31 Jul 2011 13:56:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1152581 - /db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/DocsTest.java Date: Sun, 31 Jul 2011 13:56:19 -0000 To: torque-commits@db.apache.org From: tfischer@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110731135619.752B023888C2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tfischer Date: Sun Jul 31 13:56:18 2011 New Revision: 1152581 URL: http://svn.apache.org/viewvc?rev=1152581&view=rev Log: used generics for Lists Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/DocsTest.java Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/DocsTest.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/DocsTest.java?rev=1152581&r1=1152580&r2=1152581&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/DocsTest.java (original) +++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/DocsTest.java Sun Jul 31 13:56:18 2011 @@ -154,7 +154,7 @@ public class DocsTest extends BaseRuntim */ public void testCriteriaOrderBy() { - List books = null; + List books = null; try { Criteria criteria = new Criteria(); @@ -171,7 +171,7 @@ public class DocsTest extends BaseRuntim + " : " + e.getMessage()); } - Book book = (Book) books.get(0); + Book book = books.get(0); assertTrue( "title of first book is not" + BOOK_1_TITLE @@ -180,7 +180,7 @@ public class DocsTest extends BaseRuntim BOOK_1_TITLE.equals(book.getTitle()) ); - book = (Book) books.get(2); + book = books.get(2); assertTrue( "ISBN of third book is not" + BOOK_3_ISBN @@ -195,7 +195,7 @@ public class DocsTest extends BaseRuntim public void testCriteriaJoins() { // inner joins - List bookAuthors = null; + List bookAuthors = null; try { Criteria criteria = new Criteria(); @@ -207,8 +207,8 @@ public class DocsTest extends BaseRuntim bookAuthors = AuthorPeer.doSelect(criteria); // from Details section - Author author = (Author) bookAuthors.get(0); - List books = author.getBooks(); + Author author = bookAuthors.get(0); + List books = author.getBooks(); } catch (Exception e) { @@ -302,7 +302,7 @@ public class DocsTest extends BaseRuntim */ public void testDistinct() { - List bookAuthors = null; + List bookAuthors = null; try { Criteria criteria = new Criteria(); @@ -332,7 +332,7 @@ public class DocsTest extends BaseRuntim */ public void testJoinOrderDistinct() { - List bookAuthors = null; + List bookAuthors = null; try { Criteria criteria = new Criteria(); @@ -357,7 +357,7 @@ public class DocsTest extends BaseRuntim + bookAuthors.size(), bookAuthors.size() == 2); - Author author = (Author) bookAuthors.get(0); + Author author = bookAuthors.get(0); assertTrue( "Author of first book is not" + AUTHOR_1_NAME @@ -365,7 +365,7 @@ public class DocsTest extends BaseRuntim + author.getName(), AUTHOR_1_NAME.equals(author.getName())); - author = (Author) bookAuthors.get(1); + author = bookAuthors.get(1); assertTrue( "Author of second book is not" + AUTHOR_2_NAME @@ -398,7 +398,7 @@ public class DocsTest extends BaseRuntim Criteria criteria = new Criteria(); criteria.add(AuthorPeer.AUTHOR_ID, subquery); - List authors = AuthorPeer.doSelect(criteria); + List authors = AuthorPeer.doSelect(criteria); assertEquals("Expected list of size 1 but got " + authors.size(), 1, authors.size()); --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org