diff --git a/RELEASE-NOTES.html b/RELEASE-NOTES.html
index d58e865ac..b0b71b3e0 100644
--- a/RELEASE-NOTES.html
+++ b/RELEASE-NOTES.html
@@ -52,6 +52,7 @@ If this causes major headaches to anyone please contact commons-dev at jakarta.a
MapUtils.putAll - Puts an array of key/value pairs into a map [30882]
ExtendedProperties - No longer uses an exception in normal processing [30497]
CollectionUtils/ListUtils - retainAll/removeAll that don't change original colllection
+BlockingBuffer - now includes stack trace if InterupttedException occurs [33700]
BUG FIXES
diff --git a/src/java/org/apache/commons/collections/buffer/BlockingBuffer.java b/src/java/org/apache/commons/collections/buffer/BlockingBuffer.java
index f7ac6d574..be4fcbab7 100644
--- a/src/java/org/apache/commons/collections/buffer/BlockingBuffer.java
+++ b/src/java/org/apache/commons/collections/buffer/BlockingBuffer.java
@@ -15,6 +15,8 @@
*/
package org.apache.commons.collections.buffer;
+import java.io.PrintWriter;
+import java.io.StringWriter;
import java.util.Collection;
import org.apache.commons.collections.Buffer;
@@ -78,7 +80,7 @@ public class BlockingBuffer extends SynchronizedBuffer {
return result;
}
}
-
+
public boolean addAll(Collection c) {
synchronized (lock) {
boolean result = collection.addAll(c);
@@ -86,31 +88,35 @@ public class BlockingBuffer extends SynchronizedBuffer {
return result;
}
}
-
+
public Object get() {
synchronized (lock) {
while (collection.isEmpty()) {
try {
wait();
} catch (InterruptedException e) {
- throw new BufferUnderflowException();
+ PrintWriter out = new PrintWriter(new StringWriter());
+ e.printStackTrace(out);
+ throw new BufferUnderflowException("Caused by InterruptedException: " + out.toString());
}
}
return getBuffer().get();
}
}
-
+
public Object remove() {
synchronized (lock) {
while (collection.isEmpty()) {
try {
wait();
} catch (InterruptedException e) {
- throw new BufferUnderflowException();
+ PrintWriter out = new PrintWriter(new StringWriter());
+ e.printStackTrace(out);
+ throw new BufferUnderflowException("Caused by InterruptedException: " + out.toString());
}
}
return getBuffer().remove();
}
}
-
+
}