song created LUCENE-8046:
----------------------------

             Summary: Redundant assign values to one variable continuously, 
which makes the first assignment redundant and useless
                 Key: LUCENE-8046
                 URL: https://issues.apache.org/jira/browse/LUCENE-8046
             Project: Lucene - Core
          Issue Type: Improvement
          Components: modules/analysis
    Affects Versions: 7.0.1
         Environment: Ubuntu 14.04.5 LTS
            Reporter: song


Our static code analysis tool has scanned the codebase of Lucene 7.0.1, and 
find  29 cases, that developers reassigned values to a variable continuously. 

For example, the following code from file: 
`analysis/common/src/java/org/tartarus/snowball/ext/CatalanStemmer.java` 

{code:java}
cursor=limit - v_5;
cursor=limit_backward;
{code}

In the above code snippet, the second statement makes the first one redundant 
and useless.
There are 29 cases in total in the codebase of Lucene.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to