From 3576710090a88ea826bf71313b3a8368c0f740bb Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 2 Mar 2015 13:46:45 +0100 Subject: [PATCH] Fix quality flaws --- .../sonar/server/computation/ws/SubmitReportWsAction.java | 2 +- .../java/org/sonar/core/component/ComponentDtoTest.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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(); -- 2.39.5