diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/codestyle/FieldDeclarationsShouldBeAtStartRule.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/codestyle/FieldDeclarationsShouldBeAtStartRule.java index 58f3bbb217..6dc4c45b05 100644 --- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/codestyle/FieldDeclarationsShouldBeAtStartRule.java +++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/codestyle/FieldDeclarationsShouldBeAtStartRule.java @@ -58,9 +58,9 @@ public class FieldDeclarationsShouldBeAtStartRule extends AbstractApexRule { } private List> getMethodNodes(ASTUserClass node) { - // The method represents static initializer blocks, of which there can be many. Given that the - // method doesn't contain location information, only the containing ASTBlockStatements, we fetch - // them for that method only. + // The method represents static initializer blocks, of which there can be many. The + // method doesn't contain location information, however the containing ASTBlockStatements do, + // so we fetch them for that method only. return node.findChildrenOfType(ASTMethod.class).stream() .flatMap(method -> method.getImage().equals("") ? method.findChildrenOfType(ASTBlockStatement.class).stream() : Stream.of(method))