You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (JIRA)" <ji...@apache.org> on 2014/02/27 13:58:19 UTC

[jira] [Created] (CASSANDRA-6779) BooleanType is not too boolean

Sylvain Lebresne created CASSANDRA-6779:
-------------------------------------------

             Summary: BooleanType is not too boolean
                 Key: CASSANDRA-6779
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6779
             Project: Cassandra
          Issue Type: Bug
            Reporter: Sylvain Lebresne
            Assignee: Sylvain Lebresne
            Priority: Minor


The BooleanType validator accepts any byte (it only checks it's one byte long) and the comparator actually uses the ByteBuffer.compareTo() method on it's input. So that BooleanType is really ByteType and accepts 256 values.

Note that in practice, it's likely no-one or almost no-one has ever used BooleanType as a comparator, and almost surely the handful that might have done it have stick to sending only 0 for false and 1 for true. Still, it's probably worth fixing before it actually hurt someone. 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)