db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r413901 - /db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/ReEncodedInputStream.java
Date Tue, 13 Jun 2006 14:07:22 GMT
Author: tmnk
Date: Tue Jun 13 07:07:22 2006
New Revision: 413901

URL: http://svn.apache.org/viewvc?rev=413901&view=rev
Log:
- DERBY-1396 ReEncodedInputStream may fail to read all of source Reader - Patch by Tomohito
Nakayama (tomonaka@basil.ocn.ne.jp)

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/ReEncodedInputStream.java

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/ReEncodedInputStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/ReEncodedInputStream.java?rev=413901&r1=413900&r2=413901&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/ReEncodedInputStream.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/ReEncodedInputStream.java Tue
Jun 13 07:07:22 2006
@@ -72,10 +72,14 @@
 	throws IOException
     {
 	
-	int count;
-	if(( count = reader.read(decodedBuffer_, 0, BUFFERED_CHAR_LEN )) < 1 ){
-	    return null;
-	}
+		int count;
+		do{
+			count = reader.read(decodedBuffer_, 0, BUFFERED_CHAR_LEN);
+			
+		}while(count == 0);
+			
+		if(count < 0)
+			return null;
 	
 	encodedOutputStream_.reset();
 	encodedStreamWriter_.write(decodedBuffer_,0,count);



Mime
View raw message