forked from phoedos/pmd
removed unnecessary 'implements Rule'
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1490 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -116,11 +116,11 @@ WhileStatement
|
||||
|
||||
<subsection name="Write a rule class">
|
||||
<p>
|
||||
Create a new Java class that extends <code>net.sourceforge.pmd.AbstractRule</code> and implements <code>net.sourceforge.pmd.Rule</code>:
|
||||
Create a new Java class that extends <code>net.sourceforge.pmd.AbstractRule</code>:
|
||||
</p>
|
||||
<source>
|
||||
<![CDATA[
|
||||
public class WhileLoopsMustUseBracesRule extends AbstractRule implements Rule {
|
||||
public class WhileLoopsMustUseBracesRule extends AbstractRule {
|
||||
}
|
||||
]]>
|
||||
</source>
|
||||
@ -130,7 +130,7 @@ public class WhileLoopsMustUseBracesRule extends AbstractRule implements Rule {
|
||||
</p>
|
||||
<source>
|
||||
<![CDATA[
|
||||
public class WhileLoopsMustUseBracesRule extends AbstractRule implements Rule {
|
||||
public class WhileLoopsMustUseBracesRule extends AbstractRule {
|
||||
public Object visit(ASTWhileStatement node, Object data) {
|
||||
System.out.println("hello world");
|
||||
return data;
|
||||
@ -179,7 +179,7 @@ public class WhileLoopsMustUseBracesRule extends AbstractRule implements Rule {
|
||||
</p>
|
||||
<source>
|
||||
<![CDATA[
|
||||
public class WhileLoopsMustUseBracesRule extends AbstractRule implements Rule {
|
||||
public class WhileLoopsMustUseBracesRule extends AbstractRule {
|
||||
public Object visit(ASTWhileStatement node, Object data) {
|
||||
SimpleNode firstStmt = (SimpleNode)node.jjtGetChild(1);
|
||||
if (!hasBlockAsFirstChild(firstStmt)) {
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 77 B |
Binary file not shown.
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 77 B |
Reference in New Issue
Block a user