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

Change style guide to include @Override

    XMLWordPrintableJSON

Details

    • Code Clarity
    • Low Hanging Fruit
    • All
    • None
    • Hide

      deleted project in IntelliJ, ran ant realclean && ant && ant generate-idea-files, then created class based off interface and saw autogenerated methods included @Override

      Show
      deleted project in IntelliJ, ran ant realclean && ant && ant generate-idea-files, then created class based off interface and saw autogenerated methods included @Override

    Description

      @Override is used by javac to enforce that a method is in fact overriding from an abstract class or an interface and if this stops being true (such as a refactor happens) then a compiler error is thrown; when we default to excluding, it makes it harder to detect that a refactor catches all implementations and can lead to subtle and hard to track down bugs.

      This ticket removes the comment in the docs that @Override should be avoided and updated the style guide to include them by default.

      Attachments

        Issue Links

          Activity

            People

              dcapwell David Capwell
              dcapwell David Capwell
              David Capwell
              David Capwell
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: