[ 
https://issues.apache.org/jira/browse/LUCENE-8047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16246955#comment-16246955
 ] 

Mike Drob commented on LUCENE-8047:
-----------------------------------

Which tool?

> Comparison of String objects using == or !=
> -------------------------------------------
>
>                 Key: LUCENE-8047
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8047
>             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
>
> My tool has scanned the whole codebase of Lucene and found there are eight 
> practice issues of string comparison, in which strings are compared by using 
> ==/!= instead of equals( ).
> analysis/common/src/java/org/apache/lucene/analysis/hunspell/Dictionary.java
> {code:java}
> conditionPattern == SUFFIX_CONDITION_REGEX_PATTERN
> {code}
> analysis/common/src/java/org/apache/lucene/analysis/cjk/CJKBigramFilter.java
> {code:java}
>   if (type == doHan || type == doHiragana || type == doKatakana || type == 
> doHangul) {
> {code}
> analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicFilter.java
> {code:java}
>  if (type == APOSTROPHE_TYPE &&...){
>  } else if (type == ACRONYM_TYPE) {  
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to