]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10040 add length validation to Branches ws
authorGuillaume Jambet <guillaume.jambet@sonarsource.com>
Thu, 2 Nov 2017 14:33:50 +0000 (15:33 +0100)
committerGuillaume Jambet <guillaume.jambet@gmail.com>
Wed, 8 Nov 2017 12:51:31 +0000 (13:51 +0100)
server/sonar-server/src/main/java/org/sonar/server/branch/ws/RenameAction.java

index 9e4c6fb65611dcfdd16ed81543f6a6bf275fcc22..a12cd80b10a4530d78f51faa692f3afc3bd3792f 100644 (file)
@@ -61,9 +61,10 @@ public class RenameAction implements BranchWsAction {
     addProjectParam(action);
     action
       .createParam(PARAM_NAME)
+      .setRequired(true)
+      .setMaximumLength(255)
       .setDescription("New name of the main branch")
-      .setExampleValue("branch1")
-      .setRequired(true);
+      .setExampleValue("branch1");
   }
 
   @Override