aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFreddy Mallet <freddy.mallet@gmail.com>2011-07-28 17:20:10 +0200
committerFreddy Mallet <freddy.mallet@gmail.com>2011-07-28 17:20:10 +0200
commit27f631d830974a9744b0dcad632f454ff6f85814 (patch)
treeb098c094d1e59352011f6f1f444be34bebbb8e63
parent5eebafaa38165ad415256c586e31ebe6bb318c4d (diff)
downloadsonarqube-27f631d830974a9744b0dcad632f454ff6f85814.tar.gz
sonarqube-27f631d830974a9744b0dcad632f454ff6f85814.zip
SONAR-2582 The Filter Path field is not working with Oracle DB
-rw-r--r--sonar-server/src/main/java/org/sonar/server/filters/Filter.java6
1 files changed, 4 insertions, 2 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 542a58b6fa7..cc7722acad8 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
@@ -21,6 +21,8 @@ package org.sonar.server.filters;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
+
+import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.sonar.api.resources.Qualifiers;
@@ -67,7 +69,7 @@ public class Filter {
} else {
this.rootSnapshotId = rootSnapshotId;
}
- this.baseSnapshotPath = snapshotPath;
+ this.baseSnapshotPath = StringUtils.defaultString(snapshotPath, ""); //With Oracle the path can be null (see SONAR-2582)
this.isViewContext = isViewContext;
return this;
}
@@ -77,7 +79,7 @@ public class Filter {
}
public boolean hasBaseSnapshot() {
- return rootSnapshotId != null && baseSnapshotId != null && baseSnapshotPath != null;
+ return baseSnapshotId != null;
}
public Integer getBaseSnapshotId() {