SpotBugs reports a UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR warning for the incorrectIndentationLines field in IndentationCheck. This field is not initialized in the constructor, which violates best practices.
Current Problem
private Set<Integer> incorrectIndentationLines;
@Override
public void beginTree(DetailAST rootAST) {
incorrectIndentationLines = new HashSet<>();
// ...
}
The field is assigned in beginTree() instead of being initialized at declaration or in the constructor.
This issue addresses only the SpotBugs warning. It does not fully resolve the circular dependency problem described in #14121, which requires broader architectural refactoring.
Related Issues
Part of #14121 (circular dependency elimination)
SpotBugs reports a
UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTORwarning for theincorrectIndentationLinesfield inIndentationCheck. This field is not initialized in the constructor, which violates best practices.Current Problem
The field is assigned in
beginTree()instead of being initialized at declaration or in the constructor.This issue addresses only the SpotBugs warning. It does not fully resolve the circular dependency problem described in #14121, which requires broader architectural refactoring.
Related Issues
Part of #14121 (circular dependency elimination)