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

Replace eclipse warnings based static code analysis with something better (CheckerFramework)

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsAdd voteVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete CommentsStop ReviewRequires TestingNeeds Committer
    XMLWordPrintableJSON

Details

    • Task
    • Status: Review In Progress
    • Normal
    • Resolution: Unresolved
    • 5.0.x, 5.x
    • Build

    Description

      Eclipse warnings is used for static code analysis. However, it does not fit well into Cassandra code and practically we end up explicitly adding suppressions in many places just to satisfy that tool rather than fix the real issues.

      This is an incomplete list of reasons to remove it:

      • not closed resources are detected incorrectly
      • does not recognize custom utility methods used to close the resources, which use use heavily in the code, like Throwables.close, FileUtils.close, closeQuietly...
      • because of the above, we cannot make important things like Ref to implement Closeable as it would make the tool to explode with tons of warnings
      • it complains about correct generics - something like "method X is not applicable for ..." when the code compiles successfully is not acceptable
      • it is old and not maintained

      There are better tools like IntelliJ inspections for example, which can also be run in headless mode

      As agreed on the dev mailing list we will replace it in trunk with CheckerFramework.

      Attachments

        Issue Links

        Activity

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

          People

            jlewandowski Jacek Lewandowski Assign to me
            jlewandowski Jacek Lewandowski
            Jacek Lewandowski
            Piotr Kolaczkowski, Stefan Miklosovic

            Dates

              Created:
              Updated:

              Time Tracking

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

                Slack

                  Issue deployment