File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/main/java/com/redhat/labs/omp/models Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 27
27
public class PagedResults <T > {
28
28
public static final Logger LOGGER = LoggerFactory .getLogger (PagedResults .class );
29
29
30
- @ Builder .Default private int number = 0 ;
30
+ @ Builder .Default private int number = 1 ;
31
31
@ Builder .Default private int total = 1 ;
32
32
@ Builder .Default private List <T > results = new ArrayList <>();
33
33
34
34
35
35
public boolean hasMore () {
36
- return total > number ;
36
+ return total >= number ;
37
37
}
38
38
39
39
public void update (Response response , GenericType <List <T >> type ) {
40
40
41
- if (number == 0 ) {
41
+ if (number == 1 ) {
42
42
String totalPageString = response .getHeaderString ("X-Total-Pages" );
43
43
total = Integer .valueOf (totalPageString );
44
44
LOGGER .trace ("TOTAL PAGES {}" , total );
You can’t perform that action at this time.
0 commit comments