Skip to content

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwiseman committed Sep 14, 2024
1 parent 31d3682 commit 2397b07
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion src/main/java/org/kohsuke/github/GHOrganization.java
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,6 @@ public PagedIterable<GHEventInfo> 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<GHRepository> listRepositories() {
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/org/kohsuke/github/PagedIterable.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ public abstract class PagedIterable<T> implements Iterable<T> {
* @return the paged iterable
*/
public PagedIterable<T> withPageSize(int size) {
if (size < 0) {
size = 0;
}
this.pageSize = size;
return this;
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/kohsuke/github/GHUserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public void listProjects() throws IOException {
@Test
public void listPublicRepositoriesPageSize62() throws IOException {
GHUser user = gitHub.getUser("kohsuke");
Iterator<GHRepository> itr = user.listRepositories().withPageSize(62).iterator();
Iterator<GHRepository> itr = user.listRepositories(62).iterator();
int i = 0;
for (; i < 115; i++) {
assertThat(itr.hasNext(), is(true));
Expand Down

0 comments on commit 2397b07

Please sign in to comment.