]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaws
authorEric Hartmann <hartmann.eric@gmail.com>
Wed, 12 Jul 2017 13:54:36 +0000 (15:54 +0200)
committerEric Hartmann <hartmann.eric@gmail.com>
Wed, 12 Jul 2017 13:54:36 +0000 (15:54 +0200)
server/sonar-server/src/main/java/org/sonar/server/es/IndexingResult.java
server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndexer.java

index 5571f5099898b6f1b5fe1a1953d17a3820b1787a..e66d842ed4bde2127df1752a6c699606d2d96ccd 100644 (file)
@@ -66,7 +66,7 @@ public class IndexingResult {
    * @see {@link RecoveryIndexer#recover()}
    */
   public double getFailureRatio() {
-    return total.get() == 0 ? 1 : (1.0d * getFailures()) / total.get();
+    return total.get() == 0 ? 1 : ((1.0d * getFailures()) / total.get());
   }
 
   public boolean isSuccess() {
index eaf63b2f4522fd04b8b813d3c8c98abcada488f7..8a9f9d6f2908312f3af2268c151db2ec1de36610 100644 (file)
@@ -83,9 +83,9 @@ public class RuleIndexer implements StartupIndexer, ResilientIndexer {
 
       // index all organization extensions
       if (uninitializedIndexTypes.contains(INDEX_TYPE_RULE_EXTENSION)) {
-        dbClient.ruleDao().scrollIndexingRuleExtensions(dbSession, dto -> {
-          bulk.add(newRuleExtensionDocIndexRequest(dto));
-        });
+        dbClient.ruleDao().scrollIndexingRuleExtensions(dbSession, dto ->
+          bulk.add(newRuleExtensionDocIndexRequest(dto))
+        );
       }
 
       bulk.stop();