diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2013-08-17 00:38:28 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2013-08-17 00:38:28 +0200 |
commit | 9fe28c5e6f56bd44633283d8b8cb01c5791b7d2a (patch) | |
tree | ff583f876ec12d54642b59f182793d6e195774b6 /sonar-plugin-api/src | |
parent | a48f3652c54ac1b9444ff740ab020d035fba293d (diff) | |
download | sonarqube-9fe28c5e6f56bd44633283d8b8cb01c5791b7d2a.tar.gz sonarqube-9fe28c5e6f56bd44633283d8b8cb01c5791b7d2a.zip |
Fix some quality flaws
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/measures/CountDistributionBuilder.java | 2 | ||||
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasureUtils.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/CountDistributionBuilder.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/CountDistributionBuilder.java index 8a626cdfd96..bdca4449e65 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/CountDistributionBuilder.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/CountDistributionBuilder.java @@ -106,7 +106,7 @@ public class CountDistributionBuilder implements MeasureBuilder { Map<String, String> map = KeyValueFormat.parse(measure.getData()); for (Map.Entry<String, String> entry : map.entrySet()) { String key = entry.getKey(); - int value = (StringUtils.isBlank(entry.getValue()) ? 0 : Integer.parseInt(entry.getValue())); + int value = StringUtils.isBlank(entry.getValue()) ? 0 : Integer.parseInt(entry.getValue()); if (NumberUtils.isNumber(key)) { add(NumberUtils.toInt(key), value); } else { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasureUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasureUtils.java index 9f77587903c..f97e18a1ef2 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasureUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasureUtils.java @@ -87,7 +87,7 @@ public final class MeasureUtils { if (measure != null) { result = measure.getVariation(periodIndex); } - return (result != null ? result : defaultValue); + return result != null ? result : defaultValue; } public static Long getVariationAsLong(Measure measure, int periodIndex) { |