Robert Muir created LUCENE-9878:
-----------------------------------

             Summary: enable redundantNullCheck in ecjLint
                 Key: LUCENE-9878
                 URL: https://issues.apache.org/jira/browse/LUCENE-9878
             Project: Lucene - Core
          Issue Type: Task
            Reporter: Robert Muir


Don't be confused by the name, this isn't enabling annotation-based null 
analyzer or discouraging safety checks in the code.

This is simple flow analysis to detect cases like the following:

{code}
foo = null;
if (foo != null) {
  // provably dead code
}
{code}

{code}
foo.invokeMethod();
if (foo != null) {
  // provably dead code, would have thrown exc
}
{code}

I reviewed all the errors, and the check seems productive. I think a lot of 
this stuff happens as the code "ages" over time. Lots of WTFs :) It even found 
what appears to be a seriously broken equals() implementation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to