Skip to content

Commit

Permalink
Merge branch 'pr-176'
Browse files Browse the repository at this point in the history
This closes #176
  • Loading branch information
kinow committed Aug 26, 2020
2 parents ac61e06 + c82461d commit 0fbfbfc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
</properties>
<body>
<release version="4.5" date="2020-MM-DD" description="Maintenance release.">
<action issue="COLLECTIONS-765" dev="kinow" type="fix" due-to="Tobias Kiecker">
Update Javadoc of ListIteratorWrapper#remove.
</action>
<action issue="COLLECTIONS-708" dev="kinow" type="fix" due-to="dota17">
Add hashCode method to CollectionUtils that supports an equator parameter.
</action>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,13 @@ public int previousIndex() {
}

/**
* Throws {@link UnsupportedOperationException} if {@link #previous()} has ever been called.
* Removes the last element that was returned by {@link #next()} or {@link #previous()} from the underlying collection.
* This call can only be made once per call to {@code next} or {@code previous} and only if {@link #add()} was not called in between.
*
* @throws UnsupportedOperationException always
* @throws IllegalStateException if {@code next} or {@code previous} have not been called before, or if {@code remove} or {@code add} have been called after the last call to {@code next} or {@code previous}
*/
@Override
public void remove() throws UnsupportedOperationException {
public void remove() throws IllegalStateException {
if (iterator instanceof ListIterator) {
iterator.remove();
return;
Expand Down

0 comments on commit 0fbfbfc

Please sign in to comment.