Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-6779

BooleanType is not too boolean

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 2.0.7, 2.1 beta2
    • None
    • None
    • Low

    Description

      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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            slebresne Sylvain Lebresne Assign to me
            slebresne Sylvain Lebresne
            Sylvain Lebresne
            Tom Hobbs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment