diff --git a/RELEASE-NOTES.html b/RELEASE-NOTES.html index c7a0c43f5..c9d27737c 100644 --- a/RELEASE-NOTES.html +++ b/RELEASE-NOTES.html @@ -94,6 +94,7 @@ If this causes major headaches to anyone please contact commons-dev at jakarta.a
  • BoundedFifoBuffer - Fix iterator remove bug causing ArrayIndexOutOfBounds error [33071]
  • UnboundedFifoBuffer - Fix iterator remove bug causing ArrayIndexOutOfBounds error [35733]
  • UnboundedFifoBuffer - Fix deserialization to work with subsequant object manipulation [35763]
  • +
  • BlockingBuffer - Fix internal locking code (internal fix, no effect on users of BlockingBuffer) [37028]
  • IteratorChain.remove() - Fix to avoid IllegalStateException when one of the underlying iterators is a FilterIterator [34267]
  • ExtendedProperties.convertProperties() - Fix to handle default properties maps correctly [32204]
  • Add casts to avoid some JDK1.5 compilation warnings [35474]
  • diff --git a/project.xml b/project.xml index d1d4f9089..09230869f 100644 --- a/project.xml +++ b/project.xml @@ -147,6 +147,9 @@ Nicola Ken Barozzi + + Sebastian Bazley + Ola Berg diff --git a/src/java/org/apache/commons/collections/buffer/BlockingBuffer.java b/src/java/org/apache/commons/collections/buffer/BlockingBuffer.java index 2f8ab2645..304dee76f 100644 --- a/src/java/org/apache/commons/collections/buffer/BlockingBuffer.java +++ b/src/java/org/apache/commons/collections/buffer/BlockingBuffer.java @@ -41,6 +41,7 @@ import org.apache.commons.collections.BufferUnderflowException; * @author Stephen Colebourne * @author Janek Bogucki * @author Phil Steitz + * @author Sebastian Bazley * @version $Revision$ $Date$ * @since Commons Collections 3.0 */ @@ -76,7 +77,7 @@ public class BlockingBuffer extends SynchronizedBuffer { public boolean add(Object o) { synchronized (lock) { boolean result = collection.add(o); - notifyAll(); + lock.notifyAll(); return result; } } @@ -84,7 +85,7 @@ public class BlockingBuffer extends SynchronizedBuffer { public boolean addAll(Collection c) { synchronized (lock) { boolean result = collection.addAll(c); - notifyAll(); + lock.notifyAll(); return result; } } @@ -93,7 +94,7 @@ public class BlockingBuffer extends SynchronizedBuffer { synchronized (lock) { while (collection.isEmpty()) { try { - wait(); + lock.wait(); } catch (InterruptedException e) { PrintWriter out = new PrintWriter(new StringWriter()); e.printStackTrace(out); @@ -110,7 +111,7 @@ public class BlockingBuffer extends SynchronizedBuffer { long timeLeft = expiration - System.currentTimeMillis(); while (timeLeft > 0 && collection.isEmpty()) { try { - wait(timeLeft); + lock.wait(timeLeft); timeLeft = expiration - System.currentTimeMillis(); } catch(InterruptedException e) { PrintWriter out = new PrintWriter(new StringWriter()); @@ -129,7 +130,7 @@ public class BlockingBuffer extends SynchronizedBuffer { synchronized (lock) { while (collection.isEmpty()) { try { - wait(); + lock.wait(); } catch (InterruptedException e) { PrintWriter out = new PrintWriter(new StringWriter()); e.printStackTrace(out); @@ -146,7 +147,7 @@ public class BlockingBuffer extends SynchronizedBuffer { long timeLeft = expiration - System.currentTimeMillis(); while (timeLeft > 0 && collection.isEmpty()) { try { - wait(timeLeft); + lock.wait(timeLeft); timeLeft = expiration - System.currentTimeMillis(); } catch(InterruptedException e) { PrintWriter out = new PrintWriter(new StringWriter());