db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1396) ReEncodedInputStream may fail to read all of source Reader.
Date Sat, 01 Jul 2006 00:55:30 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1396?page=all ]

Kathey Marsden updated DERBY-1396:
----------------------------------

    Component: Network Server

>  ReEncodedInputStream may fail to read all of source Reader.
> ------------------------------------------------------------
>
>          Key: DERBY-1396
>          URL: http://issues.apache.org/jira/browse/DERBY-1396
>      Project: Derby
>         Type: Bug

>   Components: Network Server
>     Reporter: Tomohito Nakayama
>     Assignee: Tomohito Nakayama
>  Attachments: DERBY-1396.patch
>
> The class org.apache.derby.impl.drda.ReEncodedInputStream seems to have a bug...
> In this class, there exists next code.
>         int count;
> 	if(( count = reader.read(decodedBuffer_, 0, BUFFERED_CHAR_LEN )) < 1 ){
> 	    return null;
> 	}
> In this code, the condition of "<1" was intended to judge whether reader was read
entirely.
> However,spec of java api says that reader returns -1 if the end of the reader has been
reached and not 0.
> Then "<1" is not appropriate.
> Current code judges 0 as the end of reader.
> Then, if 0 was returned in the meaning that "No character was read now but may continue"
as possible in java api, 
> this code will not work correctly...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message