Skip to content

Commit

Permalink
3.0.20 - Further fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
saw303 committed Sep 1, 2023
1 parent a648c1e commit 1181e73
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {

subprojects { subproject ->

version = "3.0.19"
version = "3.0.20"

apply plugin: 'com.github.ben-manes.versions'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class RestApiPlugin implements Plugin<Project> {

project.configurations.maybeCreate(CONFIGURATION_REST_API)

final String pluginVersion = "3.0.19"
final String pluginVersion = "3.0.20"
final String libPhoneNumberVersion = "8.11.5"

final List<String> deps = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,24 @@ public class PaginationModel implements Serializable {
private int totalPages;

public PaginationModel(Slice slice) {
this.size = slice.getSize();
this.page = slice.getPageNumber();

if (slice == null) {
this.size = 0;
this.page = 0;
} else {
this.size = slice.getSize();
this.page = slice.getPageNumber();
}
this.totalPages = -1;
this.totalSize = -1;
}

public PaginationModel(Page page) {
this((Slice) page);
this.totalPages = page.getTotalPages();
this.totalSize = page.getTotalSize();
if (page != null) {
this.totalPages = page.getTotalPages();
this.totalSize = page.getTotalSize();
}
}

// Used for Jackson deserialization
Expand Down

0 comments on commit 1181e73

Please sign in to comment.