diff --git a/pmd/regress/test/net/sourceforge/pmd/AbstractRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/AbstractRuleTest.java index 4c5b1cba3e..f56677b027 100644 --- a/pmd/regress/test/net/sourceforge/pmd/AbstractRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/AbstractRuleTest.java @@ -7,8 +7,8 @@ package test.net.sourceforge.pmd; import junit.framework.TestCase; import net.sourceforge.pmd.AbstractRule; -import net.sourceforge.pmd.RuleViolation; import net.sourceforge.pmd.RuleContext; +import net.sourceforge.pmd.RuleViolation; public class AbstractRuleTest extends TestCase { diff --git a/pmd/regress/test/net/sourceforge/pmd/MockRule.java b/pmd/regress/test/net/sourceforge/pmd/MockRule.java index ddf7c30efe..83b1ade175 100644 --- a/pmd/regress/test/net/sourceforge/pmd/MockRule.java +++ b/pmd/regress/test/net/sourceforge/pmd/MockRule.java @@ -5,9 +5,16 @@ */ package test.net.sourceforge.pmd; -import net.sourceforge.pmd.*; +import net.sourceforge.pmd.Report; +import net.sourceforge.pmd.Rule; +import net.sourceforge.pmd.RuleContext; +import net.sourceforge.pmd.RuleProperties; +import net.sourceforge.pmd.RuleViolation; -import java.util.*; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; public class MockRule implements Rule { diff --git a/pmd/regress/test/net/sourceforge/pmd/ReportTest.java b/pmd/regress/test/net/sourceforge/pmd/ReportTest.java index e60fa454c0..70899d4bcd 100644 --- a/pmd/regress/test/net/sourceforge/pmd/ReportTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/ReportTest.java @@ -6,10 +6,13 @@ package test.net.sourceforge.pmd; import junit.framework.TestCase; +import net.sourceforge.pmd.Report; +import net.sourceforge.pmd.ReportListener; +import net.sourceforge.pmd.RuleContext; +import net.sourceforge.pmd.RuleViolation; import net.sourceforge.pmd.renderers.Renderer; import net.sourceforge.pmd.renderers.XMLRenderer; import net.sourceforge.pmd.stat.Metric; -import net.sourceforge.pmd.*; import java.util.Iterator; diff --git a/pmd/regress/test/net/sourceforge/pmd/RuleContextTest.java b/pmd/regress/test/net/sourceforge/pmd/RuleContextTest.java index 5d85f54ccb..d181b57b83 100644 --- a/pmd/regress/test/net/sourceforge/pmd/RuleContextTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/RuleContextTest.java @@ -6,8 +6,8 @@ package test.net.sourceforge.pmd; import junit.framework.TestCase; -import net.sourceforge.pmd.RuleContext; import net.sourceforge.pmd.Report; +import net.sourceforge.pmd.RuleContext; public class RuleContextTest extends TestCase { diff --git a/pmd/regress/test/net/sourceforge/pmd/RuleSetFactoryTest.java b/pmd/regress/test/net/sourceforge/pmd/RuleSetFactoryTest.java index dac7e6dc4b..7bafd88ba8 100644 --- a/pmd/regress/test/net/sourceforge/pmd/RuleSetFactoryTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/RuleSetFactoryTest.java @@ -6,15 +6,15 @@ package test.net.sourceforge.pmd; import junit.framework.TestCase; +import net.sourceforge.pmd.Rule; import net.sourceforge.pmd.RuleSet; import net.sourceforge.pmd.RuleSetFactory; -import net.sourceforge.pmd.Rule; import net.sourceforge.pmd.RuleSetNotFoundException; import java.io.ByteArrayInputStream; +import java.util.HashSet; import java.util.Iterator; import java.util.Set; -import java.util.HashSet; public class RuleSetFactoryTest extends TestCase { diff --git a/pmd/regress/test/net/sourceforge/pmd/RuleSetReadWriteTest.java b/pmd/regress/test/net/sourceforge/pmd/RuleSetReadWriteTest.java index 9beec4bd97..b278e629ff 100644 --- a/pmd/regress/test/net/sourceforge/pmd/RuleSetReadWriteTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/RuleSetReadWriteTest.java @@ -1,5 +1,13 @@ package test.net.sourceforge.pmd; +import junit.framework.TestCase; +import net.sourceforge.pmd.PMDException; +import net.sourceforge.pmd.Rule; +import net.sourceforge.pmd.RuleProperties; +import net.sourceforge.pmd.RuleSet; +import net.sourceforge.pmd.RuleSetReader; +import net.sourceforge.pmd.RuleSetWriter; + import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.InputStream; @@ -8,15 +16,6 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Set; -import junit.framework.TestCase; - -import net.sourceforge.pmd.PMDException; -import net.sourceforge.pmd.Rule; -import net.sourceforge.pmd.RuleProperties; -import net.sourceforge.pmd.RuleSet; -import net.sourceforge.pmd.RuleSetReader; -import net.sourceforge.pmd.RuleSetWriter; - /** * A test for reading and writing a rule set file. The registered rule sets diff --git a/pmd/regress/test/net/sourceforge/pmd/RuleSetTest.java b/pmd/regress/test/net/sourceforge/pmd/RuleSetTest.java index 1d6d42090f..dbf9b93ee0 100644 --- a/pmd/regress/test/net/sourceforge/pmd/RuleSetTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/RuleSetTest.java @@ -1,19 +1,20 @@ package test.net.sourceforge.pmd; -import net.sourceforge.pmd.*; -import net.sourceforge.pmd.ast.*; +import junit.framework.TestCase; +import net.sourceforge.pmd.Report; +import net.sourceforge.pmd.RuleContext; +import net.sourceforge.pmd.RuleSet; +import net.sourceforge.pmd.RuleViolation; +import net.sourceforge.pmd.ast.JavaParser; import java.io.StringReader; - -import java.util.Set; -import java.util.List; -import java.util.Random; -import java.util.HashSet; -import java.util.Iterator; import java.util.ArrayList; import java.util.Collections; - -import junit.framework.*; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Random; +import java.util.Set; public class RuleSetTest extends TestCase { diff --git a/pmd/regress/test/net/sourceforge/pmd/RuleViolationTest.java b/pmd/regress/test/net/sourceforge/pmd/RuleViolationTest.java index ace7eddcb1..3c5abbf75b 100644 --- a/pmd/regress/test/net/sourceforge/pmd/RuleViolationTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/RuleViolationTest.java @@ -1,11 +1,9 @@ package test.net.sourceforge.pmd; -import junit.framework.*; -import java.util.*; - +import junit.framework.TestCase; import net.sourceforge.pmd.Rule; -import net.sourceforge.pmd.RuleViolation; import net.sourceforge.pmd.RuleContext; +import net.sourceforge.pmd.RuleViolation; public class RuleViolationTest extends TestCase { diff --git a/pmd/regress/test/net/sourceforge/pmd/ast/ASTVariableDeclaratorIdTest.java b/pmd/regress/test/net/sourceforge/pmd/ast/ASTVariableDeclaratorIdTest.java index a287476dee..71ec95627c 100644 --- a/pmd/regress/test/net/sourceforge/pmd/ast/ASTVariableDeclaratorIdTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/ast/ASTVariableDeclaratorIdTest.java @@ -6,9 +6,9 @@ package test.net.sourceforge.pmd.ast; import junit.framework.TestCase; -import net.sourceforge.pmd.ast.ASTVariableDeclaratorId; -import net.sourceforge.pmd.ast.ASTTryStatement; import net.sourceforge.pmd.ast.ASTBlock; +import net.sourceforge.pmd.ast.ASTTryStatement; +import net.sourceforge.pmd.ast.ASTVariableDeclaratorId; public class ASTVariableDeclaratorIdTest extends TestCase { diff --git a/pmd/regress/test/net/sourceforge/pmd/ast/AccessNodeTest.java b/pmd/regress/test/net/sourceforge/pmd/ast/AccessNodeTest.java index 5b982e6bac..45986f0a73 100644 --- a/pmd/regress/test/net/sourceforge/pmd/ast/AccessNodeTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/ast/AccessNodeTest.java @@ -1,8 +1,7 @@ package test.net.sourceforge.pmd.ast; -import net.sourceforge.pmd.ast.*; - -import junit.framework.*; +import junit.framework.TestCase; +import net.sourceforge.pmd.ast.AccessNode; public class AccessNodeTest extends TestCase diff --git a/pmd/regress/test/net/sourceforge/pmd/ast/ClassDeclTest.java b/pmd/regress/test/net/sourceforge/pmd/ast/ClassDeclTest.java index 1b0476bb9e..18034f4851 100644 --- a/pmd/regress/test/net/sourceforge/pmd/ast/ClassDeclTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/ast/ClassDeclTest.java @@ -1,9 +1,9 @@ package test.net.sourceforge.pmd.ast; -import java.util.Set; -import java.util.Iterator; +import net.sourceforge.pmd.ast.ASTClassDeclaration; -import net.sourceforge.pmd.ast.*; +import java.util.Iterator; +import java.util.Set; public class ClassDeclTest extends ParserTst diff --git a/pmd/regress/test/net/sourceforge/pmd/ast/FieldDeclTest.java b/pmd/regress/test/net/sourceforge/pmd/ast/FieldDeclTest.java index 41366dc49a..feff39c94e 100644 --- a/pmd/regress/test/net/sourceforge/pmd/ast/FieldDeclTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/ast/FieldDeclTest.java @@ -1,9 +1,9 @@ package test.net.sourceforge.pmd.ast; -import java.util.Set; -import java.util.Iterator; +import net.sourceforge.pmd.ast.ASTFieldDeclaration; -import net.sourceforge.pmd.ast.*; +import java.util.Iterator; +import java.util.Set; public class FieldDeclTest extends ParserTst diff --git a/pmd/regress/test/net/sourceforge/pmd/ast/MethodDeclTest.java b/pmd/regress/test/net/sourceforge/pmd/ast/MethodDeclTest.java index 22a29938ee..6b4fd8ce69 100644 --- a/pmd/regress/test/net/sourceforge/pmd/ast/MethodDeclTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/ast/MethodDeclTest.java @@ -1,13 +1,10 @@ package test.net.sourceforge.pmd.ast; -import java.io.StringReader; +import net.sourceforge.pmd.ast.ASTMethodDeclaration; -import java.util.Map; import java.util.Iterator; import java.util.Set; -import net.sourceforge.pmd.ast.*; - public class MethodDeclTest extends ParserTst { diff --git a/pmd/regress/test/net/sourceforge/pmd/ast/ParserTst.java b/pmd/regress/test/net/sourceforge/pmd/ast/ParserTst.java index 2f2148e036..93f8e44efb 100644 --- a/pmd/regress/test/net/sourceforge/pmd/ast/ParserTst.java +++ b/pmd/regress/test/net/sourceforge/pmd/ast/ParserTst.java @@ -1,15 +1,16 @@ package test.net.sourceforge.pmd.ast; import junit.framework.TestCase; - -import java.util.Set; -import java.util.HashSet; +import net.sourceforge.pmd.ast.ASTCompilationUnit; +import net.sourceforge.pmd.ast.JavaParser; +import net.sourceforge.pmd.ast.JavaParserVisitor; import java.io.StringReader; - -import java.lang.reflect.*; - -import net.sourceforge.pmd.ast.*; +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.Method; +import java.lang.reflect.Proxy; +import java.util.HashSet; +import java.util.Set; public class ParserTst extends TestCase diff --git a/pmd/regress/test/net/sourceforge/pmd/ast/SimpleNodeTest.java b/pmd/regress/test/net/sourceforge/pmd/ast/SimpleNodeTest.java index a5e6e60148..b0124cc68c 100644 --- a/pmd/regress/test/net/sourceforge/pmd/ast/SimpleNodeTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/ast/SimpleNodeTest.java @@ -1,11 +1,17 @@ package test.net.sourceforge.pmd.ast; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTBlock; +import net.sourceforge.pmd.ast.ASTBlockStatement; +import net.sourceforge.pmd.ast.ASTMethodDeclaration; +import net.sourceforge.pmd.ast.ASTName; +import net.sourceforge.pmd.ast.ASTReturnStatement; +import net.sourceforge.pmd.ast.ASTUnmodifiedClassDeclaration; +import net.sourceforge.pmd.ast.SimpleNode; -import java.util.Set; -import java.util.Iterator; import java.util.ArrayList; +import java.util.Iterator; import java.util.List; +import java.util.Set; public class SimpleNodeTest extends ParserTst diff --git a/pmd/regress/test/net/sourceforge/pmd/cpd/CPDTest.java b/pmd/regress/test/net/sourceforge/pmd/cpd/CPDTest.java index 7d26b08ef2..1b561f7bb1 100644 --- a/pmd/regress/test/net/sourceforge/pmd/cpd/CPDTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/cpd/CPDTest.java @@ -6,11 +6,14 @@ package test.net.sourceforge.pmd.cpd; import junit.framework.TestCase; -import net.sourceforge.pmd.cpd.*; +import net.sourceforge.pmd.cpd.CPD; +import net.sourceforge.pmd.cpd.Results; +import net.sourceforge.pmd.cpd.Tile; +import net.sourceforge.pmd.cpd.TokenEntry; +import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import java.util.ArrayList; public class CPDTest extends TestCase{ diff --git a/pmd/regress/test/net/sourceforge/pmd/cpd/GSTTest.java b/pmd/regress/test/net/sourceforge/pmd/cpd/GSTTest.java index 031892e070..40ce343daa 100644 --- a/pmd/regress/test/net/sourceforge/pmd/cpd/GSTTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/cpd/GSTTest.java @@ -6,7 +6,12 @@ package test.net.sourceforge.pmd.cpd; import junit.framework.TestCase; -import net.sourceforge.pmd.cpd.*; +import net.sourceforge.pmd.cpd.GST; +import net.sourceforge.pmd.cpd.Results; +import net.sourceforge.pmd.cpd.Tile; +import net.sourceforge.pmd.cpd.TokenEntry; +import net.sourceforge.pmd.cpd.TokenList; +import net.sourceforge.pmd.cpd.TokenSets; import java.util.Iterator; diff --git a/pmd/regress/test/net/sourceforge/pmd/cpd/JavaTokensTokenizerTest.java b/pmd/regress/test/net/sourceforge/pmd/cpd/JavaTokensTokenizerTest.java index bd149a3475..397884cd1f 100644 --- a/pmd/regress/test/net/sourceforge/pmd/cpd/JavaTokensTokenizerTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/cpd/JavaTokensTokenizerTest.java @@ -6,8 +6,8 @@ package test.net.sourceforge.pmd.cpd; import junit.framework.TestCase; -import net.sourceforge.pmd.cpd.TokenList; import net.sourceforge.pmd.cpd.JavaTokensTokenizer; +import net.sourceforge.pmd.cpd.TokenList; import net.sourceforge.pmd.cpd.Tokenizer; import java.io.StringReader; diff --git a/pmd/regress/test/net/sourceforge/pmd/cpd/OccurrencesTest.java b/pmd/regress/test/net/sourceforge/pmd/cpd/OccurrencesTest.java index 84e15170ff..aa818c92a7 100644 --- a/pmd/regress/test/net/sourceforge/pmd/cpd/OccurrencesTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/cpd/OccurrencesTest.java @@ -6,7 +6,10 @@ package test.net.sourceforge.pmd.cpd; import junit.framework.TestCase; -import net.sourceforge.pmd.cpd.*; +import net.sourceforge.pmd.cpd.Occurrences; +import net.sourceforge.pmd.cpd.Tile; +import net.sourceforge.pmd.cpd.TokenEntry; +import net.sourceforge.pmd.cpd.TokenSets; import java.util.Iterator; diff --git a/pmd/regress/test/net/sourceforge/pmd/cpd/ResultsTest.java b/pmd/regress/test/net/sourceforge/pmd/cpd/ResultsTest.java index decab77b63..670d67e39f 100644 --- a/pmd/regress/test/net/sourceforge/pmd/cpd/ResultsTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/cpd/ResultsTest.java @@ -7,9 +7,9 @@ package test.net.sourceforge.pmd.cpd; import junit.framework.TestCase; import net.sourceforge.pmd.cpd.Results; +import net.sourceforge.pmd.cpd.ResultsImpl; import net.sourceforge.pmd.cpd.Tile; import net.sourceforge.pmd.cpd.TokenEntry; -import net.sourceforge.pmd.cpd.ResultsImpl; import java.util.Iterator; diff --git a/pmd/regress/test/net/sourceforge/pmd/cpd/TokenListTest.java b/pmd/regress/test/net/sourceforge/pmd/cpd/TokenListTest.java index e13c0d8e55..3d445284ef 100644 --- a/pmd/regress/test/net/sourceforge/pmd/cpd/TokenListTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/cpd/TokenListTest.java @@ -6,9 +6,9 @@ package test.net.sourceforge.pmd.cpd; import junit.framework.TestCase; -import net.sourceforge.pmd.cpd.TokenList; -import net.sourceforge.pmd.cpd.TokenEntry; import net.sourceforge.pmd.cpd.Tile; +import net.sourceforge.pmd.cpd.TokenEntry; +import net.sourceforge.pmd.cpd.TokenList; import java.util.ArrayList; import java.util.List; diff --git a/pmd/regress/test/net/sourceforge/pmd/cpd/TokenSetsTest.java b/pmd/regress/test/net/sourceforge/pmd/cpd/TokenSetsTest.java index 1a0b2a7527..65db515bd8 100644 --- a/pmd/regress/test/net/sourceforge/pmd/cpd/TokenSetsTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/cpd/TokenSetsTest.java @@ -6,9 +6,9 @@ package test.net.sourceforge.pmd.cpd; import junit.framework.TestCase; -import net.sourceforge.pmd.cpd.TokenSets; -import net.sourceforge.pmd.cpd.TokenList; import net.sourceforge.pmd.cpd.TokenEntry; +import net.sourceforge.pmd.cpd.TokenList; +import net.sourceforge.pmd.cpd.TokenSets; public class TokenSetsTest extends TestCase { diff --git a/pmd/regress/test/net/sourceforge/pmd/renderers/XMLRendererTest.java b/pmd/regress/test/net/sourceforge/pmd/renderers/XMLRendererTest.java index 28a718ce6f..b0e194fca4 100644 --- a/pmd/regress/test/net/sourceforge/pmd/renderers/XMLRendererTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/renderers/XMLRendererTest.java @@ -1,15 +1,15 @@ package test.net.sourceforge.pmd.renderers; import junit.framework.TestCase; - -import java.util.List; -import java.util.Iterator; -import java.util.ArrayList; - +import net.sourceforge.pmd.Report; +import net.sourceforge.pmd.RuleContext; +import net.sourceforge.pmd.RuleViolation; +import net.sourceforge.pmd.renderers.XMLRenderer; import test.net.sourceforge.pmd.MockRule; -import net.sourceforge.pmd.renderers.*; -import net.sourceforge.pmd.*; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; public class XMLRendererTest extends TestCase diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/AvoidDeeplyNestedIfStmtsRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/AvoidDeeplyNestedIfStmtsRuleTest.java index 818a35dcd6..3c04e926ec 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/AvoidDeeplyNestedIfStmtsRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/AvoidDeeplyNestedIfStmtsRuleTest.java @@ -5,8 +5,8 @@ */ package test.net.sourceforge.pmd.rules; -import net.sourceforge.pmd.rules.AvoidDeeplyNestedIfStmtsRule; import net.sourceforge.pmd.Rule; +import net.sourceforge.pmd.rules.AvoidDeeplyNestedIfStmtsRule; public class AvoidDeeplyNestedIfStmtsRuleTest extends RuleTst { diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/AvoidDuplicateLiteralsRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/AvoidDuplicateLiteralsRuleTest.java index 113053b651..247c4ce492 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/AvoidDuplicateLiteralsRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/AvoidDuplicateLiteralsRuleTest.java @@ -5,7 +5,6 @@ */ package test.net.sourceforge.pmd.rules; -import net.sourceforge.pmd.Rule; import net.sourceforge.pmd.rules.AvoidDuplicateLiteralsRule; public class AvoidDuplicateLiteralsRuleTest extends RuleTst { diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/EmptyCatchBlockRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/EmptyCatchBlockRuleTest.java index 0d68514ab5..0125e88e81 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/EmptyCatchBlockRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/EmptyCatchBlockRuleTest.java @@ -5,9 +5,6 @@ */ package test.net.sourceforge.pmd.rules; -import net.sourceforge.pmd.renderers.Renderer; -import net.sourceforge.pmd.RuleViolation; -import net.sourceforge.pmd.Report; import net.sourceforge.pmd.rules.EmptyCatchBlockRule; public class EmptyCatchBlockRuleTest extends RuleTst { diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/EmptyFinallyBlockRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/EmptyFinallyBlockRuleTest.java index 723d5b69fe..93c4e21d65 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/EmptyFinallyBlockRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/EmptyFinallyBlockRuleTest.java @@ -5,8 +5,6 @@ */ package test.net.sourceforge.pmd.rules; -import net.sourceforge.pmd.Report; -import net.sourceforge.pmd.RuleViolation; import net.sourceforge.pmd.rules.EmptyFinallyBlockRule; public class EmptyFinallyBlockRuleTest extends RuleTst { diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/EmptyIfStmtRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/EmptyIfStmtRuleTest.java index 618eeabc99..2706881811 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/EmptyIfStmtRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/EmptyIfStmtRuleTest.java @@ -5,8 +5,6 @@ */ package test.net.sourceforge.pmd.rules; -import net.sourceforge.pmd.RuleViolation; -import net.sourceforge.pmd.Report; import net.sourceforge.pmd.rules.EmptyIfStmtRule; public class EmptyIfStmtRuleTest extends RuleTst { diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/EmptyTryBlockRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/EmptyTryBlockRuleTest.java index 8f3c4d2f53..3928d7c1a2 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/EmptyTryBlockRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/EmptyTryBlockRuleTest.java @@ -7,7 +7,6 @@ package test.net.sourceforge.pmd.rules; import net.sourceforge.pmd.Report; import net.sourceforge.pmd.RuleViolation; -import net.sourceforge.pmd.rules.EmptyCatchBlockRule; import net.sourceforge.pmd.rules.EmptyTryBlockRule; public class EmptyTryBlockRuleTest extends RuleTst { diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/EmptyWhileStmtRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/EmptyWhileStmtRuleTest.java index 37f50f3a28..cf8c25c525 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/EmptyWhileStmtRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/EmptyWhileStmtRuleTest.java @@ -5,8 +5,8 @@ */ package test.net.sourceforge.pmd.rules; -import net.sourceforge.pmd.RuleViolation; import net.sourceforge.pmd.Report; +import net.sourceforge.pmd.RuleViolation; import net.sourceforge.pmd.rules.EmptyWhileStmtRule; public class EmptyWhileStmtRuleTest extends RuleTst { diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/IfElseStmtsMustUseBracesRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/IfElseStmtsMustUseBracesRuleTest.java index 745cbec8a9..b0d4742997 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/IfElseStmtsMustUseBracesRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/IfElseStmtsMustUseBracesRuleTest.java @@ -5,8 +5,8 @@ */ package test.net.sourceforge.pmd.rules; -import net.sourceforge.pmd.rules.IfElseStmtsMustUseBracesRule; import net.sourceforge.pmd.Report; +import net.sourceforge.pmd.rules.IfElseStmtsMustUseBracesRule; public class IfElseStmtsMustUseBracesRuleTest extends RuleTst { diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/JUnitSpellingRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/JUnitSpellingRuleTest.java index 3c554b6424..ae6e85dbf4 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/JUnitSpellingRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/JUnitSpellingRuleTest.java @@ -5,8 +5,8 @@ */ package test.net.sourceforge.pmd.rules; -import net.sourceforge.pmd.rules.JUnitSpellingRule; import net.sourceforge.pmd.Rule; +import net.sourceforge.pmd.rules.JUnitSpellingRule; public class JUnitSpellingRuleTest extends RuleTst { diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/LongVariableRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/LongVariableRuleTest.java index cbe68f22b1..466990c0c2 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/LongVariableRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/LongVariableRuleTest.java @@ -1,12 +1,8 @@ package test.net.sourceforge.pmd.rules; -import test.net.sourceforge.pmd.*; - -import net.sourceforge.pmd.*; +import net.sourceforge.pmd.Report; import net.sourceforge.pmd.rules.LongVariableRule; -import junit.framework.*; - public class LongVariableRuleTest extends RuleTst { diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/RuleTst.java b/pmd/regress/test/net/sourceforge/pmd/rules/RuleTst.java index 151027ebc8..0989fbc6de 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/RuleTst.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/RuleTst.java @@ -8,9 +8,11 @@ package test.net.sourceforge.pmd.rules; */ import junit.framework.TestCase; - -import net.sourceforge.pmd.*; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.PMD; +import net.sourceforge.pmd.Report; +import net.sourceforge.pmd.Rule; +import net.sourceforge.pmd.RuleContext; +import net.sourceforge.pmd.RuleSet; public class RuleTst extends TestCase diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/ShortMethodNameRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/ShortMethodNameRuleTest.java index 35fbb990e5..ae44dba616 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/ShortMethodNameRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/ShortMethodNameRuleTest.java @@ -1,12 +1,8 @@ package test.net.sourceforge.pmd.rules; -import test.net.sourceforge.pmd.*; - -import net.sourceforge.pmd.*; +import net.sourceforge.pmd.Report; import net.sourceforge.pmd.rules.ShortMethodNameRule; -import junit.framework.*; - public class ShortMethodNameRuleTest extends RuleTst { diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/ShortVariableRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/ShortVariableRuleTest.java index 839a71690a..9aa7b79c56 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/ShortVariableRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/ShortVariableRuleTest.java @@ -1,12 +1,8 @@ package test.net.sourceforge.pmd.rules; -import test.net.sourceforge.pmd.*; - -import net.sourceforge.pmd.*; +import net.sourceforge.pmd.Report; import net.sourceforge.pmd.rules.ShortVariableRule; -import junit.framework.*; - public class ShortVariableRuleTest extends RuleTst { diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/UnnecessaryTemporariesRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/UnnecessaryTemporariesRuleTest.java index 267105a865..211977d6a3 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/UnnecessaryTemporariesRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/UnnecessaryTemporariesRuleTest.java @@ -5,8 +5,8 @@ */ package test.net.sourceforge.pmd.rules; -import net.sourceforge.pmd.RuleViolation; import net.sourceforge.pmd.Report; +import net.sourceforge.pmd.RuleViolation; import net.sourceforge.pmd.rules.UnnecessaryConversionTemporaryRule; public class UnnecessaryTemporariesRuleTest extends RuleTst{ diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/UnusedImportsRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/UnusedImportsRuleTest.java index b3e098c2e9..f36a4436b7 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/UnusedImportsRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/UnusedImportsRuleTest.java @@ -5,8 +5,8 @@ */ package test.net.sourceforge.pmd.rules; -import net.sourceforge.pmd.rules.UnusedImportsRule; import net.sourceforge.pmd.Report; +import net.sourceforge.pmd.rules.UnusedImportsRule; public class UnusedImportsRuleTest extends RuleTst { diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/UnusedLocalVariableTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/UnusedLocalVariableTest.java index b800b6d3f7..d90f33b65e 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/UnusedLocalVariableTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/UnusedLocalVariableTest.java @@ -5,7 +5,6 @@ */ package test.net.sourceforge.pmd.rules; -import net.sourceforge.pmd.*; import net.sourceforge.pmd.rules.UnusedLocalVariableRule; public class UnusedLocalVariableTest extends RuleTst { diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/UnusedPrivateMethodRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/UnusedPrivateMethodRuleTest.java index 34c96cfffd..3065b85c77 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/UnusedPrivateMethodRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/UnusedPrivateMethodRuleTest.java @@ -6,7 +6,6 @@ package test.net.sourceforge.pmd.rules; import net.sourceforge.pmd.rules.UnusedPrivateMethodRule; -import net.sourceforge.pmd.Report; public class UnusedPrivateMethodRuleTest extends RuleTst { private UnusedPrivateMethodRule rule; diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/design/LongClassRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/design/LongClassRuleTest.java index 1393a8b196..467da77fd6 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/design/LongClassRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/design/LongClassRuleTest.java @@ -4,7 +4,6 @@ package test.net.sourceforge.pmd.rules.design; import net.sourceforge.pmd.Report; import net.sourceforge.pmd.rules.design.LongClassRule; - import test.net.sourceforge.pmd.rules.RuleTst; public class LongClassRuleTest diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/design/LongMethodRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/design/LongMethodRuleTest.java index 094ae32e41..1cd12d10a1 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/design/LongMethodRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/design/LongMethodRuleTest.java @@ -4,7 +4,6 @@ package test.net.sourceforge.pmd.rules.design; import net.sourceforge.pmd.Report; import net.sourceforge.pmd.rules.design.LongMethodRule; - import test.net.sourceforge.pmd.rules.RuleTst; public class LongMethodRuleTest diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/design/LongParameterListRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/design/LongParameterListRuleTest.java index 34dacf7c12..a060733622 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/design/LongParameterListRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/design/LongParameterListRuleTest.java @@ -4,7 +4,6 @@ package test.net.sourceforge.pmd.rules.design; import net.sourceforge.pmd.Report; import net.sourceforge.pmd.rules.design.LongParameterListRule; - import test.net.sourceforge.pmd.rules.RuleTst; public class LongParameterListRuleTest diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/design/LooseCouplingRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/design/LooseCouplingRuleTest.java index c0ea6adbef..134ae65eb4 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/design/LooseCouplingRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/design/LooseCouplingRuleTest.java @@ -5,8 +5,8 @@ */ package test.net.sourceforge.pmd.rules.design; -import test.net.sourceforge.pmd.rules.RuleTst; import net.sourceforge.pmd.rules.design.LooseCouplingRule; +import test.net.sourceforge.pmd.rules.RuleTst; public class LooseCouplingRuleTest extends RuleTst { private LooseCouplingRule rule; diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/design/OnlyOneReturnRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/design/OnlyOneReturnRuleTest.java index 72fbe404eb..a5d71173eb 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/design/OnlyOneReturnRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/design/OnlyOneReturnRuleTest.java @@ -5,8 +5,8 @@ */ package test.net.sourceforge.pmd.rules.design; -import test.net.sourceforge.pmd.rules.RuleTst; import net.sourceforge.pmd.rules.design.OnlyOneReturnRule; +import test.net.sourceforge.pmd.rules.RuleTst; public class OnlyOneReturnRuleTest extends RuleTst { diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/design/PositionalIteratorRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/design/PositionalIteratorRuleTest.java index 4c1ae84681..d1d5a9175e 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/design/PositionalIteratorRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/design/PositionalIteratorRuleTest.java @@ -5,8 +5,8 @@ */ package test.net.sourceforge.pmd.rules.design; -import test.net.sourceforge.pmd.rules.RuleTst; import net.sourceforge.pmd.rules.design.PositionalIteratorRule; +import test.net.sourceforge.pmd.rules.RuleTst; public class PositionalIteratorRuleTest extends RuleTst { diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/design/UseSingletonRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/design/UseSingletonRuleTest.java index 0132924ff2..0704778b39 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/design/UseSingletonRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/design/UseSingletonRuleTest.java @@ -1,11 +1,12 @@ package test.net.sourceforge.pmd.rules.design; -import test.net.sourceforge.pmd.rules.*; - -import net.sourceforge.pmd.*; -import net.sourceforge.pmd.ast.*; -import net.sourceforge.pmd.rules.design.*; +import net.sourceforge.pmd.Report; +import net.sourceforge.pmd.ReportListener; +import net.sourceforge.pmd.Rule; +import net.sourceforge.pmd.RuleViolation; +import net.sourceforge.pmd.rules.design.UseSingletonRule; import net.sourceforge.pmd.stat.Metric; +import test.net.sourceforge.pmd.rules.RuleTst; public class UseSingletonRuleTest extends RuleTst implements ReportListener diff --git a/pmd/regress/test/net/sourceforge/pmd/stat/MetricTest.java b/pmd/regress/test/net/sourceforge/pmd/stat/MetricTest.java index fd4a614ebf..4e8e90f5cf 100644 --- a/pmd/regress/test/net/sourceforge/pmd/stat/MetricTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/stat/MetricTest.java @@ -3,11 +3,10 @@ */ package test.net.sourceforge.pmd.stat; -import java.util.Random; - +import junit.framework.TestCase; import net.sourceforge.pmd.stat.Metric; -import junit.framework.TestCase; +import java.util.Random; /** * @author David Dixon-Peugh diff --git a/pmd/regress/test/net/sourceforge/pmd/stat/MockStatisticalRule.java b/pmd/regress/test/net/sourceforge/pmd/stat/MockStatisticalRule.java index 9e03acdd8b..274a785e47 100644 --- a/pmd/regress/test/net/sourceforge/pmd/stat/MockStatisticalRule.java +++ b/pmd/regress/test/net/sourceforge/pmd/stat/MockStatisticalRule.java @@ -1,6 +1,6 @@ package test.net.sourceforge.pmd.stat; -import net.sourceforge.pmd.stat.*; +import net.sourceforge.pmd.stat.StatisticalRule; public class MockStatisticalRule extends StatisticalRule diff --git a/pmd/regress/test/net/sourceforge/pmd/stat/StatisticalRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/stat/StatisticalRuleTest.java index a0b1d49cb8..3f15b57d8c 100644 --- a/pmd/regress/test/net/sourceforge/pmd/stat/StatisticalRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/stat/StatisticalRuleTest.java @@ -1,15 +1,18 @@ package test.net.sourceforge.pmd.stat; -import java.util.Iterator; -import java.util.List; -import java.util.ArrayList; -import java.util.Random; - -import net.sourceforge.pmd.*; -import net.sourceforge.pmd.stat.*; - import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import net.sourceforge.pmd.Report; +import net.sourceforge.pmd.Rule; +import net.sourceforge.pmd.RuleContext; +import net.sourceforge.pmd.stat.DataPoint; +import net.sourceforge.pmd.stat.Metric; +import net.sourceforge.pmd.stat.StatisticalRule; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Random; /** * This class tests the Statistical Rules in PMD. diff --git a/pmd/regress/test/net/sourceforge/pmd/symboltable/AbstractScopeTest.java b/pmd/regress/test/net/sourceforge/pmd/symboltable/AbstractScopeTest.java index b5c86ad749..e09ba3b327 100644 --- a/pmd/regress/test/net/sourceforge/pmd/symboltable/AbstractScopeTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/symboltable/AbstractScopeTest.java @@ -6,13 +6,15 @@ package test.net.sourceforge.pmd.symboltable; import junit.framework.TestCase; -import net.sourceforge.pmd.symboltable.*; -import net.sourceforge.pmd.ast.SimpleNode; import net.sourceforge.pmd.ast.ASTVariableDeclaratorId; +import net.sourceforge.pmd.ast.SimpleNode; +import net.sourceforge.pmd.symboltable.AbstractScope; +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 java.util.Iterator; -import java.util.Map; -import java.util.Collections; public class AbstractScopeTest 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 14da774bd5..0892fa5f3c 100644 --- a/pmd/regress/test/net/sourceforge/pmd/symboltable/ClassScopeTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/symboltable/ClassScopeTest.java @@ -6,12 +6,11 @@ package test.net.sourceforge.pmd.symboltable; import junit.framework.TestCase; -import net.sourceforge.pmd.symboltable.ClassScope; -import net.sourceforge.pmd.symboltable.VariableNameDeclaration; -import net.sourceforge.pmd.symboltable.NameOccurrence; -import net.sourceforge.pmd.ast.ASTName; -import net.sourceforge.pmd.ast.SimpleNode; import net.sourceforge.pmd.ast.ASTVariableDeclaratorId; +import net.sourceforge.pmd.ast.SimpleNode; +import net.sourceforge.pmd.symboltable.ClassScope; +import net.sourceforge.pmd.symboltable.NameOccurrence; +import net.sourceforge.pmd.symboltable.VariableNameDeclaration; public class ClassScopeTest extends TestCase { diff --git a/pmd/regress/test/net/sourceforge/pmd/symboltable/DeclarationFinderTest.java b/pmd/regress/test/net/sourceforge/pmd/symboltable/DeclarationFinderTest.java index 7b15424bce..6ab6075429 100644 --- a/pmd/regress/test/net/sourceforge/pmd/symboltable/DeclarationFinderTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/symboltable/DeclarationFinderTest.java @@ -6,13 +6,13 @@ package test.net.sourceforge.pmd.symboltable; import junit.framework.TestCase; +import net.sourceforge.pmd.ast.ASTLocalVariableDeclaration; +import net.sourceforge.pmd.ast.ASTVariableDeclarator; +import net.sourceforge.pmd.ast.ASTVariableDeclaratorId; +import net.sourceforge.pmd.ast.SimpleNode; import net.sourceforge.pmd.symboltable.DeclarationFinder; import net.sourceforge.pmd.symboltable.LocalScope; import net.sourceforge.pmd.symboltable.NameOccurrence; -import net.sourceforge.pmd.ast.ASTVariableDeclaratorId; -import net.sourceforge.pmd.ast.ASTVariableDeclarator; -import net.sourceforge.pmd.ast.ASTLocalVariableDeclaration; -import net.sourceforge.pmd.ast.SimpleNode; public class DeclarationFinderTest extends TestCase { diff --git a/pmd/regress/test/net/sourceforge/pmd/symboltable/ImageFinderFunctionTest.java b/pmd/regress/test/net/sourceforge/pmd/symboltable/ImageFinderFunctionTest.java index 4854c1832e..15c81488f3 100644 --- a/pmd/regress/test/net/sourceforge/pmd/symboltable/ImageFinderFunctionTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/symboltable/ImageFinderFunctionTest.java @@ -5,14 +5,14 @@ */ package test.net.sourceforge.pmd.symboltable; +import junit.framework.TestCase; +import net.sourceforge.pmd.ast.ASTVariableDeclaratorId; import net.sourceforge.pmd.symboltable.ImageFinderFunction; import net.sourceforge.pmd.symboltable.NameDeclaration; import net.sourceforge.pmd.symboltable.VariableNameDeclaration; -import net.sourceforge.pmd.ast.ASTVariableDeclaratorId; -import junit.framework.TestCase; -import java.util.List; import java.util.ArrayList; +import java.util.List; public class ImageFinderFunctionTest extends TestCase { diff --git a/pmd/regress/test/net/sourceforge/pmd/symboltable/LocalScopeTest.java b/pmd/regress/test/net/sourceforge/pmd/symboltable/LocalScopeTest.java index 376efeb6e6..d7ee1141e2 100644 --- a/pmd/regress/test/net/sourceforge/pmd/symboltable/LocalScopeTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/symboltable/LocalScopeTest.java @@ -6,8 +6,12 @@ package test.net.sourceforge.pmd.symboltable; import junit.framework.TestCase; -import net.sourceforge.pmd.symboltable.*; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTName; +import net.sourceforge.pmd.ast.ASTPrimaryPrefix; +import net.sourceforge.pmd.ast.ASTVariableDeclaratorId; +import net.sourceforge.pmd.symboltable.LocalScope; +import net.sourceforge.pmd.symboltable.NameOccurrence; +import net.sourceforge.pmd.symboltable.VariableNameDeclaration; public class LocalScopeTest extends TestCase { diff --git a/pmd/regress/test/net/sourceforge/pmd/symboltable/NameOccurrenceTest.java b/pmd/regress/test/net/sourceforge/pmd/symboltable/NameOccurrenceTest.java index cc5e1e8769..57f7eb76d1 100644 --- a/pmd/regress/test/net/sourceforge/pmd/symboltable/NameOccurrenceTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/symboltable/NameOccurrenceTest.java @@ -6,11 +6,8 @@ package test.net.sourceforge.pmd.symboltable; import junit.framework.TestCase; - -import java.util.List; - -import net.sourceforge.pmd.ast.SimpleNode; import net.sourceforge.pmd.ast.ASTPrimaryExpression; +import net.sourceforge.pmd.ast.SimpleNode; import net.sourceforge.pmd.symboltable.LocalScope; import net.sourceforge.pmd.symboltable.NameOccurrence; diff --git a/pmd/regress/test/net/sourceforge/pmd/symboltable/NameOccurrencesTest.java b/pmd/regress/test/net/sourceforge/pmd/symboltable/NameOccurrencesTest.java index d5afc292a5..f9dd8d8c15 100644 --- a/pmd/regress/test/net/sourceforge/pmd/symboltable/NameOccurrencesTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/symboltable/NameOccurrencesTest.java @@ -6,14 +6,12 @@ package test.net.sourceforge.pmd.symboltable; import junit.framework.TestCase; -import net.sourceforge.pmd.symboltable.NameOccurrences; -import net.sourceforge.pmd.symboltable.NameOccurrence; +import net.sourceforge.pmd.ast.ASTName; import net.sourceforge.pmd.ast.ASTPrimaryExpression; import net.sourceforge.pmd.ast.ASTPrimaryPrefix; -import net.sourceforge.pmd.ast.ASTName; import net.sourceforge.pmd.ast.ASTPrimarySuffix; - -import java.util.List; +import net.sourceforge.pmd.symboltable.NameOccurrence; +import net.sourceforge.pmd.symboltable.NameOccurrences; public class NameOccurrencesTest extends TestCase { diff --git a/pmd/regress/test/net/sourceforge/pmd/symboltable/ScopeCreatorTest.java b/pmd/regress/test/net/sourceforge/pmd/symboltable/ScopeCreatorTest.java index 044358f8b6..d105cd5d6f 100644 --- a/pmd/regress/test/net/sourceforge/pmd/symboltable/ScopeCreatorTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/symboltable/ScopeCreatorTest.java @@ -6,13 +6,12 @@ package test.net.sourceforge.pmd.symboltable; import junit.framework.TestCase; -import net.sourceforge.pmd.symboltable.ScopeCreator; -import net.sourceforge.pmd.symboltable.LocalScope; -import net.sourceforge.pmd.symboltable.GlobalScope; -import net.sourceforge.pmd.symboltable.Scope; -import net.sourceforge.pmd.ast.ASTTryStatement; -import net.sourceforge.pmd.ast.ASTIfStatement; 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.ScopeCreator; public class ScopeCreatorTest extends TestCase { public void testScopesAreCreated() { diff --git a/pmd/regress/test/net/sourceforge/pmd/symboltable/ScopeFactoryTest.java b/pmd/regress/test/net/sourceforge/pmd/symboltable/ScopeFactoryTest.java index 433ac37d4c..6a4ff4c556 100644 --- a/pmd/regress/test/net/sourceforge/pmd/symboltable/ScopeFactoryTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/symboltable/ScopeFactoryTest.java @@ -6,8 +6,12 @@ package test.net.sourceforge.pmd.symboltable; import junit.framework.TestCase; -import net.sourceforge.pmd.symboltable.*; import net.sourceforge.pmd.ast.*; +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.ScopeFactory; public class ScopeFactoryTest extends TestCase { diff --git a/pmd/regress/test/net/sourceforge/pmd/symboltable/TypeSetTest.java b/pmd/regress/test/net/sourceforge/pmd/symboltable/TypeSetTest.java index 5750ea42ee..777c56b0d4 100644 --- a/pmd/regress/test/net/sourceforge/pmd/symboltable/TypeSetTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/symboltable/TypeSetTest.java @@ -6,12 +6,12 @@ package test.net.sourceforge.pmd.symboltable; import junit.framework.TestCase; -import net.sourceforge.pmd.symboltable.TypeSet; import net.sourceforge.pmd.PMD; +import net.sourceforge.pmd.symboltable.TypeSet; import java.io.File; -import java.util.Set; import java.util.HashSet; +import java.util.Set; public class TypeSetTest extends TestCase { diff --git a/pmd/regress/test/net/sourceforge/pmd/symboltable/VariableNameDeclarationTest.java b/pmd/regress/test/net/sourceforge/pmd/symboltable/VariableNameDeclarationTest.java index a65931e183..88253aa664 100644 --- a/pmd/regress/test/net/sourceforge/pmd/symboltable/VariableNameDeclarationTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/symboltable/VariableNameDeclarationTest.java @@ -6,9 +6,11 @@ package test.net.sourceforge.pmd.symboltable; import junit.framework.TestCase; -import net.sourceforge.pmd.symboltable.VariableNameDeclaration; +import net.sourceforge.pmd.ast.ASTFormalParameter; +import net.sourceforge.pmd.ast.ASTTryStatement; +import net.sourceforge.pmd.ast.ASTVariableDeclaratorId; import net.sourceforge.pmd.symboltable.LocalScope; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.symboltable.VariableNameDeclaration; public class VariableNameDeclarationTest extends TestCase { diff --git a/pmd/regress/test/net/sourceforge/pmd/util/ApplierTest.java b/pmd/regress/test/net/sourceforge/pmd/util/ApplierTest.java index a1efec5087..797790f150 100644 --- a/pmd/regress/test/net/sourceforge/pmd/util/ApplierTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/util/ApplierTest.java @@ -6,8 +6,8 @@ package test.net.sourceforge.pmd.util; import junit.framework.TestCase; -import net.sourceforge.pmd.util.UnaryFunction; import net.sourceforge.pmd.util.Applier; +import net.sourceforge.pmd.util.UnaryFunction; import java.util.ArrayList; import java.util.List; diff --git a/pmd/src/net/sourceforge/pmd/AbstractRule.java b/pmd/src/net/sourceforge/pmd/AbstractRule.java index 185eb9c483..fe0ac2c68e 100644 --- a/pmd/src/net/sourceforge/pmd/AbstractRule.java +++ b/pmd/src/net/sourceforge/pmd/AbstractRule.java @@ -5,11 +5,11 @@ */ package net.sourceforge.pmd; -import net.sourceforge.pmd.ast.JavaParserVisitorAdapter; import net.sourceforge.pmd.ast.ASTCompilationUnit; +import net.sourceforge.pmd.ast.JavaParserVisitorAdapter; -import java.util.List; import java.util.Iterator; +import java.util.List; public abstract class AbstractRule extends JavaParserVisitorAdapter diff --git a/pmd/src/net/sourceforge/pmd/PMD.java b/pmd/src/net/sourceforge/pmd/PMD.java index 3b9c93c9d6..82f915de6f 100644 --- a/pmd/src/net/sourceforge/pmd/PMD.java +++ b/pmd/src/net/sourceforge/pmd/PMD.java @@ -5,19 +5,28 @@ */ package net.sourceforge.pmd; -import net.sourceforge.pmd.ast.JavaParser; import net.sourceforge.pmd.ast.ASTCompilationUnit; +import net.sourceforge.pmd.ast.JavaParser; import net.sourceforge.pmd.ast.ParseException; -import net.sourceforge.pmd.renderers.*; -import net.sourceforge.pmd.swingui.PMDViewer; import net.sourceforge.pmd.cpd.FileFinder; import net.sourceforge.pmd.cpd.JavaFileOrDirectoryFilter; +import net.sourceforge.pmd.renderers.HTMLRenderer; +import net.sourceforge.pmd.renderers.IDEAJRenderer; +import net.sourceforge.pmd.renderers.Renderer; +import net.sourceforge.pmd.renderers.TextRenderer; +import net.sourceforge.pmd.renderers.XMLRenderer; +import net.sourceforge.pmd.swingui.PMDViewer; import net.sourceforge.pmd.symboltable.SymbolFacade; -import java.io.*; -import java.util.List; -import java.util.Iterator; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; public class PMD { diff --git a/pmd/src/net/sourceforge/pmd/ProjectFile.java b/pmd/src/net/sourceforge/pmd/ProjectFile.java index 1791f2beae..da156d7e18 100644 --- a/pmd/src/net/sourceforge/pmd/ProjectFile.java +++ b/pmd/src/net/sourceforge/pmd/ProjectFile.java @@ -1,13 +1,17 @@ package net.sourceforge.pmd; -import java.io.InputStream; -import java.util.*; - import org.apache.xerces.parsers.SAXParser; -import org.xml.sax.helpers.DefaultHandler; import org.xml.sax.Attributes; import org.xml.sax.InputSource; import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +import java.io.InputStream; +import java.util.Enumeration; +import java.util.Iterator; +import java.util.Properties; +import java.util.Stack; +import java.util.StringTokenizer; /** * Loads the PMD project.xml file and stores the contents in a Properties object. diff --git a/pmd/src/net/sourceforge/pmd/Report.java b/pmd/src/net/sourceforge/pmd/Report.java index aed7ead11c..cfd17647e7 100644 --- a/pmd/src/net/sourceforge/pmd/Report.java +++ b/pmd/src/net/sourceforge/pmd/Report.java @@ -7,7 +7,12 @@ package net.sourceforge.pmd; import net.sourceforge.pmd.stat.Metric; -import java.util.*; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; public class Report { diff --git a/pmd/src/net/sourceforge/pmd/Rule.java b/pmd/src/net/sourceforge/pmd/Rule.java index e996cd471e..965ce8c95e 100644 --- a/pmd/src/net/sourceforge/pmd/Rule.java +++ b/pmd/src/net/sourceforge/pmd/Rule.java @@ -1,6 +1,6 @@ package net.sourceforge.pmd; -import java.util.*; +import java.util.List; public interface Rule { public String getName(); diff --git a/pmd/src/net/sourceforge/pmd/RuleProperties.java b/pmd/src/net/sourceforge/pmd/RuleProperties.java index 1f662b8247..8f4b42496c 100644 --- a/pmd/src/net/sourceforge/pmd/RuleProperties.java +++ b/pmd/src/net/sourceforge/pmd/RuleProperties.java @@ -1,10 +1,10 @@ package net.sourceforge.pmd; +import net.sourceforge.pmd.swingui.IConstants; + import java.util.Enumeration; import java.util.Properties; -import net.sourceforge.pmd.swingui.IConstants; - /** * * @author Donald A. Leckie diff --git a/pmd/src/net/sourceforge/pmd/RuleSet.java b/pmd/src/net/sourceforge/pmd/RuleSet.java index 1145d0b37a..23a88dace3 100644 --- a/pmd/src/net/sourceforge/pmd/RuleSet.java +++ b/pmd/src/net/sourceforge/pmd/RuleSet.java @@ -1,9 +1,9 @@ package net.sourceforge.pmd; -import java.util.Set; -import java.util.List; import java.util.HashSet; import java.util.Iterator; +import java.util.List; +import java.util.Set; public class RuleSet { diff --git a/pmd/src/net/sourceforge/pmd/RuleSetFactory.java b/pmd/src/net/sourceforge/pmd/RuleSetFactory.java index 4271bf2705..d7a77b387d 100644 --- a/pmd/src/net/sourceforge/pmd/RuleSetFactory.java +++ b/pmd/src/net/sourceforge/pmd/RuleSetFactory.java @@ -7,14 +7,18 @@ package net.sourceforge.pmd; import org.w3c.dom.Document; import org.w3c.dom.Element; -import org.w3c.dom.NodeList; import org.w3c.dom.Node; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.DocumentBuilder; +import org.w3c.dom.NodeList; -import java.io.InputStream; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; import java.io.IOException; -import java.util.*; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Properties; +import java.util.StringTokenizer; public class RuleSetFactory { diff --git a/pmd/src/net/sourceforge/pmd/RuleSetList.java b/pmd/src/net/sourceforge/pmd/RuleSetList.java index d3c5617729..96d0797e22 100644 --- a/pmd/src/net/sourceforge/pmd/RuleSetList.java +++ b/pmd/src/net/sourceforge/pmd/RuleSetList.java @@ -1,5 +1,7 @@ package net.sourceforge.pmd; +import net.sourceforge.pmd.swingui.Resources; + import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; @@ -9,8 +11,6 @@ import java.io.IOException; import java.io.PrintStream; import java.util.StringTokenizer; -import net.sourceforge.pmd.swingui.Resources; - /** * Reads and writes a list of included rule sets. Used by the PMD Viewer to select the * rule sets to be used during analysis. The PMD Viewer provides the editing capability diff --git a/pmd/src/net/sourceforge/pmd/RuleSetReader.java b/pmd/src/net/sourceforge/pmd/RuleSetReader.java index 2c3a8cd9da..d66ed0f381 100644 --- a/pmd/src/net/sourceforge/pmd/RuleSetReader.java +++ b/pmd/src/net/sourceforge/pmd/RuleSetReader.java @@ -1,16 +1,15 @@ package net.sourceforge.pmd; -import java.io.InputStream; -import java.io.IOException; -import java.text.MessageFormat; - +import net.sourceforge.pmd.swingui.IConstants; import org.apache.xerces.parsers.SAXParser; -import org.xml.sax.helpers.DefaultHandler; import org.xml.sax.Attributes; import org.xml.sax.InputSource; import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; -import net.sourceforge.pmd.swingui.IConstants; +import java.io.IOException; +import java.io.InputStream; +import java.text.MessageFormat; /** * Reads an XML file containing information about a rule set and each rule within the rule set. diff --git a/pmd/src/net/sourceforge/pmd/ant/PMDTask.java b/pmd/src/net/sourceforge/pmd/ant/PMDTask.java index 04a4e39021..2114a4ea74 100644 --- a/pmd/src/net/sourceforge/pmd/ant/PMDTask.java +++ b/pmd/src/net/sourceforge/pmd/ant/PMDTask.java @@ -1,17 +1,29 @@ package net.sourceforge.pmd.ant; -import org.apache.tools.ant.Task; +import net.sourceforge.pmd.PMD; +import net.sourceforge.pmd.Report; +import net.sourceforge.pmd.RuleContext; +import net.sourceforge.pmd.RuleSet; +import net.sourceforge.pmd.RuleSetFactory; +import net.sourceforge.pmd.RuleSetNotFoundException; +import net.sourceforge.pmd.renderers.HTMLRenderer; +import net.sourceforge.pmd.renderers.Renderer; +import net.sourceforge.pmd.renderers.TextRenderer; +import net.sourceforge.pmd.renderers.XMLRenderer; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.DirectoryScanner; +import org.apache.tools.ant.Task; import org.apache.tools.ant.types.FileSet; -import java.util.List; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; -import java.io.*; - -import net.sourceforge.pmd.renderers.*; -import net.sourceforge.pmd.*; +import java.util.List; public class PMDTask extends Task { diff --git a/pmd/src/net/sourceforge/pmd/ast/ASTTryStatement.java b/pmd/src/net/sourceforge/pmd/ast/ASTTryStatement.java index f793a5530c..2c0f61f708 100644 --- a/pmd/src/net/sourceforge/pmd/ast/ASTTryStatement.java +++ b/pmd/src/net/sourceforge/pmd/ast/ASTTryStatement.java @@ -2,8 +2,8 @@ package net.sourceforge.pmd.ast; -import java.util.List; import java.util.ArrayList; +import java.util.List; public class ASTTryStatement extends SimpleNode { diff --git a/pmd/src/net/sourceforge/pmd/cpd/CPD.java b/pmd/src/net/sourceforge/pmd/cpd/CPD.java index a4db55a15b..e23b96bd6d 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/CPD.java +++ b/pmd/src/net/sourceforge/pmd/cpd/CPD.java @@ -5,7 +5,10 @@ */ package net.sourceforge.pmd.cpd; -import java.io.*; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.StringReader; import java.util.Iterator; import java.util.List; diff --git a/pmd/src/net/sourceforge/pmd/cpd/CharacterTokenizer.java b/pmd/src/net/sourceforge/pmd/cpd/CharacterTokenizer.java index 53cd510c9c..42dea1be21 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/CharacterTokenizer.java +++ b/pmd/src/net/sourceforge/pmd/cpd/CharacterTokenizer.java @@ -5,11 +5,9 @@ */ package net.sourceforge.pmd.cpd; -import net.sourceforge.pmd.ast.*; - -import java.io.Reader; import java.io.IOException; import java.io.LineNumberReader; +import java.io.Reader; import java.util.ArrayList; import java.util.List; diff --git a/pmd/src/net/sourceforge/pmd/cpd/FileFinder.java b/pmd/src/net/sourceforge/pmd/cpd/FileFinder.java index af09d910bb..3f237e8cc6 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/FileFinder.java +++ b/pmd/src/net/sourceforge/pmd/cpd/FileFinder.java @@ -5,10 +5,10 @@ */ package net.sourceforge.pmd.cpd; -import java.util.List; -import java.util.ArrayList; import java.io.File; import java.io.FilenameFilter; +import java.util.ArrayList; +import java.util.List; public class FileFinder { diff --git a/pmd/src/net/sourceforge/pmd/cpd/GUI.java b/pmd/src/net/sourceforge/pmd/cpd/GUI.java index acb9b904ee..e77e07816a 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/GUI.java +++ b/pmd/src/net/sourceforge/pmd/cpd/GUI.java @@ -6,11 +6,12 @@ package net.sourceforge.pmd.cpd; import javax.swing.*; -import java.awt.event.ActionListener; +import java.awt.BorderLayout; +import java.awt.Dimension; import java.awt.event.ActionEvent; -import java.awt.*; -import java.io.IOException; +import java.awt.event.ActionListener; import java.io.File; +import java.io.IOException; public class GUI implements CPDListener { diff --git a/pmd/src/net/sourceforge/pmd/cpd/GridBagHelper.java b/pmd/src/net/sourceforge/pmd/cpd/GridBagHelper.java index 84fe6048cf..fd61f374b3 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/GridBagHelper.java +++ b/pmd/src/net/sourceforge/pmd/cpd/GridBagHelper.java @@ -2,8 +2,13 @@ package net.sourceforge.pmd.cpd; -import javax.swing.*; -import java.awt.*; +import javax.swing.JLabel; +import javax.swing.SwingConstants; +import java.awt.Component; +import java.awt.Container; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; public class GridBagHelper { diff --git a/pmd/src/net/sourceforge/pmd/cpd/JavaFileOrDirectoryFilter.java b/pmd/src/net/sourceforge/pmd/cpd/JavaFileOrDirectoryFilter.java index 8805335433..ec112df6a0 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/JavaFileOrDirectoryFilter.java +++ b/pmd/src/net/sourceforge/pmd/cpd/JavaFileOrDirectoryFilter.java @@ -5,8 +5,8 @@ */ package net.sourceforge.pmd.cpd; -import java.io.FilenameFilter; import java.io.File; +import java.io.FilenameFilter; public class JavaFileOrDirectoryFilter implements FilenameFilter { diff --git a/pmd/src/net/sourceforge/pmd/cpd/JavaTokensTokenizer.java b/pmd/src/net/sourceforge/pmd/cpd/JavaTokensTokenizer.java index ea9350c7b6..8752fc4f93 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/JavaTokensTokenizer.java +++ b/pmd/src/net/sourceforge/pmd/cpd/JavaTokensTokenizer.java @@ -8,12 +8,12 @@ package net.sourceforge.pmd.cpd; import net.sourceforge.pmd.ast.JavaCharStream; import net.sourceforge.pmd.ast.JavaParserTokenManager; -import java.io.Reader; import java.io.IOException; import java.io.LineNumberReader; +import java.io.Reader; import java.io.StringReader; -import java.util.List; import java.util.ArrayList; +import java.util.List; public class JavaTokensTokenizer implements Tokenizer { diff --git a/pmd/src/net/sourceforge/pmd/cpd/LinesTokenizer.java b/pmd/src/net/sourceforge/pmd/cpd/LinesTokenizer.java index 11330a5716..36db371970 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/LinesTokenizer.java +++ b/pmd/src/net/sourceforge/pmd/cpd/LinesTokenizer.java @@ -5,11 +5,11 @@ */ package net.sourceforge.pmd.cpd; -import java.io.Reader; import java.io.IOException; import java.io.LineNumberReader; -import java.util.List; +import java.io.Reader; import java.util.ArrayList; +import java.util.List; public class LinesTokenizer implements Tokenizer { diff --git a/pmd/src/net/sourceforge/pmd/cpd/Occurrences.java b/pmd/src/net/sourceforge/pmd/cpd/Occurrences.java index 20ed561e91..fd8c7e0215 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/Occurrences.java +++ b/pmd/src/net/sourceforge/pmd/cpd/Occurrences.java @@ -5,8 +5,9 @@ */ package net.sourceforge.pmd.cpd; -import java.util.*; import java.io.Serializable; +import java.util.Iterator; +import java.util.List; public class Occurrences extends TileOccurrences implements Serializable { diff --git a/pmd/src/net/sourceforge/pmd/cpd/Results.java b/pmd/src/net/sourceforge/pmd/cpd/Results.java index 7ca917b9cc..15ec10a441 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/Results.java +++ b/pmd/src/net/sourceforge/pmd/cpd/Results.java @@ -5,7 +5,8 @@ */ package net.sourceforge.pmd.cpd; -import java.util.*; +import java.util.Iterator; +import java.util.List; public interface Results { public void addTile(Tile tile, TokenEntry tok); diff --git a/pmd/src/net/sourceforge/pmd/cpd/ResultsImpl.java b/pmd/src/net/sourceforge/pmd/cpd/ResultsImpl.java index 652376ba64..2ef488906c 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/ResultsImpl.java +++ b/pmd/src/net/sourceforge/pmd/cpd/ResultsImpl.java @@ -5,8 +5,11 @@ */ package net.sourceforge.pmd.cpd; -import java.util.*; import java.io.Serializable; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; public class ResultsImpl extends TileOccurrences implements Serializable, Results { diff --git a/pmd/src/net/sourceforge/pmd/cpd/Tile.java b/pmd/src/net/sourceforge/pmd/cpd/Tile.java index b70d034612..d2a1324125 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/Tile.java +++ b/pmd/src/net/sourceforge/pmd/cpd/Tile.java @@ -5,10 +5,10 @@ */ package net.sourceforge.pmd.cpd; -import java.util.List; +import java.io.Serializable; import java.util.ArrayList; import java.util.Iterator; -import java.io.Serializable; +import java.util.List; public class Tile implements Serializable { diff --git a/pmd/src/net/sourceforge/pmd/cpd/TileOccurrences.java b/pmd/src/net/sourceforge/pmd/cpd/TileOccurrences.java index f74f76989b..6431c09820 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/TileOccurrences.java +++ b/pmd/src/net/sourceforge/pmd/cpd/TileOccurrences.java @@ -5,8 +5,12 @@ */ package net.sourceforge.pmd.cpd; -import java.util.*; import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; public abstract class TileOccurrences implements Serializable { // as soon as we switch to JDK1.4, change diff --git a/pmd/src/net/sourceforge/pmd/cpd/TokenList.java b/pmd/src/net/sourceforge/pmd/cpd/TokenList.java index 051e94e4ac..9433131c69 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/TokenList.java +++ b/pmd/src/net/sourceforge/pmd/cpd/TokenList.java @@ -5,10 +5,10 @@ */ package net.sourceforge.pmd.cpd; -import java.util.ArrayList; -import java.util.List; -import java.util.Iterator; import java.io.Serializable; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; public class TokenList implements Serializable { diff --git a/pmd/src/net/sourceforge/pmd/cpd/TokenSets.java b/pmd/src/net/sourceforge/pmd/cpd/TokenSets.java index 7b84e8fda7..b938a76a90 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/TokenSets.java +++ b/pmd/src/net/sourceforge/pmd/cpd/TokenSets.java @@ -5,8 +5,11 @@ */ package net.sourceforge.pmd.cpd; -import java.util.*; import java.io.Serializable; +import java.util.AbstractSet; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; public class TokenSets extends AbstractSet implements Serializable { diff --git a/pmd/src/net/sourceforge/pmd/cpd/Tokenizer.java b/pmd/src/net/sourceforge/pmd/cpd/Tokenizer.java index 634ad26c4b..7e22add7d7 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/Tokenizer.java +++ b/pmd/src/net/sourceforge/pmd/cpd/Tokenizer.java @@ -5,8 +5,8 @@ */ package net.sourceforge.pmd.cpd; -import java.io.Reader; import java.io.IOException; +import java.io.Reader; public interface Tokenizer { public void tokenize(TokenList tokens, Reader input) throws IOException; diff --git a/pmd/src/net/sourceforge/pmd/renderers/HTMLRenderer.java b/pmd/src/net/sourceforge/pmd/renderers/HTMLRenderer.java index ea976d10b7..d7d73fb73f 100644 --- a/pmd/src/net/sourceforge/pmd/renderers/HTMLRenderer.java +++ b/pmd/src/net/sourceforge/pmd/renderers/HTMLRenderer.java @@ -5,8 +5,8 @@ */ package net.sourceforge.pmd.renderers; -import net.sourceforge.pmd.RuleViolation; import net.sourceforge.pmd.Report; +import net.sourceforge.pmd.RuleViolation; import java.util.Iterator; diff --git a/pmd/src/net/sourceforge/pmd/renderers/IDEAJRenderer.java b/pmd/src/net/sourceforge/pmd/renderers/IDEAJRenderer.java index 6e72a5e498..618ce8c934 100644 --- a/pmd/src/net/sourceforge/pmd/renderers/IDEAJRenderer.java +++ b/pmd/src/net/sourceforge/pmd/renderers/IDEAJRenderer.java @@ -8,8 +8,8 @@ package net.sourceforge.pmd.renderers; import net.sourceforge.pmd.Report; import net.sourceforge.pmd.RuleViolation; -import java.util.Iterator; import java.util.HashSet; +import java.util.Iterator; import java.util.Set; import java.util.StringTokenizer; diff --git a/pmd/src/net/sourceforge/pmd/renderers/TextRenderer.java b/pmd/src/net/sourceforge/pmd/renderers/TextRenderer.java index 7dcd5265a3..fd496eecd3 100644 --- a/pmd/src/net/sourceforge/pmd/renderers/TextRenderer.java +++ b/pmd/src/net/sourceforge/pmd/renderers/TextRenderer.java @@ -1,7 +1,9 @@ package net.sourceforge.pmd.renderers; -import net.sourceforge.pmd.*; -import java.util.*; +import net.sourceforge.pmd.Report; +import net.sourceforge.pmd.RuleViolation; + +import java.util.Iterator; public class TextRenderer implements Renderer { diff --git a/pmd/src/net/sourceforge/pmd/renderers/XMLRenderer.java b/pmd/src/net/sourceforge/pmd/renderers/XMLRenderer.java index fdc1ed91ec..34ee7bc58a 100644 --- a/pmd/src/net/sourceforge/pmd/renderers/XMLRenderer.java +++ b/pmd/src/net/sourceforge/pmd/renderers/XMLRenderer.java @@ -5,8 +5,8 @@ */ package net.sourceforge.pmd.renderers; -import net.sourceforge.pmd.RuleViolation; import net.sourceforge.pmd.Report; +import net.sourceforge.pmd.RuleViolation; import java.util.Iterator; diff --git a/pmd/src/net/sourceforge/pmd/rules/AvoidDeeplyNestedIfStmtsRule.java b/pmd/src/net/sourceforge/pmd/rules/AvoidDeeplyNestedIfStmtsRule.java index 1e1b0eac96..0d99336ebf 100644 --- a/pmd/src/net/sourceforge/pmd/rules/AvoidDeeplyNestedIfStmtsRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/AvoidDeeplyNestedIfStmtsRule.java @@ -1,7 +1,9 @@ package net.sourceforge.pmd.rules; -import net.sourceforge.pmd.*; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.AbstractRule; +import net.sourceforge.pmd.RuleContext; +import net.sourceforge.pmd.ast.ASTCompilationUnit; +import net.sourceforge.pmd.ast.ASTIfStatement; public class AvoidDeeplyNestedIfStmtsRule extends AbstractRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/AvoidDuplicateLiteralsRule.java b/pmd/src/net/sourceforge/pmd/rules/AvoidDuplicateLiteralsRule.java index 3856bbd442..3d599e128b 100644 --- a/pmd/src/net/sourceforge/pmd/rules/AvoidDuplicateLiteralsRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/AvoidDuplicateLiteralsRule.java @@ -7,10 +7,18 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTArgumentList; +import net.sourceforge.pmd.ast.ASTCompilationUnit; +import net.sourceforge.pmd.ast.ASTLiteral; +import net.sourceforge.pmd.ast.Node; +import net.sourceforge.pmd.ast.SimpleNode; -import java.util.*; import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; public class AvoidDuplicateLiteralsRule extends AbstractRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/AvoidReassigningParametersRule.java b/pmd/src/net/sourceforge/pmd/rules/AvoidReassigningParametersRule.java index e670dd0fbb..80b5605f40 100644 --- a/pmd/src/net/sourceforge/pmd/rules/AvoidReassigningParametersRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/AvoidReassigningParametersRule.java @@ -7,15 +7,15 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; +import net.sourceforge.pmd.ast.ASTMethodDeclarator; +import net.sourceforge.pmd.symboltable.NameOccurrence; import net.sourceforge.pmd.symboltable.Scope; import net.sourceforge.pmd.symboltable.VariableNameDeclaration; -import net.sourceforge.pmd.symboltable.NameOccurrence; -import net.sourceforge.pmd.ast.ASTMethodDeclarator; -import java.util.Map; +import java.text.MessageFormat; import java.util.Iterator; import java.util.List; -import java.text.MessageFormat; +import java.util.Map; public class AvoidReassigningParametersRule extends AbstractRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/BracesRule.java b/pmd/src/net/sourceforge/pmd/rules/BracesRule.java index 67b7156aa6..ecdd965f09 100644 --- a/pmd/src/net/sourceforge/pmd/rules/BracesRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/BracesRule.java @@ -6,8 +6,8 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; -import net.sourceforge.pmd.ast.SimpleNode; import net.sourceforge.pmd.ast.ASTBlock; +import net.sourceforge.pmd.ast.SimpleNode; public abstract class BracesRule extends AbstractRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/DuplicateImportsRule.java b/pmd/src/net/sourceforge/pmd/rules/DuplicateImportsRule.java index fd8015183b..c74eac99b9 100644 --- a/pmd/src/net/sourceforge/pmd/rules/DuplicateImportsRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/DuplicateImportsRule.java @@ -7,12 +7,14 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTCompilationUnit; +import net.sourceforge.pmd.ast.ASTImportDeclaration; +import net.sourceforge.pmd.ast.SimpleNode; -import java.util.Set; +import java.text.MessageFormat; import java.util.HashSet; import java.util.Iterator; -import java.text.MessageFormat; +import java.util.Set; public class DuplicateImportsRule extends AbstractRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/EmptyCatchBlockRule.java b/pmd/src/net/sourceforge/pmd/rules/EmptyCatchBlockRule.java index 3e468f5df0..8cd3190fb4 100644 --- a/pmd/src/net/sourceforge/pmd/rules/EmptyCatchBlockRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/EmptyCatchBlockRule.java @@ -5,10 +5,12 @@ */ package net.sourceforge.pmd.rules; -import net.sourceforge.pmd.ast.ASTTryStatement; -import net.sourceforge.pmd.ast.ASTCatch; +import net.sourceforge.pmd.AbstractRule; +import net.sourceforge.pmd.Rule; +import net.sourceforge.pmd.RuleContext; import net.sourceforge.pmd.ast.ASTBlock; -import net.sourceforge.pmd.*; +import net.sourceforge.pmd.ast.ASTCatch; +import net.sourceforge.pmd.ast.ASTTryStatement; import java.util.Iterator; diff --git a/pmd/src/net/sourceforge/pmd/rules/EmptyFinallyBlockRule.java b/pmd/src/net/sourceforge/pmd/rules/EmptyFinallyBlockRule.java index 6abd33fd9d..e5bad4db6a 100644 --- a/pmd/src/net/sourceforge/pmd/rules/EmptyFinallyBlockRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/EmptyFinallyBlockRule.java @@ -7,8 +7,8 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; -import net.sourceforge.pmd.ast.ASTTryStatement; import net.sourceforge.pmd.ast.ASTBlock; +import net.sourceforge.pmd.ast.ASTTryStatement; public class EmptyFinallyBlockRule extends AbstractRule { public Object visit(ASTTryStatement node, Object data){ diff --git a/pmd/src/net/sourceforge/pmd/rules/EmptyIfStmtRule.java b/pmd/src/net/sourceforge/pmd/rules/EmptyIfStmtRule.java index a20b13efad..af5b163ed1 100644 --- a/pmd/src/net/sourceforge/pmd/rules/EmptyIfStmtRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/EmptyIfStmtRule.java @@ -5,9 +5,11 @@ */ package net.sourceforge.pmd.rules; +import net.sourceforge.pmd.AbstractRule; +import net.sourceforge.pmd.Rule; +import net.sourceforge.pmd.RuleContext; import net.sourceforge.pmd.ast.ASTBlock; import net.sourceforge.pmd.ast.ASTIfStatement; -import net.sourceforge.pmd.*; public class EmptyIfStmtRule extends AbstractRule implements Rule { diff --git a/pmd/src/net/sourceforge/pmd/rules/EmptyTryBlockRule.java b/pmd/src/net/sourceforge/pmd/rules/EmptyTryBlockRule.java index 7c58d2e30b..11cf8a82c5 100644 --- a/pmd/src/net/sourceforge/pmd/rules/EmptyTryBlockRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/EmptyTryBlockRule.java @@ -7,8 +7,8 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; -import net.sourceforge.pmd.ast.ASTTryStatement; import net.sourceforge.pmd.ast.ASTBlock; +import net.sourceforge.pmd.ast.ASTTryStatement; public class EmptyTryBlockRule extends AbstractRule{ public Object visit(ASTTryStatement node, Object data){ diff --git a/pmd/src/net/sourceforge/pmd/rules/EmptyWhileStmtRule.java b/pmd/src/net/sourceforge/pmd/rules/EmptyWhileStmtRule.java index f061aeeec4..99931ced04 100644 --- a/pmd/src/net/sourceforge/pmd/rules/EmptyWhileStmtRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/EmptyWhileStmtRule.java @@ -8,7 +8,10 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.Rule; import net.sourceforge.pmd.RuleContext; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTBlock; +import net.sourceforge.pmd.ast.ASTBlockStatement; +import net.sourceforge.pmd.ast.ASTStatement; +import net.sourceforge.pmd.ast.ASTWhileStatement; public class EmptyWhileStmtRule extends AbstractRule implements Rule{ diff --git a/pmd/src/net/sourceforge/pmd/rules/ForLoopsMustUseBracesRule.java b/pmd/src/net/sourceforge/pmd/rules/ForLoopsMustUseBracesRule.java index 8843f01b8d..bc0b8718ae 100644 --- a/pmd/src/net/sourceforge/pmd/rules/ForLoopsMustUseBracesRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/ForLoopsMustUseBracesRule.java @@ -6,8 +6,8 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.RuleContext; -import net.sourceforge.pmd.ast.SimpleNode; import net.sourceforge.pmd.ast.ASTForStatement; +import net.sourceforge.pmd.ast.SimpleNode; public class ForLoopsMustUseBracesRule extends BracesRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/IfElseStmtsMustUseBracesRule.java b/pmd/src/net/sourceforge/pmd/rules/IfElseStmtsMustUseBracesRule.java index 4a59e7fba1..ef6909b782 100644 --- a/pmd/src/net/sourceforge/pmd/rules/IfElseStmtsMustUseBracesRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/IfElseStmtsMustUseBracesRule.java @@ -5,10 +5,10 @@ */ package net.sourceforge.pmd.rules; +import net.sourceforge.pmd.RuleContext; +import net.sourceforge.pmd.ast.ASTCompilationUnit; import net.sourceforge.pmd.ast.ASTIfStatement; import net.sourceforge.pmd.ast.SimpleNode; -import net.sourceforge.pmd.ast.ASTCompilationUnit; -import net.sourceforge.pmd.*; public class IfElseStmtsMustUseBracesRule extends BracesRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/IfStmtsMustUseBracesRule.java b/pmd/src/net/sourceforge/pmd/rules/IfStmtsMustUseBracesRule.java index 78e19a6452..4e1fe48a94 100644 --- a/pmd/src/net/sourceforge/pmd/rules/IfStmtsMustUseBracesRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/IfStmtsMustUseBracesRule.java @@ -5,10 +5,10 @@ */ package net.sourceforge.pmd.rules; +import net.sourceforge.pmd.RuleContext; +import net.sourceforge.pmd.ast.ASTCompilationUnit; import net.sourceforge.pmd.ast.ASTIfStatement; import net.sourceforge.pmd.ast.SimpleNode; -import net.sourceforge.pmd.ast.ASTCompilationUnit; -import net.sourceforge.pmd.RuleContext; public class IfStmtsMustUseBracesRule extends BracesRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/JumbledIncrementerRule.java b/pmd/src/net/sourceforge/pmd/rules/JumbledIncrementerRule.java index c68efc994d..6403af52ff 100644 --- a/pmd/src/net/sourceforge/pmd/rules/JumbledIncrementerRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/JumbledIncrementerRule.java @@ -7,9 +7,17 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTBlock; +import net.sourceforge.pmd.ast.ASTForStatement; +import net.sourceforge.pmd.ast.ASTForUpdate; +import net.sourceforge.pmd.ast.ASTName; +import net.sourceforge.pmd.ast.ASTStatement; +import net.sourceforge.pmd.ast.Node; +import net.sourceforge.pmd.ast.SimpleNode; -import java.util.*; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; public class JumbledIncrementerRule extends AbstractRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/LongVariableRule.java b/pmd/src/net/sourceforge/pmd/rules/LongVariableRule.java index fcb3ff52b4..e093e16f75 100644 --- a/pmd/src/net/sourceforge/pmd/rules/LongVariableRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/LongVariableRule.java @@ -2,8 +2,7 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; - -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTVariableDeclaratorId; import java.text.MessageFormat; diff --git a/pmd/src/net/sourceforge/pmd/rules/OverrideBothEqualsAndHashcodeRule.java b/pmd/src/net/sourceforge/pmd/rules/OverrideBothEqualsAndHashcodeRule.java index 91d3a7e9d7..0aed9d2883 100644 --- a/pmd/src/net/sourceforge/pmd/rules/OverrideBothEqualsAndHashcodeRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/OverrideBothEqualsAndHashcodeRule.java @@ -5,10 +5,12 @@ */ package net.sourceforge.pmd.rules; -import net.sourceforge.pmd.Rule; import net.sourceforge.pmd.AbstractRule; +import net.sourceforge.pmd.Rule; import net.sourceforge.pmd.RuleContext; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTClassBody; +import net.sourceforge.pmd.ast.ASTMethodDeclarator; +import net.sourceforge.pmd.ast.AccessNode; public class OverrideBothEqualsAndHashcodeRule extends AbstractRule implements Rule { diff --git a/pmd/src/net/sourceforge/pmd/rules/ShortMethodNameRule.java b/pmd/src/net/sourceforge/pmd/rules/ShortMethodNameRule.java index 69971b4a6c..9c6ec5475e 100644 --- a/pmd/src/net/sourceforge/pmd/rules/ShortMethodNameRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/ShortMethodNameRule.java @@ -2,8 +2,7 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; - -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTMethodDeclarator; import java.text.MessageFormat; diff --git a/pmd/src/net/sourceforge/pmd/rules/ShortVariableRule.java b/pmd/src/net/sourceforge/pmd/rules/ShortVariableRule.java index 39eeaa411e..00cda5ebed 100644 --- a/pmd/src/net/sourceforge/pmd/rules/ShortVariableRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/ShortVariableRule.java @@ -2,8 +2,9 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; - -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTForInit; +import net.sourceforge.pmd.ast.ASTVariableDeclaratorId; +import net.sourceforge.pmd.ast.Node; import java.text.MessageFormat; diff --git a/pmd/src/net/sourceforge/pmd/rules/SimplifyBooleanReturnsRule.java b/pmd/src/net/sourceforge/pmd/rules/SimplifyBooleanReturnsRule.java index 77c30f3ef9..cac64ec121 100644 --- a/pmd/src/net/sourceforge/pmd/rules/SimplifyBooleanReturnsRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/SimplifyBooleanReturnsRule.java @@ -7,7 +7,13 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTBlock; +import net.sourceforge.pmd.ast.ASTBlockStatement; +import net.sourceforge.pmd.ast.ASTBooleanLiteral; +import net.sourceforge.pmd.ast.ASTIfStatement; +import net.sourceforge.pmd.ast.ASTReturnStatement; +import net.sourceforge.pmd.ast.ASTStatement; +import net.sourceforge.pmd.ast.SimpleNode; public class SimplifyBooleanReturnsRule extends AbstractRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/StringConcatenationRule.java b/pmd/src/net/sourceforge/pmd/rules/StringConcatenationRule.java index cf1e3f7a98..21fce17363 100644 --- a/pmd/src/net/sourceforge/pmd/rules/StringConcatenationRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/StringConcatenationRule.java @@ -6,9 +6,9 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; +import net.sourceforge.pmd.ast.ASTBlockStatement; import net.sourceforge.pmd.ast.ASTForStatement; import net.sourceforge.pmd.ast.Node; -import net.sourceforge.pmd.ast.ASTBlockStatement; public class StringConcatenationRule extends AbstractRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/StringInstantiationRule.java b/pmd/src/net/sourceforge/pmd/rules/StringInstantiationRule.java index ed399a2e60..7c2388f4a6 100644 --- a/pmd/src/net/sourceforge/pmd/rules/StringInstantiationRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/StringInstantiationRule.java @@ -7,7 +7,10 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTAllocationExpression; +import net.sourceforge.pmd.ast.ASTArguments; +import net.sourceforge.pmd.ast.ASTArrayDimsAndInits; +import net.sourceforge.pmd.ast.SimpleNode; public class StringInstantiationRule extends AbstractRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/StringToStringRule.java b/pmd/src/net/sourceforge/pmd/rules/StringToStringRule.java index 8db250e50c..81e37c3539 100644 --- a/pmd/src/net/sourceforge/pmd/rules/StringToStringRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/StringToStringRule.java @@ -7,13 +7,15 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; -import net.sourceforge.pmd.symboltable.VariableNameDeclaration; +import net.sourceforge.pmd.ast.ASTPrimitiveType; +import net.sourceforge.pmd.ast.ASTVariableDeclaratorId; +import net.sourceforge.pmd.ast.SimpleNode; import net.sourceforge.pmd.symboltable.NameOccurrence; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.symboltable.VariableNameDeclaration; import java.util.Iterator; -import java.util.Map; import java.util.List; +import java.util.Map; public class StringToStringRule extends AbstractRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/SwitchStmtsShouldHaveDefaultRule.java b/pmd/src/net/sourceforge/pmd/rules/SwitchStmtsShouldHaveDefaultRule.java index 9bbe3e8e69..78e24e8335 100644 --- a/pmd/src/net/sourceforge/pmd/rules/SwitchStmtsShouldHaveDefaultRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/SwitchStmtsShouldHaveDefaultRule.java @@ -7,8 +7,8 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; -import net.sourceforge.pmd.ast.ASTSwitchStatement; import net.sourceforge.pmd.ast.ASTSwitchLabel; +import net.sourceforge.pmd.ast.ASTSwitchStatement; public class SwitchStmtsShouldHaveDefaultRule extends AbstractRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/UnnecessaryCastRule.java b/pmd/src/net/sourceforge/pmd/rules/UnnecessaryCastRule.java index 57e0c00733..8b63ecd076 100644 --- a/pmd/src/net/sourceforge/pmd/rules/UnnecessaryCastRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/UnnecessaryCastRule.java @@ -6,10 +6,10 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; -import net.sourceforge.pmd.symboltable.TypeSet; -import net.sourceforge.pmd.ast.ASTName; import net.sourceforge.pmd.ast.ASTCastExpression; +import net.sourceforge.pmd.ast.ASTName; import net.sourceforge.pmd.ast.ASTPrimitiveType; +import net.sourceforge.pmd.symboltable.TypeSet; public class UnnecessaryCastRule extends AbstractRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/UnnecessaryConstructorRule.java b/pmd/src/net/sourceforge/pmd/rules/UnnecessaryConstructorRule.java index 9063a0cccb..302ea5ea36 100644 --- a/pmd/src/net/sourceforge/pmd/rules/UnnecessaryConstructorRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/UnnecessaryConstructorRule.java @@ -7,7 +7,10 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTCompilationUnit; +import net.sourceforge.pmd.ast.ASTConstructorDeclaration; +import net.sourceforge.pmd.ast.ASTFormalParameters; +import net.sourceforge.pmd.ast.AccessNode; import java.util.ArrayList; import java.util.List; diff --git a/pmd/src/net/sourceforge/pmd/rules/UnnecessaryConversionTemporaryRule.java b/pmd/src/net/sourceforge/pmd/rules/UnnecessaryConversionTemporaryRule.java index d47cfe46cc..24468bb93b 100644 --- a/pmd/src/net/sourceforge/pmd/rules/UnnecessaryConversionTemporaryRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/UnnecessaryConversionTemporaryRule.java @@ -5,11 +5,17 @@ */ package net.sourceforge.pmd.rules; -import net.sourceforge.pmd.ast.*; -import net.sourceforge.pmd.*; +import net.sourceforge.pmd.AbstractRule; +import net.sourceforge.pmd.Rule; +import net.sourceforge.pmd.RuleContext; +import net.sourceforge.pmd.ast.ASTAllocationExpression; +import net.sourceforge.pmd.ast.ASTName; +import net.sourceforge.pmd.ast.ASTPrimaryExpression; +import net.sourceforge.pmd.ast.ASTPrimarySuffix; +import net.sourceforge.pmd.ast.SimpleNode; -import java.util.Set; import java.util.HashSet; +import java.util.Set; public class UnnecessaryConversionTemporaryRule extends AbstractRule implements Rule{ diff --git a/pmd/src/net/sourceforge/pmd/rules/UnusedFormalParameterRule.java b/pmd/src/net/sourceforge/pmd/rules/UnusedFormalParameterRule.java index cd2278b5f1..cdb75a0904 100644 --- a/pmd/src/net/sourceforge/pmd/rules/UnusedFormalParameterRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/UnusedFormalParameterRule.java @@ -4,6 +4,7 @@ import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; import net.sourceforge.pmd.ast.ASTMethodDeclaration; import net.sourceforge.pmd.symboltable.VariableNameDeclaration; + import java.text.MessageFormat; import java.util.Iterator; diff --git a/pmd/src/net/sourceforge/pmd/rules/UnusedImportsRule.java b/pmd/src/net/sourceforge/pmd/rules/UnusedImportsRule.java index 7831d8275c..972365de56 100644 --- a/pmd/src/net/sourceforge/pmd/rules/UnusedImportsRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/UnusedImportsRule.java @@ -7,12 +7,14 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTCompilationUnit; +import net.sourceforge.pmd.ast.ASTImportDeclaration; +import net.sourceforge.pmd.ast.ASTName; -import java.util.Set; +import java.text.MessageFormat; import java.util.HashSet; import java.util.Iterator; -import java.text.MessageFormat; +import java.util.Set; public class UnusedImportsRule extends AbstractRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/UnusedLocalVariableRule.java b/pmd/src/net/sourceforge/pmd/rules/UnusedLocalVariableRule.java index 6ec69c64f8..31e541d278 100644 --- a/pmd/src/net/sourceforge/pmd/rules/UnusedLocalVariableRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/UnusedLocalVariableRule.java @@ -5,12 +5,14 @@ */ package net.sourceforge.pmd.rules; -import java.util.Iterator; -import java.text.MessageFormat; +import net.sourceforge.pmd.AbstractRule; +import net.sourceforge.pmd.RuleContext; +import net.sourceforge.pmd.ast.ASTLocalVariableDeclaration; +import net.sourceforge.pmd.ast.ASTVariableDeclaratorId; +import net.sourceforge.pmd.symboltable.VariableNameDeclaration; -import net.sourceforge.pmd.ast.*; -import net.sourceforge.pmd.*; -import net.sourceforge.pmd.symboltable.*; +import java.text.MessageFormat; +import java.util.Iterator; public class UnusedLocalVariableRule extends AbstractRule { public Object visit(ASTVariableDeclaratorId node, Object data) { diff --git a/pmd/src/net/sourceforge/pmd/rules/UnusedPrivateFieldRule.java b/pmd/src/net/sourceforge/pmd/rules/UnusedPrivateFieldRule.java index d4893b65a7..64a8fc6b86 100644 --- a/pmd/src/net/sourceforge/pmd/rules/UnusedPrivateFieldRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/UnusedPrivateFieldRule.java @@ -5,12 +5,13 @@ */ package net.sourceforge.pmd.rules; -import java.util.Iterator; -import java.text.MessageFormat; +import net.sourceforge.pmd.AbstractRule; +import net.sourceforge.pmd.RuleContext; +import net.sourceforge.pmd.ast.ASTUnmodifiedClassDeclaration; +import net.sourceforge.pmd.symboltable.VariableNameDeclaration; -import net.sourceforge.pmd.ast.*; -import net.sourceforge.pmd.*; -import net.sourceforge.pmd.symboltable.*; +import java.text.MessageFormat; +import java.util.Iterator; public class UnusedPrivateFieldRule extends AbstractRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/UnusedPrivateMethodRule.java b/pmd/src/net/sourceforge/pmd/rules/UnusedPrivateMethodRule.java index 3c93a7fea3..aca5a7a5bb 100644 --- a/pmd/src/net/sourceforge/pmd/rules/UnusedPrivateMethodRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/UnusedPrivateMethodRule.java @@ -5,13 +5,14 @@ */ package net.sourceforge.pmd.rules; -import net.sourceforge.pmd.*; +import net.sourceforge.pmd.AbstractRule; +import net.sourceforge.pmd.RuleContext; import net.sourceforge.pmd.ast.*; +import java.text.MessageFormat; +import java.util.HashSet; import java.util.Iterator; import java.util.Set; -import java.util.HashSet; -import java.text.MessageFormat; public class UnusedPrivateMethodRule extends AbstractRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/WhileLoopsMustUseBracesRule.java b/pmd/src/net/sourceforge/pmd/rules/WhileLoopsMustUseBracesRule.java index b35393df41..f3eded157a 100644 --- a/pmd/src/net/sourceforge/pmd/rules/WhileLoopsMustUseBracesRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/WhileLoopsMustUseBracesRule.java @@ -6,8 +6,8 @@ package net.sourceforge.pmd.rules; import net.sourceforge.pmd.RuleContext; -import net.sourceforge.pmd.ast.SimpleNode; import net.sourceforge.pmd.ast.ASTWhileStatement; +import net.sourceforge.pmd.ast.SimpleNode; public class WhileLoopsMustUseBracesRule extends BracesRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/design/ExcessiveLengthRule.java b/pmd/src/net/sourceforge/pmd/rules/design/ExcessiveLengthRule.java index 0e7dc833a3..d271b75ed7 100644 --- a/pmd/src/net/sourceforge/pmd/rules/design/ExcessiveLengthRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/design/ExcessiveLengthRule.java @@ -1,7 +1,8 @@ package net.sourceforge.pmd.rules.design; import net.sourceforge.pmd.ast.SimpleNode; -import net.sourceforge.pmd.stat.*; +import net.sourceforge.pmd.stat.DataPoint; +import net.sourceforge.pmd.stat.StatisticalRule; /** * This is a common super class for things which diff --git a/pmd/src/net/sourceforge/pmd/rules/design/ExcessiveNodeCountRule.java b/pmd/src/net/sourceforge/pmd/rules/design/ExcessiveNodeCountRule.java index 5a77ab94e0..e8227fba77 100644 --- a/pmd/src/net/sourceforge/pmd/rules/design/ExcessiveNodeCountRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/design/ExcessiveNodeCountRule.java @@ -1,7 +1,8 @@ package net.sourceforge.pmd.rules.design; import net.sourceforge.pmd.ast.SimpleNode; -import net.sourceforge.pmd.stat.*; +import net.sourceforge.pmd.stat.DataPoint; +import net.sourceforge.pmd.stat.StatisticalRule; /** * This is a common super class for things which diff --git a/pmd/src/net/sourceforge/pmd/rules/design/LongClassRule.java b/pmd/src/net/sourceforge/pmd/rules/design/LongClassRule.java index 25f6322a13..46bdcb26f8 100644 --- a/pmd/src/net/sourceforge/pmd/rules/design/LongClassRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/design/LongClassRule.java @@ -1,8 +1,6 @@ package net.sourceforge.pmd.rules.design; -import net.sourceforge.pmd.stat.*; - -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTClassDeclaration; /** * This rule detects when a class exceeds a certain diff --git a/pmd/src/net/sourceforge/pmd/rules/design/LongMethodRule.java b/pmd/src/net/sourceforge/pmd/rules/design/LongMethodRule.java index 37dd14a7e0..7e9d6f08f0 100644 --- a/pmd/src/net/sourceforge/pmd/rules/design/LongMethodRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/design/LongMethodRule.java @@ -1,8 +1,6 @@ package net.sourceforge.pmd.rules.design; -import net.sourceforge.pmd.stat.*; - -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTMethodDeclaration; /** * This rule detects when a method exceeds a certain diff --git a/pmd/src/net/sourceforge/pmd/rules/design/LongParameterListRule.java b/pmd/src/net/sourceforge/pmd/rules/design/LongParameterListRule.java index 5b0fd1b9ba..46786de924 100644 --- a/pmd/src/net/sourceforge/pmd/rules/design/LongParameterListRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/design/LongParameterListRule.java @@ -1,8 +1,7 @@ package net.sourceforge.pmd.rules.design; -import net.sourceforge.pmd.stat.*; - -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTFormalParameter; +import net.sourceforge.pmd.ast.ASTFormalParameters; /** * This rule detects an abnormally long parameter list. diff --git a/pmd/src/net/sourceforge/pmd/rules/design/LooseCouplingRule.java b/pmd/src/net/sourceforge/pmd/rules/design/LooseCouplingRule.java index 9266ca082d..1ab4d14c80 100644 --- a/pmd/src/net/sourceforge/pmd/rules/design/LooseCouplingRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/design/LooseCouplingRule.java @@ -7,11 +7,15 @@ package net.sourceforge.pmd.rules.design; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTFieldDeclaration; +import net.sourceforge.pmd.ast.ASTFormalParameter; +import net.sourceforge.pmd.ast.ASTName; +import net.sourceforge.pmd.ast.ASTResultType; +import net.sourceforge.pmd.ast.Node; -import java.util.Set; -import java.util.HashSet; import java.text.MessageFormat; +import java.util.HashSet; +import java.util.Set; public class LooseCouplingRule extends AbstractRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/design/OnlyOneReturnRule.java b/pmd/src/net/sourceforge/pmd/rules/design/OnlyOneReturnRule.java index c28557499e..54967aa744 100644 --- a/pmd/src/net/sourceforge/pmd/rules/design/OnlyOneReturnRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/design/OnlyOneReturnRule.java @@ -7,11 +7,14 @@ package net.sourceforge.pmd.rules.design; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTInterfaceDeclaration; +import net.sourceforge.pmd.ast.ASTMethodDeclaration; +import net.sourceforge.pmd.ast.ASTReturnStatement; +import net.sourceforge.pmd.ast.SimpleNode; -import java.util.List; import java.util.ArrayList; import java.util.Iterator; +import java.util.List; public class OnlyOneReturnRule extends AbstractRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/design/PositionalIteratorRule.java b/pmd/src/net/sourceforge/pmd/rules/design/PositionalIteratorRule.java index 8f9b0e2532..43be4dbb3b 100644 --- a/pmd/src/net/sourceforge/pmd/rules/design/PositionalIteratorRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/design/PositionalIteratorRule.java @@ -7,11 +7,13 @@ package net.sourceforge.pmd.rules.design; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; +import net.sourceforge.pmd.ast.ASTName; import net.sourceforge.pmd.ast.ASTWhileStatement; import net.sourceforge.pmd.ast.SimpleNode; -import net.sourceforge.pmd.ast.ASTName; -import java.util.*; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; public class PositionalIteratorRule extends AbstractRule { diff --git a/pmd/src/net/sourceforge/pmd/rules/design/UseSingletonRule.java b/pmd/src/net/sourceforge/pmd/rules/design/UseSingletonRule.java index fffe44eab6..a23ab746a8 100644 --- a/pmd/src/net/sourceforge/pmd/rules/design/UseSingletonRule.java +++ b/pmd/src/net/sourceforge/pmd/rules/design/UseSingletonRule.java @@ -2,7 +2,6 @@ package net.sourceforge.pmd.rules.design; import net.sourceforge.pmd.AbstractRule; import net.sourceforge.pmd.RuleContext; - import net.sourceforge.pmd.ast.ASTCompilationUnit; import net.sourceforge.pmd.ast.ASTMethodDeclaration; diff --git a/pmd/src/net/sourceforge/pmd/stat/DataPoint.java b/pmd/src/net/sourceforge/pmd/stat/DataPoint.java index c8b6b4a4bb..6cf5f47ac1 100644 --- a/pmd/src/net/sourceforge/pmd/stat/DataPoint.java +++ b/pmd/src/net/sourceforge/pmd/stat/DataPoint.java @@ -1,9 +1,9 @@ package net.sourceforge.pmd.stat; -import java.util.Random; - import net.sourceforge.pmd.Rule; +import java.util.Random; + /** * @author David Dixon-Peugh * Aug 8, 2002 DataPoint.java diff --git a/pmd/src/net/sourceforge/pmd/stat/StatisticalRule.java b/pmd/src/net/sourceforge/pmd/stat/StatisticalRule.java index 4c62c84c93..6bd45e5326 100644 --- a/pmd/src/net/sourceforge/pmd/stat/StatisticalRule.java +++ b/pmd/src/net/sourceforge/pmd/stat/StatisticalRule.java @@ -1,14 +1,14 @@ package net.sourceforge.pmd.stat; +import net.sourceforge.pmd.AbstractRule; +import net.sourceforge.pmd.RuleContext; + import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; -import net.sourceforge.pmd.AbstractRule; -import net.sourceforge.pmd.RuleContext; - /** * @author David Dixon-Peugh * Aug 8, 2002 StatisticalRule.java diff --git a/pmd/src/net/sourceforge/pmd/swingui/AboutPMD.java b/pmd/src/net/sourceforge/pmd/swingui/AboutPMD.java index 04b37d7e34..74c964c815 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/AboutPMD.java +++ b/pmd/src/net/sourceforge/pmd/swingui/AboutPMD.java @@ -1,25 +1,7 @@ package net.sourceforge.pmd.swingui; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.Font; -import java.awt.FontMetrics; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.GridLayout; -import java.awt.Insets; -import java.text.DecimalFormat; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.List; +import net.sourceforge.pmd.ProjectFile; -import javax.swing.border.CompoundBorder; -import javax.swing.border.EmptyBorder; -import javax.swing.border.EtchedBorder; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JDialog; @@ -29,8 +11,25 @@ import javax.swing.JScrollPane; import javax.swing.JTabbedPane; import javax.swing.JTextArea; import javax.swing.UIManager; - -import net.sourceforge.pmd.ProjectFile; +import javax.swing.border.CompoundBorder; +import javax.swing.border.EmptyBorder; +import javax.swing.border.EtchedBorder; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.GridLayout; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.text.DecimalFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; +import java.util.List; /** * diff --git a/pmd/src/net/sourceforge/pmd/swingui/ComponentFactory.java b/pmd/src/net/sourceforge/pmd/swingui/ComponentFactory.java index 6dbf5c7eca..8d107efb62 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/ComponentFactory.java +++ b/pmd/src/net/sourceforge/pmd/swingui/ComponentFactory.java @@ -1,22 +1,21 @@ package net.sourceforge.pmd.swingui; -import java.awt.Color; -import java.awt.Component; -import java.awt.Dimension; -import java.awt.event.ActionListener; -import java.awt.FlowLayout; - +import javax.swing.JButton; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTextArea; +import javax.swing.UIManager; import javax.swing.border.BevelBorder; import javax.swing.border.CompoundBorder; import javax.swing.border.EmptyBorder; import javax.swing.border.EtchedBorder; import javax.swing.border.LineBorder; import javax.swing.border.TitledBorder; -import javax.swing.JButton; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.JTextArea; -import javax.swing.UIManager; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.event.ActionListener; /** * diff --git a/pmd/src/net/sourceforge/pmd/swingui/DirectoryTable.java b/pmd/src/net/sourceforge/pmd/swingui/DirectoryTable.java index a699931e6f..6f4c43e41d 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/DirectoryTable.java +++ b/pmd/src/net/sourceforge/pmd/swingui/DirectoryTable.java @@ -1,29 +1,29 @@ package net.sourceforge.pmd.swingui; -import java.awt.Color; -import java.awt.Component; -import java.awt.Point; -import java.awt.Rectangle; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.Font; -import java.io.File; -import java.util.Arrays; -import java.util.Comparator; -import java.util.Vector; +import javax.swing.JLabel; +import javax.swing.JTable; +import javax.swing.ListSelectionModel; +import javax.swing.UIManager; import javax.swing.border.BevelBorder; import javax.swing.border.Border; import javax.swing.border.CompoundBorder; import javax.swing.border.EmptyBorder; import javax.swing.border.EtchedBorder; -import javax.swing.ListSelectionModel; -import javax.swing.JLabel; -import javax.swing.JTable; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.JTableHeader; import javax.swing.table.TableColumn; import javax.swing.table.TableColumnModel; -import javax.swing.UIManager; +import java.awt.Color; +import java.awt.Component; +import java.awt.Font; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.io.File; +import java.util.Arrays; +import java.util.Comparator; +import java.util.Vector; /** * diff --git a/pmd/src/net/sourceforge/pmd/swingui/DirectoryTableModel.java b/pmd/src/net/sourceforge/pmd/swingui/DirectoryTableModel.java index 90af5d4cd3..d7268fa860 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/DirectoryTableModel.java +++ b/pmd/src/net/sourceforge/pmd/swingui/DirectoryTableModel.java @@ -1,5 +1,9 @@ package net.sourceforge.pmd.swingui; +import javax.swing.event.TreeSelectionEvent; +import javax.swing.event.TreeSelectionListener; +import javax.swing.table.DefaultTableModel; +import javax.swing.tree.TreePath; import java.io.File; import java.io.FileFilter; import java.text.DateFormat; @@ -7,10 +11,6 @@ import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.Date; import java.util.Vector; -import javax.swing.event.TreeSelectionEvent; -import javax.swing.event.TreeSelectionListener; -import javax.swing.table.DefaultTableModel; -import javax.swing.tree.TreePath; /** * diff --git a/pmd/src/net/sourceforge/pmd/swingui/DirectoryTree.java b/pmd/src/net/sourceforge/pmd/swingui/DirectoryTree.java index 508e85f36b..65aa67d6ac 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/DirectoryTree.java +++ b/pmd/src/net/sourceforge/pmd/swingui/DirectoryTree.java @@ -1,14 +1,14 @@ package net.sourceforge.pmd.swingui; -import java.awt.Component; -import java.io.File; -import javax.swing.border.EtchedBorder; import javax.swing.BorderFactory; import javax.swing.Icon; import javax.swing.JTree; +import javax.swing.UIManager; +import javax.swing.border.EtchedBorder; import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.TreePath; -import javax.swing.UIManager; +import java.awt.Component; +import java.io.File; /** * diff --git a/pmd/src/net/sourceforge/pmd/swingui/DirectoryTreeModel.java b/pmd/src/net/sourceforge/pmd/swingui/DirectoryTreeModel.java index 31f98a0b7d..80ad6c0b40 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/DirectoryTreeModel.java +++ b/pmd/src/net/sourceforge/pmd/swingui/DirectoryTreeModel.java @@ -1,12 +1,12 @@ package net.sourceforge.pmd.swingui; -import java.io.File; -import java.io.FileFilter; -import java.util.Enumeration; import javax.swing.event.TreeExpansionEvent; import javax.swing.event.TreeWillExpandListener; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreePath; +import java.io.File; +import java.io.FileFilter; +import java.util.Enumeration; /** * diff --git a/pmd/src/net/sourceforge/pmd/swingui/DirectoryTreeNode.java b/pmd/src/net/sourceforge/pmd/swingui/DirectoryTreeNode.java index 6407021dc5..e0e3cef3cf 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/DirectoryTreeNode.java +++ b/pmd/src/net/sourceforge/pmd/swingui/DirectoryTreeNode.java @@ -1,7 +1,7 @@ package net.sourceforge.pmd.swingui; -import java.io.File; import javax.swing.tree.DefaultMutableTreeNode; +import java.io.File; /** * diff --git a/pmd/src/net/sourceforge/pmd/swingui/HTMLResultRenderer.java b/pmd/src/net/sourceforge/pmd/swingui/HTMLResultRenderer.java index ca7af77096..2312dde996 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/HTMLResultRenderer.java +++ b/pmd/src/net/sourceforge/pmd/swingui/HTMLResultRenderer.java @@ -1,12 +1,13 @@ package net.sourceforge.pmd.swingui; -import java.io.StringWriter; -import java.util.Iterator; -import javax.swing.UIManager; import net.sourceforge.pmd.Report; import net.sourceforge.pmd.Rule; import net.sourceforge.pmd.RuleViolation; +import javax.swing.UIManager; +import java.io.StringWriter; +import java.util.Iterator; + /** * * Converts the violations list into a text string for viewing. diff --git a/pmd/src/net/sourceforge/pmd/swingui/JobThread.java b/pmd/src/net/sourceforge/pmd/swingui/JobThread.java index 16947a1b25..7d48383179 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/JobThread.java +++ b/pmd/src/net/sourceforge/pmd/swingui/JobThread.java @@ -1,7 +1,7 @@ package net.sourceforge.pmd.swingui; -import java.util.List; import java.util.ArrayList; +import java.util.List; /** * diff --git a/pmd/src/net/sourceforge/pmd/swingui/MessageDialog.java b/pmd/src/net/sourceforge/pmd/swingui/MessageDialog.java index a48084d9f6..feb37a74dc 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/MessageDialog.java +++ b/pmd/src/net/sourceforge/pmd/swingui/MessageDialog.java @@ -1,24 +1,24 @@ package net.sourceforge.pmd.swingui; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dialog; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.FlowLayout; -import java.awt.Frame; -import java.awt.Rectangle; -import java.awt.Window; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import javax.swing.border.CompoundBorder; -import javax.swing.border.EmptyBorder; -import javax.swing.border.EtchedBorder; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JPanel; import javax.swing.JTextArea; import javax.swing.UIManager; +import javax.swing.border.CompoundBorder; +import javax.swing.border.EmptyBorder; +import javax.swing.border.EtchedBorder; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dialog; +import java.awt.FlowLayout; +import java.awt.Frame; +import java.awt.Rectangle; +import java.awt.Window; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; /** * diff --git a/pmd/src/net/sourceforge/pmd/swingui/PMDLookAndFeel.java b/pmd/src/net/sourceforge/pmd/swingui/PMDLookAndFeel.java index 83b5761a44..ee219988ac 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/PMDLookAndFeel.java +++ b/pmd/src/net/sourceforge/pmd/swingui/PMDLookAndFeel.java @@ -1,18 +1,17 @@ package net.sourceforge.pmd.swingui; -import java.awt.Color; -import java.awt.Font; -import java.io.BufferedInputStream; -import java.io.ByteArrayOutputStream; -import java.io.InputStream; -import java.io.IOException; -import java.util.Properties; +import com.sun.java.swing.plaf.windows.WindowsLookAndFeel; import javax.swing.ImageIcon; import javax.swing.LookAndFeel; import javax.swing.UIDefaults; - -import com.sun.java.swing.plaf.windows.WindowsLookAndFeel; +import java.awt.Color; +import java.awt.Font; +import java.io.BufferedInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; /** * diff --git a/pmd/src/net/sourceforge/pmd/swingui/PMDViewer.java b/pmd/src/net/sourceforge/pmd/swingui/PMDViewer.java index 00d3734cf0..4a0448adaa 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/PMDViewer.java +++ b/pmd/src/net/sourceforge/pmd/swingui/PMDViewer.java @@ -1,29 +1,9 @@ package net.sourceforge.pmd.swingui; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Component; -import java.awt.Cursor; -import java.awt.datatransfer.Clipboard; -import java.awt.datatransfer.ClipboardOwner; -import java.awt.datatransfer.StringSelection; -import java.awt.datatransfer.Transferable; -import java.awt.Dimension; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.KeyEvent; -import java.awt.event.MouseEvent; -import java.awt.event.MouseListener; -import java.awt.FlowLayout; -import java.awt.Font; -import java.awt.Graphics; -import java.awt.Insets; -import java.awt.Rectangle; -import java.io.File; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; +import net.sourceforge.pmd.PMDDirectory; +import net.sourceforge.pmd.PMDException; +import javax.swing.*; import javax.swing.border.BevelBorder; import javax.swing.border.Border; import javax.swing.border.CompoundBorder; @@ -31,24 +11,20 @@ import javax.swing.border.EmptyBorder; import javax.swing.border.EtchedBorder; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import javax.swing.Icon; -import javax.swing.ImageIcon; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; -import javax.swing.JPanel; -import javax.swing.JSeparator; -import javax.swing.JScrollPane; -import javax.swing.JSplitPane; -import javax.swing.KeyStroke; -import javax.swing.MenuElement; -import javax.swing.SwingUtilities; -import javax.swing.UIManager; - -import net.sourceforge.pmd.PMDDirectory; -import net.sourceforge.pmd.PMDException; +import java.awt.*; +import java.awt.datatransfer.Clipboard; +import java.awt.datatransfer.ClipboardOwner; +import java.awt.datatransfer.StringSelection; +import java.awt.datatransfer.Transferable; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.KeyEvent; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.io.File; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; /** * diff --git a/pmd/src/net/sourceforge/pmd/swingui/Preferences.java b/pmd/src/net/sourceforge/pmd/swingui/Preferences.java index 5ba1f61c32..9efeff5319 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/Preferences.java +++ b/pmd/src/net/sourceforge/pmd/swingui/Preferences.java @@ -1,5 +1,7 @@ package net.sourceforge.pmd.swingui; +import net.sourceforge.pmd.PMDException; + import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -8,8 +10,6 @@ import java.io.IOException; import java.text.MessageFormat; import java.util.Properties; -import net.sourceforge.pmd.PMDException; - /** * * @author Donald A. Leckie diff --git a/pmd/src/net/sourceforge/pmd/swingui/PreferencesEditor.java b/pmd/src/net/sourceforge/pmd/swingui/PreferencesEditor.java index dcfcc82dd4..12d868f412 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/PreferencesEditor.java +++ b/pmd/src/net/sourceforge/pmd/swingui/PreferencesEditor.java @@ -1,29 +1,28 @@ package net.sourceforge.pmd.swingui; +import net.sourceforge.pmd.PMDException; + +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JFileChooser; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTextArea; +import javax.swing.UIManager; +import javax.swing.border.EmptyBorder; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; import java.awt.Font; import java.awt.FontMetrics; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; import java.io.File; -import javax.swing.border.EmptyBorder; -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JFileChooser; -import javax.swing.JLabel; -import javax.swing.JTextArea; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.UIManager; - -import net.sourceforge.pmd.PMDException; - /** * * @author Donald A. Leckie diff --git a/pmd/src/net/sourceforge/pmd/swingui/ResultsViewer.java b/pmd/src/net/sourceforge/pmd/swingui/ResultsViewer.java index 78f6789691..6d0433b9c0 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/ResultsViewer.java +++ b/pmd/src/net/sourceforge/pmd/swingui/ResultsViewer.java @@ -1,23 +1,22 @@ package net.sourceforge.pmd.swingui; -import java.io.FileInputStream; -import java.io.File; -import java.io.FileNotFoundException; - -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; -import javax.swing.event.ListSelectionEvent; -import javax.swing.event.ListSelectionListener; -import javax.swing.JEditorPane; -import javax.swing.JScrollPane; -import javax.swing.text.html.HTMLEditorKit; - import net.sourceforge.pmd.PMD; import net.sourceforge.pmd.PMDException; import net.sourceforge.pmd.Report; import net.sourceforge.pmd.RuleContext; import net.sourceforge.pmd.RuleSet; +import javax.swing.JEditorPane; +import javax.swing.JScrollPane; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import javax.swing.event.ListSelectionEvent; +import javax.swing.event.ListSelectionListener; +import javax.swing.text.html.HTMLEditorKit; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; + /** * * @author Donald A. Leckie diff --git a/pmd/src/net/sourceforge/pmd/swingui/RuleAllEditingPanel.java b/pmd/src/net/sourceforge/pmd/swingui/RuleAllEditingPanel.java index e9bd3fef12..6c6dac0be0 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/RuleAllEditingPanel.java +++ b/pmd/src/net/sourceforge/pmd/swingui/RuleAllEditingPanel.java @@ -1,10 +1,9 @@ package net.sourceforge.pmd.swingui; -import java.awt.BorderLayout; - -import javax.swing.border.EmptyBorder; import javax.swing.JPanel; import javax.swing.JScrollPane; +import javax.swing.border.EmptyBorder; +import java.awt.BorderLayout; /** * diff --git a/pmd/src/net/sourceforge/pmd/swingui/RuleEditingPanel.java b/pmd/src/net/sourceforge/pmd/swingui/RuleEditingPanel.java index 21e2a7745f..ea5067231b 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/RuleEditingPanel.java +++ b/pmd/src/net/sourceforge/pmd/swingui/RuleEditingPanel.java @@ -1,22 +1,5 @@ package net.sourceforge.pmd.swingui; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Component; -import java.awt.Container; -import java.awt.Dimension; -import java.awt.event.FocusEvent; -import java.awt.event.FocusListener; -import java.awt.Font; -import java.awt.FontMetrics; -import java.awt.Insets; -import java.awt.LayoutManager; -import java.awt.Window; -import java.text.MessageFormat; - -import javax.swing.border.Border; -import javax.swing.border.EmptyBorder; -import javax.swing.border.TitledBorder; import javax.swing.Icon; import javax.swing.JCheckBox; import javax.swing.JComponent; @@ -26,6 +9,13 @@ import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField; import javax.swing.UIManager; +import javax.swing.border.Border; +import javax.swing.border.EmptyBorder; +import javax.swing.border.TitledBorder; +import java.awt.*; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; +import java.text.MessageFormat; /** * diff --git a/pmd/src/net/sourceforge/pmd/swingui/RuleEditingTabbedPane.java b/pmd/src/net/sourceforge/pmd/swingui/RuleEditingTabbedPane.java index 92ccbe235c..ff09c66f6b 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/RuleEditingTabbedPane.java +++ b/pmd/src/net/sourceforge/pmd/swingui/RuleEditingTabbedPane.java @@ -1,13 +1,13 @@ package net.sourceforge.pmd.swingui; +import javax.swing.JTabbedPane; +import javax.swing.SwingUtilities; +import javax.swing.UIManager; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; -import javax.swing.JTabbedPane; -import javax.swing.SwingUtilities; import javax.swing.tree.TreePath; -import javax.swing.UIManager; /** * diff --git a/pmd/src/net/sourceforge/pmd/swingui/RulePropertyEditingPanel.java b/pmd/src/net/sourceforge/pmd/swingui/RulePropertyEditingPanel.java index dbddaa7a28..0a831c9e2d 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/RulePropertyEditingPanel.java +++ b/pmd/src/net/sourceforge/pmd/swingui/RulePropertyEditingPanel.java @@ -1,28 +1,18 @@ package net.sourceforge.pmd.swingui; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Component; -import java.awt.Container; -import java.awt.Dimension; -import java.awt.event.FocusEvent; -import java.awt.event.FocusListener; -import java.awt.Font; -import java.awt.FontMetrics; -import java.awt.Insets; -import java.awt.LayoutManager; -import java.awt.Window; -import java.text.MessageFormat; - -import javax.swing.border.Border; -import javax.swing.border.EmptyBorder; -import javax.swing.border.TitledBorder; -import javax.swing.JComponent; import javax.swing.JComboBox; +import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.UIManager; +import javax.swing.border.Border; +import javax.swing.border.EmptyBorder; +import javax.swing.border.TitledBorder; +import java.awt.*; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; +import java.text.MessageFormat; /** * diff --git a/pmd/src/net/sourceforge/pmd/swingui/RuleSetEditingPanel.java b/pmd/src/net/sourceforge/pmd/swingui/RuleSetEditingPanel.java index a7d46c3078..57a23024dc 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/RuleSetEditingPanel.java +++ b/pmd/src/net/sourceforge/pmd/swingui/RuleSetEditingPanel.java @@ -1,22 +1,5 @@ package net.sourceforge.pmd.swingui; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Component; -import java.awt.Container; -import java.awt.Dimension; -import java.awt.event.FocusEvent; -import java.awt.event.FocusListener; -import java.awt.Font; -import java.awt.FontMetrics; -import java.awt.Insets; -import java.awt.LayoutManager; -import java.awt.Window; -import java.text.MessageFormat; - -import javax.swing.border.Border; -import javax.swing.border.EmptyBorder; -import javax.swing.border.TitledBorder; import javax.swing.Icon; import javax.swing.JCheckBox; import javax.swing.JComponent; @@ -26,6 +9,13 @@ import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField; import javax.swing.UIManager; +import javax.swing.border.Border; +import javax.swing.border.EmptyBorder; +import javax.swing.border.TitledBorder; +import java.awt.*; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; +import java.text.MessageFormat; /** * diff --git a/pmd/src/net/sourceforge/pmd/swingui/RulesClassSelectDialog.java b/pmd/src/net/sourceforge/pmd/swingui/RulesClassSelectDialog.java index 8951034e88..d5243c8c7b 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/RulesClassSelectDialog.java +++ b/pmd/src/net/sourceforge/pmd/swingui/RulesClassSelectDialog.java @@ -1,31 +1,20 @@ package net.sourceforge.pmd.swingui; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.FlowLayout; -import java.io.File; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Comparator; -import java.util.Enumeration; -import java.util.Iterator; -import java.util.List; +import net.sourceforge.pmd.PMDDirectory; +import net.sourceforge.pmd.PMDException; -import javax.swing.border.EtchedBorder; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JSplitPane; import javax.swing.UIManager; - -import net.sourceforge.pmd.PMDDirectory; -import net.sourceforge.pmd.PMDException; -import net.sourceforge.pmd.Rule; -import net.sourceforge.pmd.RuleProperties; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.File; /** * diff --git a/pmd/src/net/sourceforge/pmd/swingui/RulesEditor.java b/pmd/src/net/sourceforge/pmd/swingui/RulesEditor.java index cebd9eb8c3..aa79614191 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/RulesEditor.java +++ b/pmd/src/net/sourceforge/pmd/swingui/RulesEditor.java @@ -1,5 +1,16 @@ package net.sourceforge.pmd.swingui; +import net.sourceforge.pmd.PMDException; +import net.sourceforge.pmd.Rule; +import net.sourceforge.pmd.RuleProperties; +import net.sourceforge.pmd.RuleSet; + +import javax.swing.JDialog; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JSplitPane; +import javax.swing.JTabbedPane; +import javax.swing.UIManager; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; @@ -12,18 +23,6 @@ import java.util.Enumeration; import java.util.List; import java.util.Set; -import javax.swing.JDialog; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.JSplitPane; -import javax.swing.JTabbedPane; -import javax.swing.UIManager; - -import net.sourceforge.pmd.PMDException; -import net.sourceforge.pmd.Rule; -import net.sourceforge.pmd.RuleProperties; -import net.sourceforge.pmd.RuleSet; - /** * * @author Donald A. Leckie diff --git a/pmd/src/net/sourceforge/pmd/swingui/RulesTree.java b/pmd/src/net/sourceforge/pmd/swingui/RulesTree.java index fb34b4662e..bda76c5e37 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/RulesTree.java +++ b/pmd/src/net/sourceforge/pmd/swingui/RulesTree.java @@ -1,12 +1,28 @@ package net.sourceforge.pmd.swingui; +import net.sourceforge.pmd.AbstractRule; +import net.sourceforge.pmd.PMDException; +import net.sourceforge.pmd.Rule; +import net.sourceforge.pmd.RuleSet; + +import javax.swing.BorderFactory; +import javax.swing.Icon; +import javax.swing.JMenuItem; +import javax.swing.JPopupMenu; +import javax.swing.JSeparator; +import javax.swing.JTree; +import javax.swing.UIManager; +import javax.swing.border.EtchedBorder; +import javax.swing.tree.DefaultTreeCellEditor; +import javax.swing.tree.DefaultTreeCellRenderer; +import javax.swing.tree.DefaultTreeModel; +import javax.swing.tree.TreePath; import java.awt.Component; +import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; -import java.awt.event.MouseListener; -import java.awt.Point; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileFilter; @@ -18,24 +34,6 @@ import java.util.Arrays; import java.util.Comparator; import java.util.EventObject; -import javax.swing.border.EtchedBorder; -import javax.swing.BorderFactory; -import javax.swing.Icon; -import javax.swing.JMenuItem; -import javax.swing.JPopupMenu; -import javax.swing.JSeparator; -import javax.swing.JTree; -import javax.swing.tree.DefaultTreeCellEditor; -import javax.swing.tree.DefaultTreeCellRenderer; -import javax.swing.tree.DefaultTreeModel; -import javax.swing.tree.TreePath; -import javax.swing.UIManager; - -import net.sourceforge.pmd.AbstractRule; -import net.sourceforge.pmd.PMDException; -import net.sourceforge.pmd.Rule; -import net.sourceforge.pmd.RuleSet; - /** * diff --git a/pmd/src/net/sourceforge/pmd/swingui/RulesTreeNode.java b/pmd/src/net/sourceforge/pmd/swingui/RulesTreeNode.java index 848c19e607..ecf6c83177 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/RulesTreeNode.java +++ b/pmd/src/net/sourceforge/pmd/swingui/RulesTreeNode.java @@ -1,12 +1,11 @@ package net.sourceforge.pmd.swingui; -import java.util.Enumeration; - -import javax.swing.tree.DefaultMutableTreeNode; - import net.sourceforge.pmd.Rule; import net.sourceforge.pmd.RuleSet; +import javax.swing.tree.DefaultMutableTreeNode; +import java.util.Enumeration; + /** * * @author Donald A. Leckie diff --git a/pmd/src/net/sourceforge/pmd/swingui/TextRenderer.java b/pmd/src/net/sourceforge/pmd/swingui/TextRenderer.java index e9fcc35570..ddac472dd6 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/TextRenderer.java +++ b/pmd/src/net/sourceforge/pmd/swingui/TextRenderer.java @@ -1,10 +1,11 @@ package net.sourceforge.pmd.swingui; -import java.util.Iterator; import net.sourceforge.pmd.Report; import net.sourceforge.pmd.Rule; import net.sourceforge.pmd.RuleViolation; +import java.util.Iterator; + /** * * Converts the violations list into a text string for viewing. diff --git a/pmd/src/net/sourceforge/pmd/symboltable/AbstractScope.java b/pmd/src/net/sourceforge/pmd/symboltable/AbstractScope.java index 44234b83d3..bbdfbb4233 100644 --- a/pmd/src/net/sourceforge/pmd/symboltable/AbstractScope.java +++ b/pmd/src/net/sourceforge/pmd/symboltable/AbstractScope.java @@ -7,7 +7,11 @@ package net.sourceforge.pmd.symboltable; import net.sourceforge.pmd.util.Applier; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; /** * Provides behavior common to all Scopes diff --git a/pmd/src/net/sourceforge/pmd/symboltable/ClassScope.java b/pmd/src/net/sourceforge/pmd/symboltable/ClassScope.java index 6c1dddb4c1..3ea9f0ba18 100644 --- a/pmd/src/net/sourceforge/pmd/symboltable/ClassScope.java +++ b/pmd/src/net/sourceforge/pmd/symboltable/ClassScope.java @@ -7,7 +7,8 @@ package net.sourceforge.pmd.symboltable; import net.sourceforge.pmd.util.Applier; -import java.util.*; +import java.util.ArrayList; +import java.util.List; public class ClassScope extends AbstractScope { diff --git a/pmd/src/net/sourceforge/pmd/symboltable/DeclarationFinder.java b/pmd/src/net/sourceforge/pmd/symboltable/DeclarationFinder.java index 3bf43b814f..6f612847c8 100644 --- a/pmd/src/net/sourceforge/pmd/symboltable/DeclarationFinder.java +++ b/pmd/src/net/sourceforge/pmd/symboltable/DeclarationFinder.java @@ -5,9 +5,9 @@ */ package net.sourceforge.pmd.symboltable; -import net.sourceforge.pmd.ast.JavaParserVisitorAdapter; -import net.sourceforge.pmd.ast.ASTVariableDeclaratorId; import net.sourceforge.pmd.ast.ASTMethodDeclarator; +import net.sourceforge.pmd.ast.ASTVariableDeclaratorId; +import net.sourceforge.pmd.ast.JavaParserVisitorAdapter; public class DeclarationFinder extends JavaParserVisitorAdapter { diff --git a/pmd/src/net/sourceforge/pmd/symboltable/ImageFinderFunction.java b/pmd/src/net/sourceforge/pmd/symboltable/ImageFinderFunction.java index d15821d17f..80321c8aab 100644 --- a/pmd/src/net/sourceforge/pmd/symboltable/ImageFinderFunction.java +++ b/pmd/src/net/sourceforge/pmd/symboltable/ImageFinderFunction.java @@ -7,7 +7,9 @@ package net.sourceforge.pmd.symboltable; import net.sourceforge.pmd.util.UnaryFunction; -import java.util.*; +import java.util.HashSet; +import java.util.List; +import java.util.Set; public class ImageFinderFunction implements UnaryFunction { diff --git a/pmd/src/net/sourceforge/pmd/symboltable/LocalScope.java b/pmd/src/net/sourceforge/pmd/symboltable/LocalScope.java index 11c8ebb8ac..1d2c4d8f77 100644 --- a/pmd/src/net/sourceforge/pmd/symboltable/LocalScope.java +++ b/pmd/src/net/sourceforge/pmd/symboltable/LocalScope.java @@ -5,11 +5,8 @@ */ package net.sourceforge.pmd.symboltable; -import net.sourceforge.pmd.ast.*; import net.sourceforge.pmd.util.Applier; -import java.util.*; - public class LocalScope extends AbstractScope { public void addDeclaration(VariableNameDeclaration nameDecl) { diff --git a/pmd/src/net/sourceforge/pmd/symboltable/MethodNameDeclaration.java b/pmd/src/net/sourceforge/pmd/symboltable/MethodNameDeclaration.java index 04c64b5cdf..144c2bf54a 100644 --- a/pmd/src/net/sourceforge/pmd/symboltable/MethodNameDeclaration.java +++ b/pmd/src/net/sourceforge/pmd/symboltable/MethodNameDeclaration.java @@ -5,7 +5,10 @@ */ package net.sourceforge.pmd.symboltable; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTFormalParameter; +import net.sourceforge.pmd.ast.ASTFormalParameters; +import net.sourceforge.pmd.ast.ASTMethodDeclarator; +import net.sourceforge.pmd.ast.SimpleNode; public class MethodNameDeclaration extends AbstractNameDeclaration implements NameDeclaration { diff --git a/pmd/src/net/sourceforge/pmd/symboltable/NameOccurrence.java b/pmd/src/net/sourceforge/pmd/symboltable/NameOccurrence.java index 1f03c24700..0b9ac3cd56 100644 --- a/pmd/src/net/sourceforge/pmd/symboltable/NameOccurrence.java +++ b/pmd/src/net/sourceforge/pmd/symboltable/NameOccurrence.java @@ -5,7 +5,9 @@ */ package net.sourceforge.pmd.symboltable; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTAssignmentOperator; +import net.sourceforge.pmd.ast.ASTPrimaryExpression; +import net.sourceforge.pmd.ast.SimpleNode; public class NameOccurrence { diff --git a/pmd/src/net/sourceforge/pmd/symboltable/NameOccurrences.java b/pmd/src/net/sourceforge/pmd/symboltable/NameOccurrences.java index 4add545c6e..bf3409025b 100644 --- a/pmd/src/net/sourceforge/pmd/symboltable/NameOccurrences.java +++ b/pmd/src/net/sourceforge/pmd/symboltable/NameOccurrences.java @@ -5,11 +5,15 @@ */ package net.sourceforge.pmd.symboltable; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTName; +import net.sourceforge.pmd.ast.ASTPrimaryExpression; +import net.sourceforge.pmd.ast.ASTPrimaryPrefix; +import net.sourceforge.pmd.ast.ASTPrimarySuffix; +import net.sourceforge.pmd.ast.SimpleNode; -import java.util.List; import java.util.ArrayList; import java.util.Iterator; +import java.util.List; import java.util.StringTokenizer; public class NameOccurrences { diff --git a/pmd/src/net/sourceforge/pmd/symboltable/ScopeFactory.java b/pmd/src/net/sourceforge/pmd/symboltable/ScopeFactory.java index 9852405a60..79602401f9 100644 --- a/pmd/src/net/sourceforge/pmd/symboltable/ScopeFactory.java +++ b/pmd/src/net/sourceforge/pmd/symboltable/ScopeFactory.java @@ -7,8 +7,8 @@ package net.sourceforge.pmd.symboltable; import net.sourceforge.pmd.ast.*; -import java.util.Set; import java.util.HashSet; +import java.util.Set; public class ScopeFactory { diff --git a/pmd/src/net/sourceforge/pmd/symboltable/SymbolFacade.java b/pmd/src/net/sourceforge/pmd/symboltable/SymbolFacade.java index 7c05f300ac..5696968fee 100644 --- a/pmd/src/net/sourceforge/pmd/symboltable/SymbolFacade.java +++ b/pmd/src/net/sourceforge/pmd/symboltable/SymbolFacade.java @@ -5,7 +5,9 @@ */ package net.sourceforge.pmd.symboltable; -import net.sourceforge.pmd.ast.*; +import net.sourceforge.pmd.ast.ASTCompilationUnit; +import net.sourceforge.pmd.ast.ASTPrimaryExpression; +import net.sourceforge.pmd.ast.JavaParserVisitorAdapter; import java.util.Iterator; diff --git a/pmd/src/net/sourceforge/pmd/symboltable/TypeSet.java b/pmd/src/net/sourceforge/pmd/symboltable/TypeSet.java index 7be92078ef..f8cfde0d69 100644 --- a/pmd/src/net/sourceforge/pmd/symboltable/TypeSet.java +++ b/pmd/src/net/sourceforge/pmd/symboltable/TypeSet.java @@ -5,7 +5,13 @@ */ package net.sourceforge.pmd.symboltable; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; /** * Keeps track of the types encountered in a ASTCompilationUnit diff --git a/pmd/src/net/sourceforge/pmd/symboltable/VariableUsageFinderFunction.java b/pmd/src/net/sourceforge/pmd/symboltable/VariableUsageFinderFunction.java index 3c3a84ee2c..2e317b1932 100644 --- a/pmd/src/net/sourceforge/pmd/symboltable/VariableUsageFinderFunction.java +++ b/pmd/src/net/sourceforge/pmd/symboltable/VariableUsageFinderFunction.java @@ -7,9 +7,9 @@ package net.sourceforge.pmd.symboltable; import net.sourceforge.pmd.util.UnaryFunction; -import java.util.Map; import java.util.HashMap; import java.util.List; +import java.util.Map; public class VariableUsageFinderFunction implements UnaryFunction { private Map results = new HashMap(); diff --git a/pmd/src/net/sourceforge/pmd/util/ASTViewer.java b/pmd/src/net/sourceforge/pmd/util/ASTViewer.java index 47f2b9d161..482617b47a 100644 --- a/pmd/src/net/sourceforge/pmd/util/ASTViewer.java +++ b/pmd/src/net/sourceforge/pmd/util/ASTViewer.java @@ -5,16 +5,22 @@ */ package net.sourceforge.pmd.util; -import net.sourceforge.pmd.ast.JavaParser; import net.sourceforge.pmd.ast.ASTCompilationUnit; +import net.sourceforge.pmd.ast.JavaParser; import net.sourceforge.pmd.ast.ParseException; -import javax.swing.*; -import java.awt.*; +import javax.swing.JButton; +import javax.swing.JEditorPane; +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTextArea; +import java.awt.BorderLayout; +import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.io.StringReader; import java.io.PrintStream; +import java.io.StringReader; public class ASTViewer {