Fix formatting issues from previous commit

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@171005 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2005-05-19 22:17:10 +00:00
parent 45f7b88bc6
commit 245554d888
1 changed files with 20 additions and 23 deletions

View File

@ -25,17 +25,17 @@ import org.apache.commons.collections.BufferUnderflowException;
/** /**
* Decorates another <code>Buffer</code> to make {@link #get()} and * Decorates another <code>Buffer</code> to make {@link #get()} and
* {@link #remove()} block when the <code>Buffer</code> is empty. * {@link #remove()} block when the <code>Buffer</code> is empty.
* <p/> * <p>
* If either <code>get</code> or <code>remove</code> is called on an empty * If either <code>get</code> or <code>remove</code> is called on an empty
* <code>Buffer</code>, the calling thread waits for notification that * <code>Buffer</code>, the calling thread waits for notification that
* an <code>add</code> or <code>addAll</code> operation has completed. * an <code>add</code> or <code>addAll</code> operation has completed.
* <p/> * <p>
* When one or more entries are added to an empty <code>Buffer</code>, * When one or more entries are added to an empty <code>Buffer</code>,
* all threads blocked in <code>get</code> or <code>remove</code> are notified. * all threads blocked in <code>get</code> or <code>remove</code> are notified.
* There is no guarantee that concurrent blocked <code>get</code> or * There is no guarantee that concurrent blocked <code>get</code> or
* <code>remove</code> requests will be "unblocked" and receive data in the * <code>remove</code> requests will be "unblocked" and receive data in the
* order that they arrive. * order that they arrive.
* <p/> * <p>
* This class is Serializable from Commons Collections 3.1. * This class is Serializable from Commons Collections 3.1.
* *
* @author Stephen Colebourne * @author Stephen Colebourne
@ -94,8 +94,7 @@ public class BlockingBuffer extends SynchronizedBuffer {
while (collection.isEmpty()) { while (collection.isEmpty()) {
try { try {
wait(); wait();
} } catch (InterruptedException e) {
catch(InterruptedException e) {
PrintWriter out = new PrintWriter(new StringWriter()); PrintWriter out = new PrintWriter(new StringWriter());
e.printStackTrace(out); e.printStackTrace(out);
throw new BufferUnderflowException("Caused by InterruptedException: " + out.toString()); throw new BufferUnderflowException("Caused by InterruptedException: " + out.toString());
@ -113,8 +112,7 @@ public class BlockingBuffer extends SynchronizedBuffer {
try { try {
wait(timeLeft); wait(timeLeft);
timeLeft = expiration - System.currentTimeMillis(); timeLeft = expiration - System.currentTimeMillis();
} } catch(InterruptedException e) {
catch(InterruptedException e) {
PrintWriter out = new PrintWriter(new StringWriter()); PrintWriter out = new PrintWriter(new StringWriter());
e.printStackTrace(out); e.printStackTrace(out);
throw new BufferUnderflowException("Caused by InterruptedException: " + out.toString()); throw new BufferUnderflowException("Caused by InterruptedException: " + out.toString());
@ -132,8 +130,7 @@ public class BlockingBuffer extends SynchronizedBuffer {
while (collection.isEmpty()) { while (collection.isEmpty()) {
try { try {
wait(); wait();
} } catch (InterruptedException e) {
catch(InterruptedException e) {
PrintWriter out = new PrintWriter(new StringWriter()); PrintWriter out = new PrintWriter(new StringWriter());
e.printStackTrace(out); e.printStackTrace(out);
throw new BufferUnderflowException("Caused by InterruptedException: " + out.toString()); throw new BufferUnderflowException("Caused by InterruptedException: " + out.toString());
@ -151,8 +148,7 @@ public class BlockingBuffer extends SynchronizedBuffer {
try { try {
wait(timeLeft); wait(timeLeft);
timeLeft = expiration - System.currentTimeMillis(); timeLeft = expiration - System.currentTimeMillis();
} } catch(InterruptedException e) {
catch(InterruptedException e) {
PrintWriter out = new PrintWriter(new StringWriter()); PrintWriter out = new PrintWriter(new StringWriter());
e.printStackTrace(out); e.printStackTrace(out);
throw new BufferUnderflowException("Caused by InterruptedException: " + out.toString()); throw new BufferUnderflowException("Caused by InterruptedException: " + out.toString());
@ -164,4 +160,5 @@ public class BlockingBuffer extends SynchronizedBuffer {
return getBuffer().remove(); return getBuffer().remove();
} }
} }
} }