diff --git a/platform/lang-impl/src/com/intellij/psi/impl/PsiCachedValuesFactory.java b/platform/lang-impl/src/com/intellij/psi/impl/PsiCachedValuesFactory.java index d7de93f49900..00924cb57fcb 100644 --- a/platform/lang-impl/src/com/intellij/psi/impl/PsiCachedValuesFactory.java +++ b/platform/lang-impl/src/com/intellij/psi/impl/PsiCachedValuesFactory.java @@ -44,8 +44,7 @@ public class PsiCachedValuesFactory implements CachedValuesFactory { protected Object[] getDependencies(CachedValueProvider.Result result) { return getDependenciesPlusValue(result); } - } : new PsiCachedValueImpl(myManager, provider) { - }; + } : new PsiCachedValueImpl(myManager, provider); } public ParameterizedCachedValue createParameterizedCachedValue(@NotNull ParameterizedCachedValueProvider provider, diff --git a/platform/platform-impl/src/com/intellij/util/CachedValueBase.java b/platform/platform-impl/src/com/intellij/util/CachedValueBase.java index f919f3eb21e2..80021042ac54 100644 --- a/platform/platform-impl/src/com/intellij/util/CachedValueBase.java +++ b/platform/platform-impl/src/com/intellij/util/CachedValueBase.java @@ -58,11 +58,11 @@ public abstract class CachedValueBase { return new Data(value, null, null); } - TLongArrayList timeStamps = new TLongArrayList(); - List deps = new ArrayList(); + TLongArrayList timeStamps = new TLongArrayList(dependencies.length); + List deps = new ArrayList(dependencies.length); collectDependencies(timeStamps, deps, dependencies); - return new Data(value, ArrayUtil.toObjectArray(deps), timeStamps.toNativeArray()); + return new Data(value, ArrayUtil.toObjectArray(deps), timeStamps.toNativeArray()); } protected void setValue(final T value, final CachedValueProvider.Result result) {