]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaws
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 2 Jul 2014 11:19:14 +0000 (13:19 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 2 Jul 2014 11:19:14 +0000 (13:19 +0200)
sonar-server/src/main/java/org/sonar/server/rule/index/RuleNormalizer.java

index 9186bc417af7c8de08b5ceef0ea5eba45b31a039..8fff85e916696bbee8788c9779460a200ff7c3cf 100644 (file)
@@ -38,9 +38,6 @@ import org.sonar.server.search.IndexField;
 import org.sonar.server.search.Indexable;
 import org.sonar.server.search.es.ListUpdate;
 
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
 import java.lang.reflect.Field;
 import java.util.*;
 
@@ -339,17 +336,4 @@ public class RuleNormalizer extends BaseNormalizer<RuleDto, RuleKey> {
       );
   }
 
-  @CheckForNull
-  private CharacteristicDto characteristic(@Nullable Integer subCharacteristicId, DbSession session) {
-    if (subCharacteristicId != null) {
-      CharacteristicDto subCharacteristic = db.debtCharacteristicDao().selectById(subCharacteristicId, session);
-      if (subCharacteristic != null) {
-        Integer characteristicId = subCharacteristic.getParentId();
-        if (characteristicId != null) {
-          return db.debtCharacteristicDao().selectById(characteristicId);
-        }
-      }
-    }
-    return null;
-  }
 }