aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-08-17 00:38:28 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2013-08-17 00:38:28 +0200
commit9fe28c5e6f56bd44633283d8b8cb01c5791b7d2a (patch)
treeff583f876ec12d54642b59f182793d6e195774b6 /sonar-plugin-api/src
parenta48f3652c54ac1b9444ff740ab020d035fba293d (diff)
downloadsonarqube-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.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasureUtils.java2
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) {