summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-12-16 14:31:52 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-12-16 14:31:52 +0000
commitca75da099a891bdc4fd4e2249deaedb0da2effc8 (patch)
tree78f94d574b301ff3c140e9a44b78aa11a0d1d117
parent7c1d536c85034cd4aa4ff6055cb794c0fdd328a1 (diff)
downloadsonarqube-ca75da099a891bdc4fd4e2249deaedb0da2effc8.tar.gz
sonarqube-ca75da099a891bdc4fd4e2249deaedb0da2effc8.zip
fix filter criteria on variation
-rw-r--r--sonar-server/src/main/java/org/sonar/server/filters/Filter.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/sonar-server/src/main/java/org/sonar/server/filters/Filter.java b/sonar-server/src/main/java/org/sonar/server/filters/Filter.java
index 69e2acafe9e..9a708a727f6 100644
--- a/sonar-server/src/main/java/org/sonar/server/filters/Filter.java
+++ b/sonar-server/src/main/java/org/sonar/server/filters/Filter.java
@@ -51,7 +51,7 @@ public class Filter {
// sorting
private Integer sortedMetricId;
- private boolean sortedByMeasureVariation = false;
+ private Boolean sortedByMeasureVariation = Boolean.FALSE;
private boolean sortedByLanguage;
private boolean sortedByName;
private boolean sortedByDate;
@@ -181,7 +181,7 @@ public class Filter {
return setSortedMetricId(id, true, false);
}
- public Filter setSortedMetricId(Integer id, boolean isNumericValue, boolean isVariation) {
+ public Filter setSortedMetricId(Integer id, boolean isNumericValue, Boolean isVariation) {
unsetSorts();
this.sortedMetricId = id;
this.useMeasureValueToSort = isNumericValue;
@@ -333,10 +333,6 @@ public class Filter {
return periodIndex>0;
}
- public void setSortedByMeasureVariation(boolean b) {
- this.sortedByMeasureVariation = b;
- }
-
static String getVariationColumn(int periodIndex) {
switch (periodIndex) {
case 1:
@@ -356,7 +352,7 @@ public class Filter {
String getColumnToSort() {
String col = "text_value";
if (useMeasureValueToSort()) {
- col = (sortedByMeasureVariation ? getVariationColumn (periodIndex) : "value");
+ col = (sortedByMeasureVariation==Boolean.TRUE ? getVariationColumn (periodIndex) : "value");
}
return col;
}