From 6dd99e0c6f2a431a38e9284e9cfc2a9c53c21d7f Mon Sep 17 00:00:00 2001 From: Eric Hartmann Date: Fri, 29 Dec 2017 09:51:15 +0100 Subject: Upgrade to version 6.7.2-SNAPSHOT --- server/pom.xml | 2 +- server/sonar-ce/pom.xml | 2 +- server/sonar-db-core/pom.xml | 2 +- server/sonar-db-dao/pom.xml | 2 +- server/sonar-db-migration/pom.xml | 2 +- server/sonar-db-testing/pom.xml | 2 +- server/sonar-main/pom.xml | 2 +- server/sonar-plugin-bridge/pom.xml | 2 +- server/sonar-process/pom.xml | 2 +- server/sonar-server/pom.xml | 2 +- server/sonar-web/pom.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) (limited to 'server') diff --git a/server/pom.xml b/server/pom.xml index b0090fe4445..0585d1dfe6e 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -6,7 +6,7 @@ org.sonarsource.sonarqube sonarqube - 6.7.1 + 6.7.2-SNAPSHOT server pom diff --git a/server/sonar-ce/pom.xml b/server/sonar-ce/pom.xml index 0c91a416fed..073f8fc7bce 100644 --- a/server/sonar-ce/pom.xml +++ b/server/sonar-ce/pom.xml @@ -4,7 +4,7 @@ org.sonarsource.sonarqube server - 6.7.1 + 6.7.2-SNAPSHOT .. sonar-ce diff --git a/server/sonar-db-core/pom.xml b/server/sonar-db-core/pom.xml index 4737d1a5c83..1f58e9342b3 100644 --- a/server/sonar-db-core/pom.xml +++ b/server/sonar-db-core/pom.xml @@ -5,7 +5,7 @@ org.sonarsource.sonarqube server - 6.7.1 + 6.7.2-SNAPSHOT sonar-db-core diff --git a/server/sonar-db-dao/pom.xml b/server/sonar-db-dao/pom.xml index 90fcb37d2f8..7ecbd785c34 100644 --- a/server/sonar-db-dao/pom.xml +++ b/server/sonar-db-dao/pom.xml @@ -5,7 +5,7 @@ org.sonarsource.sonarqube server - 6.7.1 + 6.7.2-SNAPSHOT sonar-db-dao diff --git a/server/sonar-db-migration/pom.xml b/server/sonar-db-migration/pom.xml index 06a60f1dfb8..406378bfad2 100644 --- a/server/sonar-db-migration/pom.xml +++ b/server/sonar-db-migration/pom.xml @@ -5,7 +5,7 @@ org.sonarsource.sonarqube server - 6.7.1 + 6.7.2-SNAPSHOT sonar-db-migration diff --git a/server/sonar-db-testing/pom.xml b/server/sonar-db-testing/pom.xml index 18181764baf..eb62e164c9f 100644 --- a/server/sonar-db-testing/pom.xml +++ b/server/sonar-db-testing/pom.xml @@ -5,7 +5,7 @@ org.sonarsource.sonarqube server - 6.7.1 + 6.7.2-SNAPSHOT sonar-db-testing diff --git a/server/sonar-main/pom.xml b/server/sonar-main/pom.xml index d236f2ea331..459729150b3 100644 --- a/server/sonar-main/pom.xml +++ b/server/sonar-main/pom.xml @@ -6,7 +6,7 @@ org.sonarsource.sonarqube server - 6.7.1 + 6.7.2-SNAPSHOT ../ diff --git a/server/sonar-plugin-bridge/pom.xml b/server/sonar-plugin-bridge/pom.xml index 837efeb0112..afb209b2a81 100644 --- a/server/sonar-plugin-bridge/pom.xml +++ b/server/sonar-plugin-bridge/pom.xml @@ -4,7 +4,7 @@ org.sonarsource.sonarqube server - 6.7.1 + 6.7.2-SNAPSHOT .. sonar-plugin-bridge diff --git a/server/sonar-process/pom.xml b/server/sonar-process/pom.xml index b777c5c7f85..9f1c2fe435b 100644 --- a/server/sonar-process/pom.xml +++ b/server/sonar-process/pom.xml @@ -4,7 +4,7 @@ org.sonarsource.sonarqube server - 6.7.1 + 6.7.2-SNAPSHOT ../ diff --git a/server/sonar-server/pom.xml b/server/sonar-server/pom.xml index eb9e4acf4d2..d57fc68bb12 100644 --- a/server/sonar-server/pom.xml +++ b/server/sonar-server/pom.xml @@ -6,7 +6,7 @@ org.sonarsource.sonarqube server - 6.7.1 + 6.7.2-SNAPSHOT .. sonar-server diff --git a/server/sonar-web/pom.xml b/server/sonar-web/pom.xml index 3735a07a356..448de0ed51f 100644 --- a/server/sonar-web/pom.xml +++ b/server/sonar-web/pom.xml @@ -4,7 +4,7 @@ org.sonarsource.sonarqube server - 6.7.1 + 6.7.2-SNAPSHOT .. sonar-web -- cgit v1.2.3 From 652bcc1cd8f6cb2d6281694a74300ef3b24fbc11 Mon Sep 17 00:00:00 2001 From: Eric Hartmann Date: Fri, 29 Dec 2017 10:16:55 +0100 Subject: SONAR-10217 Fix 500 error when branch is incorrect --- .../main/java/org/sonar/server/issue/IssueQueryFactory.java | 2 +- .../java/org/sonar/server/issue/ws/SearchActionTest.java | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'server') diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueQueryFactory.java b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueQueryFactory.java index 63974471ac0..1c1c8024b48 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueQueryFactory.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueQueryFactory.java @@ -394,6 +394,6 @@ public class IssueQueryFactory { private static void setBranch(IssueQuery.Builder builder, ComponentDto component, @Nullable String branch) { builder.branchUuid(branch == null ? null : component.projectUuid()); - builder.mainBranch(branch == null || !branch.equals(component.getBranch())); + builder.mainBranch(branch == null || component.equals(UNKNOWN_COMPONENT) || !branch.equals(component.getBranch())); } } diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTest.java index c8e3753999c..591b68c2886 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTest.java @@ -151,6 +151,19 @@ public class SearchActionTest { "Portfolios are not supported. If this parameter is set, 'projects' must not be set."); } + //SONAR-10217 + @Test + public void empty_search_with_unknown_branch() throws Exception { + TestResponse result = ws.newRequest() + .setParam("onComponentOnly", "true") + .setParam("componentKeys", "foo") + .setParam("branch", "bar") + .execute(); + + assertThat(result).isNotNull(); + result.assertJson(this.getClass(), "empty_result.json"); + } + @Test public void empty_search() throws Exception { TestResponse result = ws.newRequest() -- cgit v1.2.3