may as well use final

This commit is contained in:
Simon Massey 2018-10-30 23:06:12 +00:00
parent 9663cc09a1
commit 5d4d8ff977
1 changed files with 2 additions and 2 deletions

View File

@ -26,8 +26,8 @@ public class BookController {
@RequestMapping(value = "/listBooks", method = RequestMethod.GET)
public String listBooks(Model model, @RequestParam("page") Optional<Integer> page, @RequestParam("size") Optional<Integer> size) {
int currentPage = page.orElse(1);
int pageSize = size.orElse(5);
final int currentPage = page.orElse(1);
final int pageSize = size.orElse(5);
Page<Book> bookPage = bookService.findPaginated(PageRequest.of(currentPage - 1, pageSize));