mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
use size as length hint for array
This commit is contained in:
@@ -512,7 +512,7 @@ public class FileBasedIndex implements ApplicationComponent {
|
||||
public Collection<K> read(DataInput in) throws IOException {
|
||||
try {
|
||||
final int size = DataInputOutputUtil.readINT(in);
|
||||
final List<K> list = new ArrayList<K>();
|
||||
final List<K> list = new ArrayList<K>(size);
|
||||
for (int idx = 0; idx < size; idx++) {
|
||||
list.add(keyDescriptor.read(in));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user