aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-core-plugin
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-07-17 21:34:41 +0200
committerDavid Gageot <david@gageot.net>2012-07-17 21:34:41 +0200
commit9a3d6d33cb3fb6d58e922ac53e72a72682d55333 (patch)
tree4608b0e289140370db374fa4f6d52c7ea144ff8e /plugins/sonar-core-plugin
parentf7f2fb63589f6cba07339bd0ba56f638caa1dfab (diff)
downloadsonarqube-9a3d6d33cb3fb6d58e922ac53e72a72682d55333.tar.gz
sonarqube-9a3d6d33cb3fb6d58e922ac53e72a72682d55333.zip
Fix Indentation violations
Diffstat (limited to 'plugins/sonar-core-plugin')
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AlertUtils.java22
1 files changed, 10 insertions, 12 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AlertUtils.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AlertUtils.java
index bd1fee2b1e7..9fe246f5fdf 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AlertUtils.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AlertUtils.java
@@ -63,25 +63,23 @@ public final class AlertUtils {
int comparison = metricValue.compareTo(criteriaValue);
return !(// NOSONAR complexity of this boolean expression is under control
- (alert.isNotEqualsOperator() && comparison == 0) ||
- (alert.isGreaterOperator() && comparison != 1) ||
- (alert.isSmallerOperator() && comparison != -1) ||
- (alert.isEqualsOperator() && comparison != 0)
- );
+ (alert.isNotEqualsOperator() && comparison == 0)
+ || (alert.isGreaterOperator() && comparison != 1)
+ || (alert.isSmallerOperator() && comparison != -1)
+ || (alert.isEqualsOperator() && comparison != 0));
}
-
private static Comparable<?> getValueForComparison(Metric metric, String value) {
if (metric.getType() == Metric.ValueType.FLOAT ||
- metric.getType() == Metric.ValueType.PERCENT) {
+ metric.getType() == Metric.ValueType.PERCENT) {
return Double.parseDouble(value);
}
if (metric.getType() == Metric.ValueType.INT ||
- metric.getType() == Metric.ValueType.MILLISEC) {
+ metric.getType() == Metric.ValueType.MILLISEC) {
return value.contains(".") ? Integer.parseInt(value.substring(0, value.indexOf('.'))) : Integer.parseInt(value);
}
if (metric.getType() == Metric.ValueType.STRING ||
- metric.getType() == Metric.ValueType.LEVEL) {
+ metric.getType() == Metric.ValueType.LEVEL) {
return value;
}
if (metric.getType() == Metric.ValueType.BOOL) {
@@ -95,15 +93,15 @@ public final class AlertUtils {
private static Comparable<?> getMeasureValue(Metric metric, Measure measure) {
if (metric.getType() == Metric.ValueType.FLOAT ||
- metric.getType() == Metric.ValueType.PERCENT) {
+ metric.getType() == Metric.ValueType.PERCENT) {
return measure.getValue();
}
if (metric.getType() == Metric.ValueType.INT ||
- metric.getType() == Metric.ValueType.MILLISEC) {
+ metric.getType() == Metric.ValueType.MILLISEC) {
return measure.getValue().intValue();
}
if (metric.getType() == Metric.ValueType.STRING ||
- metric.getType() == Metric.ValueType.LEVEL) {
+ metric.getType() == Metric.ValueType.LEVEL) {
return measure.getData();
}
if (metric.getType() == Metric.ValueType.BOOL) {