Tiny improvements regarding ArrayList creation

Closes gh-23047
This commit is contained in:
Сергей Цыпанов
2019-05-28 17:08:58 +03:00
committed by Sam Brannen
parent f492e37370
commit 7ef8cc9faf
2 changed files with 2 additions and 3 deletions

View File

@@ -92,8 +92,8 @@ public class InlineList extends SpelNodeImpl {
return this.constant;
}
else {
List<Object> returnValue = new ArrayList<>();
int childCount = getChildCount();
List<Object> returnValue = new ArrayList<>(childCount);
for (int c = 0; c < childCount; c++) {
returnValue.add(getChild(c).getValue(expressionState));
}