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)