You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sc...@apache.org on 2005/10/11 23:09:22 UTC

svn commit: r312957 - in /jakarta/commons/proper/collections/trunk: RELEASE-NOTES.html project.xml src/java/org/apache/commons/collections/buffer/BlockingBuffer.java

Author: scolebourne
Date: Tue Oct 11 14:09:15 2005
New Revision: 312957

URL: http://svn.apache.org/viewcvs?rev=312957&view=rev
Log:
BlockingBuffer - Fix internal locking code
bug 37028, from Sebastian Bazley

Modified:
    jakarta/commons/proper/collections/trunk/RELEASE-NOTES.html
    jakarta/commons/proper/collections/trunk/project.xml
    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=312957&r1=312956&r2=312957&view=diff
==============================================================================
--- jakarta/commons/proper/collections/trunk/RELEASE-NOTES.html (original)
+++ jakarta/commons/proper/collections/trunk/RELEASE-NOTES.html Tue Oct 11 14:09:15 2005
@@ -94,6 +94,7 @@
 <li>BoundedFifoBuffer - Fix iterator remove bug causing ArrayIndexOutOfBounds error [33071]</li>
 <li>UnboundedFifoBuffer - Fix iterator remove bug causing ArrayIndexOutOfBounds error [35733]</li>
 <li>UnboundedFifoBuffer - Fix deserialization to work with subsequant object manipulation [35763]</li>
+<li>BlockingBuffer - Fix internal locking code (internal fix, no effect on users of BlockingBuffer) [37028]</li>
 <li>IteratorChain.remove() - Fix to avoid IllegalStateException when one of the underlying iterators is a FilterIterator [34267]</li>
 <li>ExtendedProperties.convertProperties() - Fix to handle default properties maps correctly [32204]</li>
 <li>Add casts to avoid some JDK1.5 compilation warnings [35474]</li>

Modified: jakarta/commons/proper/collections/trunk/project.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/collections/trunk/project.xml?rev=312957&r1=312956&r2=312957&view=diff
==============================================================================
--- jakarta/commons/proper/collections/trunk/project.xml (original)
+++ jakarta/commons/proper/collections/trunk/project.xml Tue Oct 11 14:09:15 2005
@@ -148,6 +148,9 @@
       <name>Nicola Ken Barozzi</name>
     </contributor>
     <contributor>
+      <name>Sebastian Bazley</name>
+    </contributor>
+    <contributor>
       <name>Ola Berg</name>
     </contributor>
     <contributor>

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=312957&r1=312956&r2=312957&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 Tue Oct 11 14:09:15 2005
@@ -41,6 +41,7 @@
  * @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 boolean add(Object o) {
         synchronized (lock) {
             boolean result = collection.add(o);
-            notifyAll();
+            lock.notifyAll();
             return result;
         }
     }
@@ -84,7 +85,7 @@
     public boolean addAll(Collection c) {
         synchronized (lock) {
             boolean result = collection.addAll(c);
-            notifyAll();
+            lock.notifyAll();
             return result;
         }
     }
@@ -93,7 +94,7 @@
         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 @@
             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 @@
         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 @@
             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());



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org