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

Fix NPE in SimpleBuilders.ParititionUpdateBulder.RTBuilder.build

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Won't Fix
    • 4.0.5, 4.1-rc1, 4.1, 5.x
    • Legacy/Core
    • None
    • Code
    • Normal
    • Low Hanging Fruit
    • Adhoc Test
    • All
    • None
    • Hide

      unit test

      Show
      unit test

    Description

      These two arrays are not initialised (1) which means that if I do not set start nor end, when ClusteringBound.create is called, it will be null, but it will fail here (2) as values will be null.

      The fix consists of check if values are null and if they are, we build that bound immediately.

      (1) https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/SimpleBuilders.java#L257-L258
      (2) https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/ClusteringBound.java#L128

      Attachments

        Activity

          People

            smiklosovic Stefan Miklosovic
            smiklosovic Stefan Miklosovic
            Stefan Miklosovic
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 10m
                10m