diff --git a/.gitignore b/.gitignore
index b76a5ce..425b735 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
.settings
.project
.classpath
+.idea
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 043ecab..d053627 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
UTF-8
1.8
1.8
- 14.0.5
+ 14.0.8
${project.version}
diff --git a/src/main/java/org/vaadin/artur/spring/dataprovider/PageableDataProvider.java b/src/main/java/org/vaadin/artur/spring/dataprovider/PageableDataProvider.java
index e8d6301..1143c9c 100644
--- a/src/main/java/org/vaadin/artur/spring/dataprovider/PageableDataProvider.java
+++ b/src/main/java/org/vaadin/artur/spring/dataprovider/PageableDataProvider.java
@@ -33,8 +33,7 @@ protected abstract Page fetchFromBackEnd(Query query,
private Pageable getPageable(Query q) {
Pair pageSizeAndNumber = limitAndOffsetToPageSizeAndNumber(
q.getOffset(), q.getLimit());
- return new PageRequest(pageSizeAndNumber.getSecond(),
- pageSizeAndNumber.getFirst(), createSpringSort(q));
+ return PageRequest.of(pageSizeAndNumber.getSecond(), pageSizeAndNumber.getFirst(), createSpringSort(q));
}
private Sort createSpringSort(Query q) {
@@ -50,7 +49,7 @@ private Sort createSpringSort(Query q) {
if (orders.isEmpty()) {
return Sort.unsorted();
} else {
- return new Sort(orders);
+ return Sort.by(orders);
}
}