]> source.dussan.org Git - sonarqube.git/commitdiff
Fix minor quality flaws
authorSimon Brandhof <simon.brandhof@gmail.com>
Tue, 22 May 2012 20:50:11 +0000 (22:50 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Tue, 22 May 2012 20:50:11 +0000 (22:50 +0200)
sonar-core/src/main/java/org/sonar/core/review/workflow/WorkflowEngine.java
sonar-core/src/main/java/org/sonar/core/review/workflow/condition/HasProjectPropertyCondition.java

index db66d26956a0564e2545897f4cced1743c3419e0..0766be4ed08d9dac8f680e6d1b039e498711c980 100644 (file)
@@ -97,7 +97,7 @@ public class WorkflowEngine implements ServerComponent {
 
     Preconditions.checkState(verifyConditions(review, context, workflow.getConditions(commandKey)), "Conditions are not respected");
 
-    ImmutableMap<String, String> immutableParameters = ImmutableMap.copyOf(parameters);
+    Map<String, String> immutableParameters = ImmutableMap.copyOf(parameters);
 
     // TODO execute functions are change state before functions that consume state (like "create-jira-issue")
     Review initialReview = ((DefaultReview) review).cloneImmutable();
index 6992ddcd123933dcb74fe0f6b9c1709226734e0b..40a89b1a0abc6a1a7ddf1dbbd698ac1b193af8b0 100644 (file)
@@ -24,8 +24,6 @@ import org.sonar.api.config.Settings;
 import org.sonar.core.review.workflow.review.Review;
 import org.sonar.core.review.workflow.review.WorkflowContext;
 
-import javax.annotation.concurrent.Immutable;
-
 /**
  * Checks that a project property is set, whatever its value.
  *
@@ -41,6 +39,6 @@ public final class HasProjectPropertyCondition extends ProjectPropertyCondition
   @Override
   public boolean doVerify(Review review, WorkflowContext context) {
     Settings settings = context.getProjectSettings();
-    return settings.hasKey(getPropertyKey()) || settings.getDefaultValue(getPropertyKey())!=null;
+    return settings.hasKey(getPropertyKey()) || settings.getDefaultValue(getPropertyKey()) != null;
   }
 }