aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-06-30 10:51:46 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-06-30 10:51:46 +0200
commit81e17e86cb55558de9d48c6e5fbda1cc79e98355 (patch)
treeda39fb300e2defa8d525bf3d97a0831813b593ca /sonar-plugin-api
parent3176e6a63f06386a78ea73d69c5f082959562ac3 (diff)
downloadsonarqube-81e17e86cb55558de9d48c6e5fbda1cc79e98355.tar.gz
sonarqube-81e17e86cb55558de9d48c6e5fbda1cc79e98355.zip
Fix quality flaws
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java
index b0c51aa20c7..57f3fec83a2 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java
@@ -789,8 +789,8 @@ public class Metric<G extends Serializable> implements Serializable, org.sonar.a
*/
public <G extends Serializable> Metric<G> create() {
if (ValueType.PERCENT.equals(this.type)) {
- this.bestValue = (direction == DIRECTION_BETTER ? 100.0 : 0.0);
- this.worstValue = (direction == DIRECTION_BETTER ? 0.0 : 100.0);
+ this.bestValue = (direction == DIRECTION_BETTER) ? 100.0 : 0.0;
+ this.worstValue = (direction == DIRECTION_BETTER) ? 0.0 : 100.0;
}
return new Metric<>(this);
}