Skip to content

Commit

Permalink
Remove three checked GitLabApiException (gitlab4j#928)
Browse files Browse the repository at this point in the history
There was not chance of throwing checked exception GitLabApiException  from given three methods. I have removed them to make user code using given methods easier to read.
  • Loading branch information
luvarqpp authored Mar 29, 2023
1 parent 2483e64 commit a136fd0
Showing 1 changed file with 3 additions and 6 deletions.
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

0 comments on commit a136fd0

Please sign in to comment.