Skip to content

Remove three checked GitLabApiException #928

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions src/main/java/org/gitlab4j/api/Pager.java
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,8 @@ public void remove() {
* Returns the first page of List. Will rewind the iterator.
*
* @return the first page of List
* @throws GitLabApiException if any error occurs
*/
public List<T> first() throws GitLabApiException {
public List<T> first() {
return (page(1));
}

Expand All @@ -280,19 +279,17 @@ public List<T> last() throws GitLabApiException {
* Returns the previous page of List. Will set the iterator to the previous page.
*
* @return the previous page of List
* @throws GitLabApiException if any error occurs
*/
public List<T> previous() throws GitLabApiException {
public List<T> previous() {
return (page(currentPage - 1));
}

/**
* Returns the current page of List.
*
* @return the current page of List
* @throws GitLabApiException if any error occurs
*/
public List<T> current() throws GitLabApiException {
public List<T> current() {
return (page(currentPage));
}

Expand Down