]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaws
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 2 Mar 2015 12:46:45 +0000 (13:46 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 2 Mar 2015 12:46:45 +0000 (13:46 +0100)
server/sonar-server/src/main/java/org/sonar/server/computation/ws/SubmitReportWsAction.java
sonar-core/src/test/java/org/sonar/core/component/ComponentDtoTest.java

index eb3e7d93259ea501f2ac5911896bcf3d258fe62c..7a7c54d001d94cf016c1214d1b6fec642923966e 100644 (file)
@@ -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.");
   }
 
index 172164cb1c2e5978f904d9159e0a1ecdb386774c..ddc26aaa064464d5e2851ab37f174048aff97243 100644 (file)
@@ -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();