Added new rule thx to William McArthur

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1321 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2002-12-24 16:10:00 +00:00
parent eaa6249554
commit b1d68c4b33
3 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,8 @@
public class ForLoopShouldBeWhileLoop1 {
public void foo() {
int x = 2;
for (;x<5;) {
x++;
}
}
}

View File

@ -0,0 +1,7 @@
public class ForLoopShouldBeWhileLoop2 {
public void foo() {
for (int x=2;x<5;) {
x++;
}
}
}

View File

@ -0,0 +1,5 @@
public class ForLoopShouldBeWhileLoop3 {
public void foo() {
for (;;) {}
}
}