]> source.dussan.org Git - sonarqube.git/commitdiff
fix quality flaw (debug outputs)
authorStephane Gamard <stephane.gamard@searchbox.com>
Tue, 27 May 2014 16:38:46 +0000 (18:38 +0200)
committerStephane Gamard <stephane.gamard@searchbox.com>
Tue, 27 May 2014 16:46:36 +0000 (18:46 +0200)
sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java
sonar-server/src/main/java/org/sonar/server/search/ESNode.java

index fa7fae0eb654514307fc535da0f1325b7f4798f9..31adc98b849b509a6d928658819b675f0f04a7b3 100644 (file)
@@ -106,11 +106,6 @@ public class RuleIndex extends BaseIndex<Rule, RuleDto, RuleKey> {
   @Override
   protected XContentBuilder getMapping() throws IOException {
 
-    for(IndexField indexField: RuleNormalizer.RuleField.ALL_FIELDS){
-      System.out.println("indexField = " + indexField);
-    }
-
-
     XContentBuilder mapping = jsonBuilder().startObject()
       .startObject(this.indexDefinition.getIndexType())
       .field("dynamic", true)
index 158cfe2d7e9a76af504211a15427db5fec4ab5df..b923743ee15a9c2e4d8f173bfde4cb56b4be3fe8 100644 (file)
@@ -73,11 +73,8 @@ public class ESNode implements Startable {
   @Override
   public void start() {
 
-    IndexProperties.ES_TYPE type = IndexProperties.ES_TYPE.valueOf(settings.getString(IndexProperties.TYPE));
-
-    if(type == null){
-      type = IndexProperties.ES_TYPE.DATA;
-    }
+    IndexProperties.ES_TYPE type = settings.hasKey(IndexProperties.TYPE)?
+      IndexProperties.ES_TYPE.valueOf(IndexProperties.TYPE): IndexProperties.ES_TYPE.DATA;
 
     switch (type) {
       case MEMORY: