Skip to content

Commit 2397b07

Browse files
committed
More cleanup
1 parent 31d3682 commit 2397b07

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

src/main/java/org/kohsuke/github/GHOrganization.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,6 @@ public PagedIterable<GHEventInfo> listEvents() throws IOException {
598598
* List all the repositories using a default of 30 items page size.
599599
*
600600
* @return the paged iterable
601-
* @deprecated Use #listRepositories().withPageSize() instead.
602601
*/
603602
@Override
604603
public PagedIterable<GHRepository> listRepositories() {

src/main/java/org/kohsuke/github/PagedIterable.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ public abstract class PagedIterable<T> implements Iterable<T> {
3737
* @return the paged iterable
3838
*/
3939
public PagedIterable<T> withPageSize(int size) {
40-
if (size < 0) {
41-
size = 0;
42-
}
4340
this.pageSize = size;
4441
return this;
4542
}

src/test/java/org/kohsuke/github/GHUserTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public void listProjects() throws IOException {
159159
@Test
160160
public void listPublicRepositoriesPageSize62() throws IOException {
161161
GHUser user = gitHub.getUser("kohsuke");
162-
Iterator<GHRepository> itr = user.listRepositories().withPageSize(62).iterator();
162+
Iterator<GHRepository> itr = user.listRepositories(62).iterator();
163163
int i = 0;
164164
for (; i < 115; i++) {
165165
assertThat(itr.hasNext(), is(true));

0 commit comments

Comments
 (0)