From 0ac96b5f3b6672689dca9438d10f2617740998dd Mon Sep 17 00:00:00 2001 From: Wouter Zelle Date: Thu, 25 Oct 2007 11:06:06 +0000 Subject: [PATCH] generics git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5581 51baf565-9d33-0410-a72c-fc3788e3496d --- .../pmd/ast/ASTImportDeclarationTest.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pmd/regress/test/net/sourceforge/pmd/ast/ASTImportDeclarationTest.java b/pmd/regress/test/net/sourceforge/pmd/ast/ASTImportDeclarationTest.java index 234cc0d27e..31425e9d76 100644 --- a/pmd/regress/test/net/sourceforge/pmd/ast/ASTImportDeclarationTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/ast/ASTImportDeclarationTest.java @@ -5,6 +5,9 @@ package test.net.sourceforge.pmd.ast; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; + +import java.util.Set; + import net.sourceforge.pmd.PMD; import net.sourceforge.pmd.TargetJDK1_4; import net.sourceforge.pmd.ast.ASTImportDeclaration; @@ -14,14 +17,12 @@ import org.junit.Test; import test.net.sourceforge.pmd.testframework.ParserTst; -import java.util.Set; - public class ASTImportDeclarationTest extends ParserTst { @Test public void testImportOnDemand() throws Throwable { - Set ops = getNodes(ASTImportDeclaration.class, TEST1); - assertTrue(((ASTImportDeclaration) (ops.iterator().next())).isImportOnDemand()); + Set ops = getNodes(ASTImportDeclaration.class, TEST1); + assertTrue(ops.iterator().next().isImportOnDemand()); } @Test @@ -32,8 +33,8 @@ public class ASTImportDeclarationTest extends ParserTst { @Test public void testStaticImport() throws Throwable { - Set ops = getNodes(ASTImportDeclaration.class, TEST3); - ASTImportDeclaration i = (ASTImportDeclaration) (ops.iterator().next()); + Set ops = getNodes(ASTImportDeclaration.class, TEST3); + ASTImportDeclaration i = ops.iterator().next(); assertTrue(i.isStatic()); }