Skip to content

Commit a136fd0

Browse files
authoredMar 29, 2023
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.
1 parent 2483e64 commit a136fd0

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed
 

‎src/main/java/org/gitlab4j/api/Pager.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,8 @@ public void remove() {
255255
* Returns the first page of List. Will rewind the iterator.
256256
*
257257
* @return the first page of List
258-
* @throws GitLabApiException if any error occurs
259258
*/
260-
public List<T> first() throws GitLabApiException {
259+
public List<T> first() {
261260
return (page(1));
262261
}
263262

@@ -280,19 +279,17 @@ public List<T> last() throws GitLabApiException {
280279
* Returns the previous page of List. Will set the iterator to the previous page.
281280
*
282281
* @return the previous page of List
283-
* @throws GitLabApiException if any error occurs
284282
*/
285-
public List<T> previous() throws GitLabApiException {
283+
public List<T> previous() {
286284
return (page(currentPage - 1));
287285
}
288286

289287
/**
290288
* Returns the current page of List.
291289
*
292290
* @return the current page of List
293-
* @throws GitLabApiException if any error occurs
294291
*/
295-
public List<T> current() throws GitLabApiException {
292+
public List<T> current() {
296293
return (page(currentPage));
297294
}
298295

0 commit comments

Comments
 (0)
Please sign in to comment.