From: Simon Brandhof Date: Mon, 2 Mar 2015 12:46:45 +0000 (+0100) Subject: Fix quality flaws X-Git-Tag: 5.1-RC1~43 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3576710090a88ea826bf71313b3a8368c0f740bb;p=sonarqube.git Fix quality flaws --- diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/SubmitReportWsAction.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/SubmitReportWsAction.java index eb3e7d93259..7a7c54d001d 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/SubmitReportWsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/SubmitReportWsAction.java @@ -62,7 +62,7 @@ public class SubmitReportWsAction implements ComputationWsAction, RequestHandler action .createParam(PARAM_REPORT_DATA) - .setRequired(false) + .setRequired(true) .setDescription("Report file. Format is not an API, it changes among SonarQube versions."); } diff --git a/sonar-core/src/test/java/org/sonar/core/component/ComponentDtoTest.java b/sonar-core/src/test/java/org/sonar/core/component/ComponentDtoTest.java index 172164cb1c2..ddc26aaa064 100644 --- a/sonar-core/src/test/java/org/sonar/core/component/ComponentDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/component/ComponentDtoTest.java @@ -73,6 +73,12 @@ public class ComponentDtoTest { assertThat(dto.hashCode()).isNotEqualTo(dtoWithDifferentId.hashCode()); } + @Test + public void toString_does_not_fail_if_empty() throws Exception { + ComponentDto dto = new ComponentDto(); + assertThat(dto.toString()).isNotEmpty(); + } + @Test public void is_root_project() throws Exception { assertThat(new ComponentDto().setModuleUuid("ABCD").isRootProject()).isFalse();