You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Yewei Zhang (JIRA)" <ji...@apache.org> on 2011/03/22 19:24:05 UTC
[jira] [Created] (CASSANDRA-2365) ByteBufferUtil.read(byte[])
returns 0 when the end of the stream has been reached.
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
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
[jira] [Commented] (CASSANDRA-2365) ByteBufferUtil.read(byte[])
returns 0 when the end of the stream has been reached.
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009977#comment-13009977 ]
Hudson commented on CASSANDRA-2365:
-----------------------------------
Integrated in Cassandra-0.7 #399 (See [https://hudson.apache.org/hudson/job/Cassandra-0.7/399/])
fix potential infinite loop in ByteBufferUtil.inputStream
patch by jbellis; reviewed by slebresne for CASSANDRA-2365
> 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
> Assignee: Jonathan Ellis
> 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
[jira] [Commented] (CASSANDRA-2365) ByteBufferUtil.read(byte[])
returns 0 when the end of the stream has been reached.
Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009784#comment-13009784 ]
Sylvain Lebresne commented on CASSANDRA-2365:
---------------------------------------------
+1
> 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
> Assignee: Jonathan Ellis
> 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
[jira] [Updated] (CASSANDRA-2365) ByteBufferUtil.read(byte[])
returns 0 when the end of the stream has been reached.
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ 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