diff --git a/src/main/java/org/kohsuke/github/GHOrganization.java b/src/main/java/org/kohsuke/github/GHOrganization.java index 2ea7ef22d2..3f3d3b97d9 100644 --- a/src/main/java/org/kohsuke/github/GHOrganization.java +++ b/src/main/java/org/kohsuke/github/GHOrganization.java @@ -598,7 +598,6 @@ public PagedIterable listEvents() throws IOException { * List all the repositories using a default of 30 items page size. * * @return the paged iterable - * @deprecated Use #listRepositories().withPageSize() instead. */ @Override public PagedIterable listRepositories() { diff --git a/src/main/java/org/kohsuke/github/PagedIterable.java b/src/main/java/org/kohsuke/github/PagedIterable.java index ac332a89fd..a92d0ef693 100644 --- a/src/main/java/org/kohsuke/github/PagedIterable.java +++ b/src/main/java/org/kohsuke/github/PagedIterable.java @@ -37,9 +37,6 @@ public abstract class PagedIterable implements Iterable { * @return the paged iterable */ public PagedIterable withPageSize(int size) { - if (size < 0) { - size = 0; - } this.pageSize = size; return this; } diff --git a/src/test/java/org/kohsuke/github/GHUserTest.java b/src/test/java/org/kohsuke/github/GHUserTest.java index 5e67bf6451..952309a23e 100644 --- a/src/test/java/org/kohsuke/github/GHUserTest.java +++ b/src/test/java/org/kohsuke/github/GHUserTest.java @@ -159,7 +159,7 @@ public void listProjects() throws IOException { @Test public void listPublicRepositoriesPageSize62() throws IOException { GHUser user = gitHub.getUser("kohsuke"); - Iterator itr = user.listRepositories().withPageSize(62).iterator(); + Iterator itr = user.listRepositories(62).iterator(); int i = 0; for (; i < 115; i++) { assertThat(itr.hasNext(), is(true));