Skip to content

Files

Latest commit

 

History

History
38 lines (22 loc) · 821 Bytes

EmptyForIteratorPad.md

File metadata and controls

38 lines (22 loc) · 821 Bytes

Pattern: Wrong padding of an empty for iterator

Issue: -

Description

Checks the padding of an empty for iterator; that is whether white space is required at an empty for iterator, or such white space is forbidden. No check occurs if there is a line wrap at the iterator, as in

for (Iterator foo = very.long.line.iterator();
      foo.hasNext();
     )

Examples

To configure the check:

<module name="EmptyForIteratorPad"/>

To configure the check to require white space at an empty for iterator:

<module name="EmptyForIteratorPad">
    <property name="option" value="space"/>
</module>

Further Reading