diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-12-07 15:07:30 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-12-07 18:02:35 +0100 |
commit | 5d9f474688e0015733b14044df6e5e6cb1e1633c (patch) | |
tree | 4e8952d81decd2947d0a5896ada586192cedf8ec | |
parent | 5aeeedbda63c17fefc7bba99dbf8c718c7bbbd17 (diff) | |
download | sonarqube-5d9f474688e0015733b14044df6e5e6cb1e1633c.tar.gz sonarqube-5d9f474688e0015733b14044df6e5e6cb1e1633c.zip |
Use constant for page size parameter in WS api/rules/repositories
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/rule/ws/RepositoriesAction.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/ws/RepositoriesAction.java b/server/sonar-server/src/main/java/org/sonar/server/rule/ws/RepositoriesAction.java index b5487e57c49..507e99ff37c 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/ws/RepositoriesAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/rule/ws/RepositoriesAction.java @@ -64,7 +64,7 @@ public class RepositoriesAction implements RulesWsAction { action.createParam(LANGUAGE) .setDescription("A language key; if provided, only repositories for the given language will be returned") .setExampleValue("java"); - action.createParam("ps") + action.createParam(Param.PAGE_SIZE) .setDescription("The size of the list to return, 0 for all repositories") .setExampleValue("25") .setDefaultValue("0"); @@ -74,7 +74,7 @@ public class RepositoriesAction implements RulesWsAction { public void handle(Request request, Response response) throws Exception { String query = request.param(Param.TEXT_QUERY); String languageKey = request.param(LANGUAGE); - int pageSize = request.mandatoryParamAsInt("ps"); + int pageSize = request.mandatoryParamAsInt(Param.PAGE_SIZE); JsonWriter json = response.newJsonWriter().beginObject().name("repositories").beginArray(); for (Repo repo : listMatchingRepositories(query, languageKey, pageSize)) { |