From 59899e1c820cd3fb8789b9cf8648b269b97763be Mon Sep 17 00:00:00 2001 From: Thomas Neidhart Date: Wed, 27 Nov 2013 21:50:47 +0000 Subject: [PATCH] Add message to exception. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1546206 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/commons/collections4/iterators/PeekingIterator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/apache/commons/collections4/iterators/PeekingIterator.java b/src/main/java/org/apache/commons/collections4/iterators/PeekingIterator.java index 230d41903..fb4cf92cb 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/PeekingIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/PeekingIterator.java @@ -151,7 +151,7 @@ public class PeekingIterator implements Iterator { */ public void remove() { if (slotFilled) { - throw new IllegalStateException(); + throw new IllegalStateException("peek() or element() called before remove()"); } iterator.remove(); }