DATACMNS-1327 - Prevent int overflow in AbstractPageRequest#getOffset().

Original pull request: #291.
This commit is contained in:
Alex Bondarev
2018-05-21 17:15:10 +03:00
committed by Oliver Gierke
parent 96c5ff87ef
commit b7da49f97a
2 changed files with 11 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ import org.springframework.lang.Nullable;
*
* @author Thomas Darimont
* @author Oliver Gierke
* @author Alex Bondarev
*/
public abstract class AbstractPageRequest implements Pageable, Serializable {
@@ -74,7 +75,7 @@ public abstract class AbstractPageRequest implements Pageable, Serializable {
* @see org.springframework.data.domain.Pageable#getOffset()
*/
public long getOffset() {
return page * size;
return (long) page * (long) size;
}
/*