mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 20:17:25 +00:00
[optimisation] Avoid making a pointless arraylist in 90% of cases.
This commit is contained in:
1 file changed
+2
-1
@@ -403,8 +403,9 @@ public class EclipseAST extends AST<EclipseAST, EclipseNode, ASTNode> {
|
||||
}
|
||||
|
||||
private Collection<EclipseNode> buildRecordComponents(AbstractVariableDeclaration[] children) {
|
||||
if (children == null) return Collections.emptyList();
|
||||
List<EclipseNode> childNodes = new ArrayList<EclipseNode>();
|
||||
if (children != null) for (int i = 0; i < children.length; i++) {
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
addIfNotNull(childNodes, buildRecordComponent(children[i]));
|
||||
}
|
||||
return childNodes;
|
||||
|
||||
Reference in new issue
Block a user