diff options
author | Zeeshan Asghar <zeeshan.asghar@devfactory.com> | 2016-01-20 15:51:03 +0500 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-01-29 17:09:25 +0100 |
commit | 7c45001a63725d8898496c84c5e51fae0263a720 (patch) | |
tree | fdae8140cc7fa69fa66c6ddde6fd0a73af2410d6 /server | |
parent | bf071cefa1d04303ae246de745a8856c64b9617f (diff) | |
download | sonarqube-7c45001a63725d8898496c84c5e51fae0263a720.tar.gz sonarqube-7c45001a63725d8898496c84c5e51fae0263a720.zip |
squid:UselessPrenthesesCheck Useless parentheses around expression should be removed to prevent any misunderstanging
Diffstat (limited to 'server')
4 files changed, 6 insertions, 6 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/charts/deprecated/SparkLinesChart.java b/server/sonar-server/src/main/java/org/sonar/server/charts/deprecated/SparkLinesChart.java index e4ead0c3f4d..ea1ee60b9ab 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/charts/deprecated/SparkLinesChart.java +++ b/server/sonar-server/src/main/java/org/sonar/server/charts/deprecated/SparkLinesChart.java @@ -130,8 +130,8 @@ public class SparkLinesChart extends BaseChartWeb implements DeprecatedChart { } series1.add(vX, vY); - min = (vY < min ? vY : min); - max = (vY > max ? vY : max); + min = vY < min ? vY : min; + max = vY > max ? vY : max; } dataset.addSeries(series1); y.setRange(min-1, max+1); diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/DefaultServerUpgradeStatus.java b/server/sonar-server/src/main/java/org/sonar/server/platform/DefaultServerUpgradeStatus.java index df1401c1ba4..cae8e5c0ea0 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/platform/DefaultServerUpgradeStatus.java +++ b/server/sonar-server/src/main/java/org/sonar/server/platform/DefaultServerUpgradeStatus.java @@ -42,7 +42,7 @@ public final class DefaultServerUpgradeStatus implements ServerUpgradeStatus, St @Override public void start() { Integer v = dbVersion.getVersion(); - this.initialDbVersion = (v != null ? v : -1); + this.initialDbVersion = v != null ? v : -1; } @Override diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/RuleUpdate.java b/server/sonar-server/src/main/java/org/sonar/server/rule/RuleUpdate.java index 9f202f1f77b..b6e7375d792 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/RuleUpdate.java +++ b/server/sonar-server/src/main/java/org/sonar/server/rule/RuleUpdate.java @@ -90,7 +90,7 @@ public class RuleUpdate { * Set to <code>null</code> or blank to remove existing note. */ public RuleUpdate setMarkdownNote(@Nullable String s) { - this.markdownNote = (s == null ? null : StringUtils.defaultIfBlank(s, null)); + this.markdownNote = s == null ? null : StringUtils.defaultIfBlank(s, null); this.changeMarkdownNote = true; return this; } @@ -105,7 +105,7 @@ public class RuleUpdate { * to reset to default characteristic. */ public RuleUpdate setDebtSubCharacteristic(@Nullable String c) { - this.debtSubCharacteristicKey = (c == null ? null : StringUtils.defaultIfBlank(c, null)); + this.debtSubCharacteristicKey = c == null ? null : StringUtils.defaultIfBlank(c, null); this.changeDebtSubCharacteristic = true; return this; } diff --git a/server/sonar-server/src/main/java/org/sonar/server/ui/ViewProxy.java b/server/sonar-server/src/main/java/org/sonar/server/ui/ViewProxy.java index f668b5d1770..9d6db3bb9ec 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/ui/ViewProxy.java +++ b/server/sonar-server/src/main/java/org/sonar/server/ui/ViewProxy.java @@ -86,7 +86,7 @@ public class ViewProxy<V extends View> implements Comparable<ViewProxy> { initWidgetGlobal(view); initRequiredMeasures(view); - isWidget = (view instanceof Widget); + isWidget = view instanceof Widget; } private void initRequiredMeasures(V view) { |