Issue #1555: Replace while with foreach
Fixes `WhileCanBeForeach` inspection violation. Description: >Reports while loops which iterate over collections, and can be replaced with the foreach iteration syntax, which is available in Java 5 and newer. This inspection only reports if the project or module is configured to use a language level of 5.0 or higher.
This commit is contained in:
parent
190ce3850f
commit
e1a2e66b26
|
|
@ -497,11 +497,9 @@ public class JavadocMethodCheck extends AbstractTypeAwareCheck {
|
|||
}
|
||||
|
||||
// Dump out all unused tags
|
||||
final Iterator<JavadocTag> unusedTagIt = tags.iterator();
|
||||
while (unusedTagIt.hasNext()) {
|
||||
final JavadocTag jt = unusedTagIt.next();
|
||||
if (!jt.isSeeOrInheritDocTag()) {
|
||||
log(jt.getLineNo(), MSG_UNUSED_TAG_GENERAL);
|
||||
for (JavadocTag javadocTag : tags) {
|
||||
if (!javadocTag.isSeeOrInheritDocTag()) {
|
||||
log(javadocTag.getLineNo(), MSG_UNUSED_TAG_GENERAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue