CVS: beepcore-java/src/org/beepcore/beep/lib Reply.java,1.7,1.8

Huston Franklin <[email protected]> Mon, 03 Nov 2003 22:06:07 -0800
Newsgroups gmane.network.beep.beepcore.java.cvs
Message-ID <[email protected]>
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv28651/src/org/beepcore/beep/lib

Modified Files:
	Reply.java 
Log Message:
Applied fix from Lawrence

Index: Reply.java
===================================================================
RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/lib/Reply.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** Reply.java	23 Apr 2003 15:23:02 -0000	1.7
--- Reply.java	4 Nov 2003 06:06:05 -0000	1.8
***************
*** 110,132 ****
      synchronized public boolean hasNext() throws BEEPInterruptedException
      {
-         if (this.replies.size() != 0) {
-             return true;
-         }
- 
-         if (this.complete) {
-             return false;
-         }
- 
          try {
!             this.wait();
          } catch (InterruptedException x) {
              throw new BEEPInterruptedException(x.getMessage());
          }
  
!         if (complete) {
!             return false;
!         }
! 
!         return true;
      }
  
--- 110,122 ----
      synchronized public boolean hasNext() throws BEEPInterruptedException
      {
          try {
!             while (replies.size() == 0 && complete == false) {
!                 this.wait();
!             }
          } catch (InterruptedException x) {
              throw new BEEPInterruptedException(x.getMessage());
          }
  
!         return replies.size() > 0;
      }
  



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/