From: Simon Brandhof Date: Tue, 22 May 2012 20:50:11 +0000 (+0200) Subject: Fix minor quality flaws X-Git-Tag: 3.1~123 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=58ab1b98fac50c265e2e7e915b94715c8aeed771;p=sonarqube.git Fix minor quality flaws --- diff --git a/sonar-core/src/main/java/org/sonar/core/review/workflow/WorkflowEngine.java b/sonar-core/src/main/java/org/sonar/core/review/workflow/WorkflowEngine.java index db66d26956a..0766be4ed08 100644 --- a/sonar-core/src/main/java/org/sonar/core/review/workflow/WorkflowEngine.java +++ b/sonar-core/src/main/java/org/sonar/core/review/workflow/WorkflowEngine.java @@ -97,7 +97,7 @@ public class WorkflowEngine implements ServerComponent { Preconditions.checkState(verifyConditions(review, context, workflow.getConditions(commandKey)), "Conditions are not respected"); - ImmutableMap immutableParameters = ImmutableMap.copyOf(parameters); + Map immutableParameters = ImmutableMap.copyOf(parameters); // TODO execute functions are change state before functions that consume state (like "create-jira-issue") Review initialReview = ((DefaultReview) review).cloneImmutable(); diff --git a/sonar-core/src/main/java/org/sonar/core/review/workflow/condition/HasProjectPropertyCondition.java b/sonar-core/src/main/java/org/sonar/core/review/workflow/condition/HasProjectPropertyCondition.java index 6992ddcd123..40a89b1a0ab 100644 --- a/sonar-core/src/main/java/org/sonar/core/review/workflow/condition/HasProjectPropertyCondition.java +++ b/sonar-core/src/main/java/org/sonar/core/review/workflow/condition/HasProjectPropertyCondition.java @@ -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; } }