Deprecate AbstractEmptyIterator.add(E) without replacement
This commit is contained in:
parent
d9d6f2098a
commit
969bfd2fe7
|
@ -26,6 +26,7 @@
|
||||||
<!-- FIX -->
|
<!-- FIX -->
|
||||||
<action issue="COLLECTIONS-857" type="fix" dev="ggregory" due-to="Claude Warren">Complete bloom filter documentation #507.</action>
|
<action issue="COLLECTIONS-857" type="fix" dev="ggregory" due-to="Claude Warren">Complete bloom filter documentation #507.</action>
|
||||||
<action type="fix" dev="ggregory" due-to="Gary Gregory">Package private AbstractEmptyIterator implements ResettableIterator so subclasses don't.</action>
|
<action type="fix" dev="ggregory" due-to="Gary Gregory">Package private AbstractEmptyIterator implements ResettableIterator so subclasses don't.</action>
|
||||||
|
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate AbstractEmptyIterator.add(E) without replacement.</action>
|
||||||
<!-- ADD -->
|
<!-- ADD -->
|
||||||
<!-- UPDATE -->
|
<!-- UPDATE -->
|
||||||
</release>
|
</release>
|
||||||
|
|
|
@ -33,7 +33,14 @@ abstract class AbstractEmptyIterator<E> implements ResettableIterator<E> {
|
||||||
protected AbstractEmptyIterator() {
|
protected AbstractEmptyIterator() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void add(final E obj) {
|
/**
|
||||||
|
* Always throws UnsupportedOperationException.
|
||||||
|
* @param ignore ignore.
|
||||||
|
* @throws UnsupportedOperationException
|
||||||
|
* @deprecated Will be removed in 5.0 without replacement.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public void add(final E ignore) {
|
||||||
throw new UnsupportedOperationException("add() not supported for empty Iterator");
|
throw new UnsupportedOperationException("add() not supported for empty Iterator");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue