From 477410f3ebff2cc86f449bdf9b80ac40241b31e3 Mon Sep 17 00:00:00 2001 From: Xavier Le Vourch Date: Sun, 19 Nov 2006 02:07:58 +0000 Subject: [PATCH] Performance Refactoring, XPath rules re-written as Java: DontImportJavaLang, DontImportSun git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4816 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd/etc/changelog.txt | 2 ++ pmd/rulesets/controversial.xml | 16 ++--------- pmd/rulesets/imports.xml | 18 +----------- .../pmd/rules/imports/DontImportJavaLang.java | 28 +++++++++++++++++++ .../pmd/rules/imports/DontImportSun.java | 17 +++++++++++ 5 files changed, 51 insertions(+), 30 deletions(-) create mode 100644 pmd/src/net/sourceforge/pmd/rules/imports/DontImportJavaLang.java create mode 100644 pmd/src/net/sourceforge/pmd/rules/imports/DontImportSun.java diff --git a/pmd/etc/changelog.txt b/pmd/etc/changelog.txt index cad103e91a..d8885ffc5c 100644 --- a/pmd/etc/changelog.txt +++ b/pmd/etc/changelog.txt @@ -46,6 +46,8 @@ Renderers use less memory when generating reports. Performance Refactoring, XPath rules re-written as Java: AssignmentInOperand AvoidDollarSigns + DontImportJavaLang + DontImportSun MoreThanOneLogger SuspiciousHashcodeMethodName UselessStringValueOf diff --git a/pmd/rulesets/controversial.xml b/pmd/rulesets/controversial.xml index fb0b6dbbbc..053662805c 100644 --- a/pmd/rulesets/controversial.xml +++ b/pmd/rulesets/controversial.xml @@ -182,23 +182,11 @@ public class Foo { Avoid importing anything from the 'sun.*' packages. These packages are not portable and are likely to change. - - - - - - - - 4 + diff --git a/pmd/rulesets/imports.xml b/pmd/rulesets/imports.xml index b6952bf521..69907234bb 100644 --- a/pmd/rulesets/imports.xml +++ b/pmd/rulesets/imports.xml @@ -29,27 +29,11 @@ public class Foo {} Avoid importing anything from the package 'java.lang'. These classes are automatically imported (JLS 7.5.3). - - - - - - - 4