From 3a0353c574d600c398df2a47692144f8fb0e2a0c Mon Sep 17 00:00:00 2001 From: Stephane Gamard Date: Wed, 8 Oct 2014 11:49:37 +0200 Subject: [PATCH] fix quality flaw --- .../main/java/org/sonar/server/rule/index/RuleIndex.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java b/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java index 1fa6667309d..2a393da1818 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java +++ b/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java @@ -330,7 +330,7 @@ public class RuleIndex extends BaseIndex { BoolFilterBuilder langFacetFilter = FilterBuilders.boolFilter().must(FilterBuilders.queryFilter(query)); for (Map.Entry filter : filters.entrySet()) { - if (filter.getKey() != RuleNormalizer.RuleField.LANGUAGE.field()) { + if (!StringUtils.equals(filter.getKey(), RuleNormalizer.RuleField.LANGUAGE.field())) { langFacetFilter.must(filter.getValue()); } } @@ -351,7 +351,7 @@ public class RuleIndex extends BaseIndex { BoolFilterBuilder tagsFacetFilter = FilterBuilders.boolFilter().must(FilterBuilders.queryFilter(query)); for (Map.Entry filter : filters.entrySet()) { - if (filter.getKey() != RuleNormalizer.RuleField._TAGS.field()) { + if (!StringUtils.equals(filter.getKey(), RuleNormalizer.RuleField._TAGS.field())) { tagsFacetFilter.must(filter.getValue()); } } @@ -372,7 +372,7 @@ public class RuleIndex extends BaseIndex { BoolFilterBuilder repositoriesFacetFilter = FilterBuilders.boolFilter().must(FilterBuilders.queryFilter(query)); for (Map.Entry filter : filters.entrySet()) { - if (filter.getKey() != RuleNormalizer.RuleField.REPOSITORY.field()) { + if (!StringUtils.equals(filter.getKey(), RuleNormalizer.RuleField.REPOSITORY.field())) { repositoriesFacetFilter.must(filter.getValue()); } } -- 2.39.5