minor optimization: prealloc collection

GitOrigin-RevId: 79fce444d2283b25b67dd2ebf3ef0056404d4633
This commit is contained in:
Alexey Kudravtsev
2024-05-17 16:54:24 +02:00
committed by intellij-monorepo-bot
parent 00ad27e843
commit e31cbdfc41

View File

@@ -23,7 +23,9 @@ public class Stack<T> extends ArrayList<T> {
super(init);
}
@SafeVarargs
public Stack(@NotNull T... items) {
super(items.length);
for (T item : items) {
push(item);
}