fix and suppressions for Findbugs violations UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR. Issue #912
This commit is contained in:
parent
674176022a
commit
032faf4eb4
|
|
@ -87,4 +87,20 @@
|
|||
<Class name="com.puppycrawl.tools.checkstyle.api.DetailAST" />
|
||||
<Bug pattern="BC_UNCONFIRMED_CAST" />
|
||||
</Match>
|
||||
<Match>
|
||||
<!-- false positive, beginTree is a kind of constructor for Checks -->
|
||||
<Or>
|
||||
<Class name="com.puppycrawl.tools.checkstyle.checks.DeclarationCollector" />
|
||||
<Class name="com.puppycrawl.tools.checkstyle.checks.OuterTypeFilenameCheck" />
|
||||
<Class name="com.puppycrawl.tools.checkstyle.checks.RegexpCheck" />
|
||||
<!-- createJavadocNode is private and can not be launched without visitToken-->
|
||||
<Class name="com.puppycrawl.tools.checkstyle.checks.javadoc.AbstractJavadocCheck" />
|
||||
<!-- has only one public method and all nitialized inthat method-->
|
||||
<Class name="com.puppycrawl.tools.checkstyle.checks.regexp.MultilineDetector" />
|
||||
<!-- beginProcessing() is kind of c-tor -->
|
||||
<Class name="com.puppycrawl.tools.checkstyle.checks.regexp.RegexpMultilineCheck" />
|
||||
<Class name="com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineCheck" />
|
||||
</Or>
|
||||
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" />
|
||||
</Match>
|
||||
</FindBugsFilter>
|
||||
|
|
|
|||
|
|
@ -93,7 +93,11 @@ public class JavadocNodeImpl implements DetailNode
|
|||
@Override
|
||||
public DetailNode[] getChildren()
|
||||
{
|
||||
return Arrays.copyOf(children, children.length);
|
||||
if (children == null) {
|
||||
return children;
|
||||
} else {
|
||||
return Arrays.copyOf(children, children.length);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue