Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
7.0.1
-
None
-
Ubuntu 14.04.5 LTS
-
New
Description
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
conditionPattern == SUFFIX_CONDITION_REGEX_PATTERN
analysis/common/src/java/org/apache/lucene/analysis/cjk/CJKBigramFilter.java
if (type == doHan || type == doHiragana || type == doKatakana || type == doHangul) {
analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicFilter.java
if (type == APOSTROPHE_TYPE &&...){ } else if (type == ACRONYM_TYPE) {