Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-7077

fail precommit on useless assignment

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 6.1, 7.0
    • None
    • None
    • New

    Description

      I found LUCENE-7073 because of a compiler warning in my IDE. It slipped all the way through buggy tests too! I think we should fail when "assignment has no effect", rather than just rely on someone to catch it visually.

      This is very specific and will not trigger a bunch of false positives: but can indicate a common bug in e.g. constructors for POJO classes and so on.

      Attachments

        1. LUCENE-7077.patch
          2 kB
          Robert Muir

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rcmuir Robert Muir
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: