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

[patch] No need to use .equals on enums, just opens up chance of NPE

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.0.0
    • None
    • None

    Description

      pretty trivial patch that change enum1.equals(enum2) into enum1 == enum2, as .equals isn't needed, and just opens up the possibility of NPEs where == handles them correctly.

      Attachments

        1. enum_equality.diff
          8 kB
          Dave Brosius

        Activity

          People

            dbrosius David Brosius
            dbrosius@apache.org Dave Brosius
            David Brosius
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: