improve performance of projection instantiation

This commit is contained in:
stsypanov
2018-07-07 21:05:07 +03:00
committed by Juergen Hoeller
parent 581acb62a0
commit 6d6aa72e8f
2 changed files with 2 additions and 3 deletions

View File

@@ -653,7 +653,7 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implemen
@SuppressWarnings("unchecked")
private Reference<K, V>[] createReferenceArray(int size) {
return (Reference<K, V>[]) Array.newInstance(Reference.class, size);
return new Reference[size];
}
private int getIndex(int hash, Reference<K, V>[] references) {