Author: scolebourne Date: Sun May 15 02:36:15 2005 New Revision: 170211 URL: http://svn.apache.org/viewcvs?rev=170211&view=rev Log: BlockingBuffer now includes InterupttedException stack trace in error bug 33700, from Seth Ladd
Modified: jakarta/commons/proper/collections/trunk/RELEASE-NOTES.html jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/buffer/BlockingBuffer.java Modified: jakarta/commons/proper/collections/trunk/RELEASE-NOTES.html URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/collections/trunk/RELEASE-NOTES.html?rev=170211&r1=170210&r2=170211&view=diff ============================================================================== --- jakarta/commons/proper/collections/trunk/RELEASE-NOTES.html (original) +++ jakarta/commons/proper/collections/trunk/RELEASE-NOTES.html Sun May 15 02:36:15 2005 @@ -52,6 +52,7 @@ <li>MapUtils.putAll - Puts an array of key/value pairs into a map [30882]</li> <li>ExtendedProperties - No longer uses an exception in normal processing [30497]</li> <li>CollectionUtils/ListUtils - retainAll/removeAll that don't change original colllection</li> +<li>BlockingBuffer - now includes stack trace if InterupttedException occurs [33700]</li> </ul> <center><h3>BUG FIXES</h3></center> Modified: jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/buffer/BlockingBuffer.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/buffer/BlockingBuffer.java?rev=170211&r1=170210&r2=170211&view=diff ============================================================================== --- jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/buffer/BlockingBuffer.java (original) +++ jakarta/commons/proper/collections/trunk/src/java/org/apache/commons/collections/buffer/BlockingBuffer.java Sun May 15 02:36:15 2005 @@ -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 @@ return result; } } - + public boolean addAll(Collection c) { synchronized (lock) { boolean result = collection.addAll(c); @@ -86,31 +88,35 @@ 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(); } } - + } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]