From 563b5b1e59b7c5375704c7338d538feb17a33588 Mon Sep 17 00:00:00 2001 From: "Gregory.Shrago" Date: Wed, 27 Apr 2016 02:40:21 +0300 Subject: [PATCH] JBIterator: remove() cannot be supported and delegated --- .../util/src/com/intellij/util/containers/JBIterable.java | 5 ----- .../util/src/com/intellij/util/containers/JBIterator.java | 7 +------ 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/platform/util/src/com/intellij/util/containers/JBIterable.java b/platform/util/src/com/intellij/util/containers/JBIterable.java index 942cc0073458..41577bbded2c 100644 --- a/platform/util/src/com/intellij/util/containers/JBIterable.java +++ b/platform/util/src/com/intellij/util/containers/JBIterable.java @@ -367,11 +367,6 @@ public abstract class JBIterable implements Iterable { cur = fun.fun(iterator.next()).iterator(); return skip(); } - - @Override - public void remove() { - cur.remove(); - } }; } }); diff --git a/platform/util/src/com/intellij/util/containers/JBIterator.java b/platform/util/src/com/intellij/util/containers/JBIterator.java index 8caa1e2140d7..684481eb2f2a 100644 --- a/platform/util/src/com/intellij/util/containers/JBIterator.java +++ b/platform/util/src/com/intellij/util/containers/JBIterator.java @@ -62,11 +62,6 @@ public abstract class JBIterator implements Iterator { protected E nextImpl() { return it.hasNext() ? it.next() : stop(); } - - @Override - public void remove() { - it.remove(); - } }; } @@ -222,7 +217,7 @@ public abstract class JBIterator implements Iterator { } @Override - public void remove() { + public final void remove() { throw new UnsupportedOperationException(); }