Skip to content
This repository was archived by the owner on Jul 18, 2018. It is now read-only.

[squid:S1132] Strings literals should be placed on the left side when checking for equality #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public String2IntIndicesAnalysis(final Settings settings,

boolean local_mem_cache=true;
boolean use_lru_cache=true;
if (!str.equals("true")) {
if (!"true".equals(str)) {
local_mem_cache = false;
}

str = settings.get("use_lru_cache", "true");
if (!str.equals("true")) {
if (!"true".equals(str)) {
use_lru_cache = false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ public String2IntAnalyzer(Settings settings) {
redis_port = Integer.valueOf(settings.get("redis_port", "6379"));
redis_key = settings.get("redis_key", "default_key");
String str = settings.get("local_mem_cache", "true");
if (!str.equals("true")) {
if (!"true".equals(str)) {
local_mem_cache = false;
}
str = settings.get("use_lru_cache", "true");
if (!str.equals("true")) {
if (!"true".equals(str)) {
use_lru_cache = false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ public String2IntTokenFilterFactory(Index index, IndexSettingsService indexSetti
redis_port = Integer.valueOf(settings.get("redis_port", "6379"));
redis_key = settings.get("redis_key", "default_key");
String str = settings.get("local_mem_cache", "true");
if (!str.equals("true")) {
if (!"true".equals(str)) {
local_mem_cache = false;
}
str = settings.get("use_lru_cache", "true");
if (!str.equals("true")) {
if (!"true".equals(str)) {
use_lru_cache = false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ public String2IntTokenizerFactory(Index index, IndexSettingsService indexSetting
redis_key = settings.get("redis_key", "default_key");
String str = settings.get("local_mem_cache", "true");

if (!str.equals("true")) {
if (!"true".equals(str)) {
local_mem_cache = false;
}

str = settings.get("use_lru_cache", "true");
if (!str.equals("true")) {
if (!"true".equals(str)) {
use_lru_cache = false;
}
}
Expand Down