pmd/pmd-apex
Clément Fournier fd5cce93b0 Merge branch 'pmd7-ast-children-non-null' into 7.0.x
From PR #1823

* This PR is for PMD 7.
* It's extracted from #1759

Changes:
* The children array in AbstractNode is now initialized with an empty
* array.
* This means, it is now never null, thus the null checks can be removed.
* The only change to the children array is, when adding a new child
* (`jjtAddChild`), or removing a child (`removeChildAtIndex`).

Future:
* the children array is protected. This means, sub classes could assign
* null to it... do we really need field available in subclasses? I'd
* assume, the already available methods are enough. -> this is something
* for defining a general AST API (which methods should be package
* private only, as they are only used by the parser, which methods
* define the API, when do we implement iterator, etc..)
2019-05-18 16:36:36 +02:00
..