Commit de30e5c6 authored by dreis2211's avatar dreis2211 Committed by Stephane Nicoll

Avoid unnecessary allocations in ConditionMessage for NORMAL style

See gh-22330
parent 603e65a6
......@@ -405,6 +405,11 @@ public final class ConditionMessage {
protected Object applyToItem(Object item) {
return item;
}
@Override
public Collection<?> applyTo(Collection<?> items) {
return items;
}
},
QUOTE {
......@@ -415,7 +420,7 @@ public final class ConditionMessage {
};
public Collection<?> applyTo(Collection<?> items) {
List<Object> result = new ArrayList<>();
List<Object> result = new ArrayList<>(items.size());
for (Object item : items) {
result.add(applyToItem(item));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment