moving some rules around

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@853 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2002-09-05 18:57:13 +00:00
parent 5718198740
commit 53ddfc9a7b
2 changed files with 19 additions and 33 deletions

View File

@ -5,6 +5,25 @@
This is the sandbox.
</description>
<rule name="UnnecessaryCast"
message="Avoid unnecessary casts"
class="net.sourceforge.pmd.rules.UnnecessaryCastRule">
<description>
A variable is cast to itself, one of its supertypes or one of its interfaces. Usually
indicates that the programmer is not clear on the class structure they
are working with.
</description>
<example>
<![CDATA[
public Collection doSomething() {
List list = new ArrayList();
return (Collection) list; // Unnecessary Cast
}
]]>
</example>
</rule>
<rule name="PositionalIterator"
message="Avoid positional iterators"

View File

@ -1,33 +0,0 @@
<?xml version="1.0"?>
<ruleset name="future">
<description>
These are rules for the future, when we're doing cross-class type checking and such
</description>
<rule name="UnnecessaryCast"
message="Avoid unnecessary casts"
class="net.sourceforge.pmd.rules.UnnecessaryCastRule">
<description>
A variable is cast to itself, one of its supertypes or one of its interfaces. Usually
indicates that the programmer is not clear on the class structure they
are working with.
</description>
<example>
<![CDATA[
public Collection doSomething() {
List list = new ArrayList();
return (Collection) list; // Unnecessary Cast
}
]]>
</example>
</rule>
</ruleset>