From 86be0ea5b280a07005d7b96f461972f467e005fd Mon Sep 17 00:00:00 2001 From: Tom Copeland Date: Fri, 27 Jun 2003 17:42:38 +0000 Subject: [PATCH] Cleaned up imports git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@2046 51baf565-9d33-0410-a72c-fc3788e3496d --- .../pmd/symboltable/AbstractScopeTest.java | 2 +- .../pmd/symboltable/BasicScopeFactoryTest.java | 17 ++--------------- .../pmd/symboltable/ClassScopeTest.java | 2 +- .../symboltable/ScopeCreationVisitorTest.java | 4 ++-- .../symboltable/BasicScopeCreationVisitor.java | 5 ----- .../pmd/symboltable/BasicScopeFactory.java | 7 +++---- 6 files changed, 9 insertions(+), 28 deletions(-) diff --git a/pmd/regress/test/net/sourceforge/pmd/symboltable/AbstractScopeTest.java b/pmd/regress/test/net/sourceforge/pmd/symboltable/AbstractScopeTest.java index 53142db588..5be0ea28c6 100644 --- a/pmd/regress/test/net/sourceforge/pmd/symboltable/AbstractScopeTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/symboltable/AbstractScopeTest.java @@ -4,11 +4,11 @@ import junit.framework.TestCase; import net.sourceforge.pmd.ast.ASTVariableDeclaratorId; import net.sourceforge.pmd.ast.SimpleNode; import net.sourceforge.pmd.symboltable.AbstractScope; +import net.sourceforge.pmd.symboltable.ClassScope; import net.sourceforge.pmd.symboltable.NameDeclaration; import net.sourceforge.pmd.symboltable.NameOccurrence; import net.sourceforge.pmd.symboltable.Scope; import net.sourceforge.pmd.symboltable.VariableNameDeclaration; -import net.sourceforge.pmd.symboltable.ClassScope; import java.util.Iterator; diff --git a/pmd/regress/test/net/sourceforge/pmd/symboltable/BasicScopeFactoryTest.java b/pmd/regress/test/net/sourceforge/pmd/symboltable/BasicScopeFactoryTest.java index 8327008532..9cbf043435 100644 --- a/pmd/regress/test/net/sourceforge/pmd/symboltable/BasicScopeFactoryTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/symboltable/BasicScopeFactoryTest.java @@ -1,25 +1,12 @@ package test.net.sourceforge.pmd.symboltable; import junit.framework.TestCase; -import net.sourceforge.pmd.ast.ASTBlock; -import net.sourceforge.pmd.ast.ASTClassBody; import net.sourceforge.pmd.ast.ASTCompilationUnit; -import net.sourceforge.pmd.ast.ASTConstructorDeclaration; -import net.sourceforge.pmd.ast.ASTForStatement; -import net.sourceforge.pmd.ast.ASTIfStatement; -import net.sourceforge.pmd.ast.ASTMethodDeclaration; -import net.sourceforge.pmd.ast.ASTTryStatement; -import net.sourceforge.pmd.ast.ASTUnmodifiedClassDeclaration; -import net.sourceforge.pmd.ast.ASTUnmodifiedInterfaceDeclaration; import net.sourceforge.pmd.ast.SimpleNode; -import net.sourceforge.pmd.symboltable.ClassScope; -import net.sourceforge.pmd.symboltable.GlobalScope; -import net.sourceforge.pmd.symboltable.LocalScope; -import net.sourceforge.pmd.symboltable.MethodScope; import net.sourceforge.pmd.symboltable.BasicScopeFactory; -import net.sourceforge.pmd.symboltable.ScopeFactory; -import net.sourceforge.pmd.symboltable.BasicScopeCreationVisitor; +import net.sourceforge.pmd.symboltable.GlobalScope; import net.sourceforge.pmd.symboltable.ScopeCreationVisitor; +import net.sourceforge.pmd.symboltable.ScopeFactory; public class BasicScopeFactoryTest extends TestCase { diff --git a/pmd/regress/test/net/sourceforge/pmd/symboltable/ClassScopeTest.java b/pmd/regress/test/net/sourceforge/pmd/symboltable/ClassScopeTest.java index 35a17fcf3e..d82d38421e 100644 --- a/pmd/regress/test/net/sourceforge/pmd/symboltable/ClassScopeTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/symboltable/ClassScopeTest.java @@ -6,7 +6,6 @@ import net.sourceforge.pmd.ast.SimpleNode; import net.sourceforge.pmd.symboltable.ClassScope; import net.sourceforge.pmd.symboltable.NameOccurrence; import net.sourceforge.pmd.symboltable.VariableNameDeclaration; -import net.sourceforge.pmd.symboltable.Scope; public class ClassScopeTest extends TestCase { @@ -41,6 +40,7 @@ public class ClassScopeTest extends TestCase { assertEquals("Foo", s.getClassName()); } + // FIXME - these will break when this goes from Anonymous$1 to Foo$1 public void testAnonymousInnerClassName() { ClassScope s = new ClassScope(); assertEquals("Anonymous$1", s.getClassName()); diff --git a/pmd/regress/test/net/sourceforge/pmd/symboltable/ScopeCreationVisitorTest.java b/pmd/regress/test/net/sourceforge/pmd/symboltable/ScopeCreationVisitorTest.java index 2e851dc45c..07c9e54ba0 100644 --- a/pmd/regress/test/net/sourceforge/pmd/symboltable/ScopeCreationVisitorTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/symboltable/ScopeCreationVisitorTest.java @@ -4,10 +4,10 @@ import junit.framework.TestCase; import net.sourceforge.pmd.ast.ASTCompilationUnit; import net.sourceforge.pmd.ast.ASTIfStatement; import net.sourceforge.pmd.ast.ASTTryStatement; -import net.sourceforge.pmd.symboltable.GlobalScope; -import net.sourceforge.pmd.symboltable.LocalScope; import net.sourceforge.pmd.symboltable.BasicScopeCreationVisitor; import net.sourceforge.pmd.symboltable.BasicScopeFactory; +import net.sourceforge.pmd.symboltable.GlobalScope; +import net.sourceforge.pmd.symboltable.LocalScope; public class ScopeCreationVisitorTest extends TestCase { diff --git a/pmd/src/net/sourceforge/pmd/symboltable/BasicScopeCreationVisitor.java b/pmd/src/net/sourceforge/pmd/symboltable/BasicScopeCreationVisitor.java index d4b44c7f5f..73384de217 100644 --- a/pmd/src/net/sourceforge/pmd/symboltable/BasicScopeCreationVisitor.java +++ b/pmd/src/net/sourceforge/pmd/symboltable/BasicScopeCreationVisitor.java @@ -1,8 +1,6 @@ package net.sourceforge.pmd.symboltable; -import net.sourceforge.pmd.ast.ASTAllocationExpression; import net.sourceforge.pmd.ast.ASTBlock; -import net.sourceforge.pmd.ast.ASTClassBody; import net.sourceforge.pmd.ast.ASTClassBodyDeclaration; import net.sourceforge.pmd.ast.ASTCompilationUnit; import net.sourceforge.pmd.ast.ASTConstructorDeclaration; @@ -15,9 +13,6 @@ import net.sourceforge.pmd.ast.ASTUnmodifiedClassDeclaration; import net.sourceforge.pmd.ast.ASTUnmodifiedInterfaceDeclaration; import net.sourceforge.pmd.ast.JavaParserVisitorAdapter; import net.sourceforge.pmd.ast.SimpleNode; -import net.sourceforge.pmd.ast.Node; - -import java.util.Stack; /** * Serves as a sort of adaptor between the AST nodes and the symbol table scopes diff --git a/pmd/src/net/sourceforge/pmd/symboltable/BasicScopeFactory.java b/pmd/src/net/sourceforge/pmd/symboltable/BasicScopeFactory.java index bf01746445..61ca12d079 100644 --- a/pmd/src/net/sourceforge/pmd/symboltable/BasicScopeFactory.java +++ b/pmd/src/net/sourceforge/pmd/symboltable/BasicScopeFactory.java @@ -1,6 +1,9 @@ package net.sourceforge.pmd.symboltable; +import net.sourceforge.pmd.ast.ASTAllocationExpression; import net.sourceforge.pmd.ast.ASTBlock; +import net.sourceforge.pmd.ast.ASTClassBody; +import net.sourceforge.pmd.ast.ASTClassBodyDeclaration; import net.sourceforge.pmd.ast.ASTCompilationUnit; import net.sourceforge.pmd.ast.ASTConstructorDeclaration; import net.sourceforge.pmd.ast.ASTForStatement; @@ -10,11 +13,7 @@ import net.sourceforge.pmd.ast.ASTSwitchStatement; import net.sourceforge.pmd.ast.ASTTryStatement; import net.sourceforge.pmd.ast.ASTUnmodifiedClassDeclaration; import net.sourceforge.pmd.ast.ASTUnmodifiedInterfaceDeclaration; -import net.sourceforge.pmd.ast.Node; import net.sourceforge.pmd.ast.SimpleNode; -import net.sourceforge.pmd.ast.ASTClassBodyDeclaration; -import net.sourceforge.pmd.ast.ASTClassBody; -import net.sourceforge.pmd.ast.ASTAllocationExpression; import java.util.HashSet; import java.util.Set;