Commit e2eee30d authored by Benoit Lamarche's avatar Benoit Lamarche Committed by Gerrit Code Review
Browse files

Merge "Revert "Mark empty LocalVariableList as sorted""

parents 90aa7797 3ca3603a
......@@ -36,7 +36,6 @@ public class FixedSizeList
*/
public FixedSizeList(int size) {
super(size != 0);
sorted = size == 0;
try {
arr = new Object[size];
......@@ -279,13 +278,11 @@ public class FixedSizeList
@SuppressWarnings("unchecked")
protected <T> void sort(Comparator<T> comparator) {
if (!sorted) {
throwIfImmutable();
throwIfImmutable();
Arrays.<T>sort((T[]) arr, comparator);
setImmutable();
sorted = true;
}
Arrays.<T>sort((T[]) arr, comparator);
setImmutable();
sorted = true;
}
public boolean isSorted() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment