Fixed Bugs with Java Iterators not throwing the correct exception.

This commit is contained in:
Speiger committed 2022-05-17 10:45:05 +02:00
1 parent 31b34f5de1
commit 068cc4a4f7
9 files changed
+44 -33

No files matched your search

@@ -434,6 +434,7 @@ public class ARRAY_FIFO_QUEUE KEY_GENERIC_TYPE extends ABSTRACT_PRIORITY_QUEUE K
@Override
public KEY_TYPE NEXT() {
if(!hasNext()) throw new NoSuchElementException();
KEY_TYPE value = array[index];
removeIndex(index);
index = ++index % array.length;