mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
classlib: small PriorityQueue fixes (#823)
This commit is contained in:
parent
1900852cd8
commit
65681e74d8
|
@ -48,8 +48,8 @@ public class TPriorityQueue<E> extends TAbstractQueue<E> implements TSerializabl
|
|||
initFromSortedSet((TSortedSet<? extends E>) c);
|
||||
} else {
|
||||
data = new Object[c.size()];
|
||||
fillFromCollection(c);
|
||||
setComparator(null);
|
||||
fillFromCollection(c);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -170,6 +170,9 @@ public class TPriorityQueue<E> extends TAbstractQueue<E> implements TSerializabl
|
|||
if (version != knownVersion) {
|
||||
throw new TConcurrentModificationException();
|
||||
}
|
||||
if (index >= size) {
|
||||
throw new TNoSuchElementException();
|
||||
}
|
||||
removeIndex = index;
|
||||
return (E) data[index++];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user