You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Stu Hood (JIRA)" <ji...@apache.org> on 2009/12/04 20:25:20 UTC
[jira] Created: (CASSANDRA-602) bytesToHex broken for small byte
values
bytesToHex broken for small byte values
---------------------------------------
Key: CASSANDRA-602
URL: https://issues.apache.org/jira/browse/CASSANDRA-602
Project: Cassandra
Issue Type: Bug
Affects Versions: 0.3, 0.4, 0.5
Reporter: Stu Hood
Assignee: Stu Hood
Priority: Blocker
Fix For: 0.5
Attachments: fb-bytestohex.diff
FBUtilities.bytesToHex uses Integer.toHexString, which does not zero-pad its output. We then assert in hexToBytes that each byte string is 2 characters long.
The assertion will occasionally fail, but oftentimes, we simple end up with a different byte value than we started with.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-602) bytesToHex broken for small byte
values
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792155#action_12792155 ]
Hudson commented on CASSANDRA-602:
----------------------------------
Integrated in Cassandra #291 (See [http://hudson.zones.apache.org/hudson/job/Cassandra/291/])
> bytesToHex broken for small byte values
> ---------------------------------------
>
> Key: CASSANDRA-602
> URL: https://issues.apache.org/jira/browse/CASSANDRA-602
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 0.3, 0.4, 0.5
> Reporter: Stu Hood
> Assignee: Stu Hood
> Priority: Blocker
> Fix For: 0.5
>
> Attachments: fb-bytestohex.diff
>
>
> FBUtilities.bytesToHex uses Integer.toHexString, which does not zero-pad its output. We then assert in hexToBytes that each byte string is 2 characters long.
> The assertion will occasionally fail, but oftentimes, we simple end up with a different byte value than we started with.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-602) bytesToHex broken for small byte
values
Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786118#action_12786118 ]
Gary Dusbabek commented on CASSANDRA-602:
-----------------------------------------
Fix looks good. +1.
> bytesToHex broken for small byte values
> ---------------------------------------
>
> Key: CASSANDRA-602
> URL: https://issues.apache.org/jira/browse/CASSANDRA-602
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 0.3, 0.4, 0.5
> Reporter: Stu Hood
> Assignee: Stu Hood
> Priority: Blocker
> Fix For: 0.5
>
> Attachments: fb-bytestohex.diff
>
>
> FBUtilities.bytesToHex uses Integer.toHexString, which does not zero-pad its output. We then assert in hexToBytes that each byte string is 2 characters long.
> The assertion will occasionally fail, but oftentimes, we simple end up with a different byte value than we started with.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-602) bytesToHex broken for small byte
values
Posted by "Stu Hood (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stu Hood updated CASSANDRA-602:
-------------------------------
Attachment: fb-bytestohex.diff
Patch adding a more complete testcase and a fix.
> bytesToHex broken for small byte values
> ---------------------------------------
>
> Key: CASSANDRA-602
> URL: https://issues.apache.org/jira/browse/CASSANDRA-602
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 0.3, 0.4, 0.5
> Reporter: Stu Hood
> Assignee: Stu Hood
> Priority: Blocker
> Fix For: 0.5
>
> Attachments: fb-bytestohex.diff
>
>
> FBUtilities.bytesToHex uses Integer.toHexString, which does not zero-pad its output. We then assert in hexToBytes that each byte string is 2 characters long.
> The assertion will occasionally fail, but oftentimes, we simple end up with a different byte value than we started with.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-602) bytesToHex broken for small byte
values
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786389#action_12786389 ]
Hudson commented on CASSANDRA-602:
----------------------------------
Integrated in Cassandra #278 (See [http://hudson.zones.apache.org/hudson/job/Cassandra/278/])
zero-pad single hex digits in bytesToHex. patch by Stu Hood; reviewed by gdusbabek for
> bytesToHex broken for small byte values
> ---------------------------------------
>
> Key: CASSANDRA-602
> URL: https://issues.apache.org/jira/browse/CASSANDRA-602
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 0.3, 0.4, 0.5
> Reporter: Stu Hood
> Assignee: Stu Hood
> Priority: Blocker
> Fix For: 0.5
>
> Attachments: fb-bytestohex.diff
>
>
> FBUtilities.bytesToHex uses Integer.toHexString, which does not zero-pad its output. We then assert in hexToBytes that each byte string is 2 characters long.
> The assertion will occasionally fail, but oftentimes, we simple end up with a different byte value than we started with.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.