Skip to content

Commit

Permalink
Remove dead code that was left by jakartaee#639
Browse files Browse the repository at this point in the history
  • Loading branch information
njr-11 committed Apr 4, 2024
1 parent 73b4451 commit f6a32af
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions api/src/main/java/jakarta/data/page/Pagination.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
*/
package jakarta.data.page;


import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;

/**
Expand Down Expand Up @@ -70,20 +66,6 @@ public PageRequest beforeCursor(Cursor cursor) {
return new Pagination(page, size, Mode.CURSOR_PREVIOUS, cursor, requestTotal);
}


private static <E> List<E> combine(List<E> list, E element) {
int size = list.size();
if (size == 0) {
return java.util.List.of(element);
} else {
Object[] array = list.toArray(new Object[size + 1]);
array[size] = element;
@SuppressWarnings("unchecked")
List<E> newList = (List<E>) Collections.unmodifiableList(Arrays.asList(array));
return newList;
}
}

@Override
public Optional<Cursor> cursor() {
return Optional.ofNullable(type);
Expand Down

0 comments on commit f6a32af

Please sign in to comment.