cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-2365) ByteBufferUtil.read(byte[]) returns 0 when the end of the stream has been reached.
Date Tue, 22 Mar 2011 18:34:05 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-2365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jonathan Ellis updated CASSANDRA-2365:
--------------------------------------

    Attachment: 2365.txt

patch to return -1 if no more data

> ByteBufferUtil.read(byte[]) returns 0 when the end of the stream has been reached. 
> -----------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2365
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2365
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.7.4
>            Reporter: Yewei Zhang
>            Priority: Minor
>             Fix For: 0.7.5
>
>         Attachments: 2365.txt
>
>
> read(byte[], int, int) doesn't return -1 when the end of the stream is reached. Instead,
it returns 0. 
> len = Math.min(len, copy.remaining());
> copy.get(bytes, off, len);
> return len;
> copy.remaining() returns 0 when the end of the stream is reached. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message