lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "song (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-8046) Redundant assign values to one variable continuously, which makes the first assignment redundant and useless
Date Mon, 20 Nov 2017 19:14:00 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-8046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

song updated LUCENE-8046:
-------------------------
    Attachment: patch.LUCENE-8046

> 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
>            Priority: Minor
>              Labels: performance
>         Attachments: patch.LUCENE-8046
>
>
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message