This commit is contained in:
Alexey Kudravtsev
2017-01-17 15:10:15 +03:00
parent e79a56e67c
commit e138c44906
2 changed files with 5 additions and 3 deletions
@@ -529,7 +529,7 @@ public class IterationState {
}
List<TextAttributes> cachedAttributes = myCachedAttributesList;
cachedAttributes.clear();
if (!cachedAttributes.isEmpty()) cachedAttributes.clear();
//noinspection ForLoopReplaceableByForEach
for (int i = 0; i < size; i++) {
@@ -18,6 +18,7 @@ package com.intellij.util;
import com.intellij.util.containers.EmptyIterator;
import com.intellij.util.containers.SingletonIteratorBase;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.TestOnly;
import java.lang.reflect.Array;
import java.util.*;
@@ -242,7 +243,8 @@ public class SmartList<E> extends AbstractList<E> implements RandomAccess {
}
}
public int getModificationCount() {
@TestOnly
int getModificationCount() {
return modCount;
}
@@ -294,7 +296,7 @@ public class SmartList<E> extends AbstractList<E> implements RandomAccess {
if (mySize == 0) {
return -1;
}
else if (mySize == 1) {
if (mySize == 1) {
if (o == null) {
return myElem == null ? 0 : -1;
}