lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "song (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-8047) Comparison of String objects using == or !=
Date Fri, 10 Nov 2017 03:12:00 GMT

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

song commented on LUCENE-8047:
------------------------------

A static bug detection tool from my research work, the paper about my tool is still under
double-blind review, so I cannot release more information. Thx.

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message