From a136fd0d099e4a90d8cd28a294bd4f15ccabeb47 Mon Sep 17 00:00:00 2001 From: luvarqpp Date: Wed, 29 Mar 2023 17:09:08 +0200 Subject: [PATCH] Remove three checked GitLabApiException (#928) 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. --- src/main/java/org/gitlab4j/api/Pager.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/gitlab4j/api/Pager.java b/src/main/java/org/gitlab4j/api/Pager.java index ac00e871..30164de5 100644 --- a/src/main/java/org/gitlab4j/api/Pager.java +++ b/src/main/java/org/gitlab4j/api/Pager.java @@ -255,9 +255,8 @@ public class Pager implements Iterator>, Constants { * Returns the first page of List. Will rewind the iterator. * * @return the first page of List - * @throws GitLabApiException if any error occurs */ - public List first() throws GitLabApiException { + public List first() { return (page(1)); } @@ -280,9 +279,8 @@ public class Pager implements Iterator>, Constants { * 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 previous() throws GitLabApiException { + public List previous() { return (page(currentPage - 1)); } @@ -290,9 +288,8 @@ public class Pager implements Iterator>, Constants { * Returns the current page of List. * * @return the current page of List - * @throws GitLabApiException if any error occurs */ - public List current() throws GitLabApiException { + public List current() { return (page(currentPage)); } -- GitLab