#1284 Use local variable inference

This commit is contained in:
Pavel Manannikov
2020-11-23 19:42:50 +02:00
parent 2332520d67
commit 97e3a3debc
4 changed files with 15 additions and 15 deletions

View File

@@ -56,7 +56,7 @@ public class BookRepository {
throw new BookNotFoundException("Not found book with id: " + book.getId());
}
Book latestBook = collection.get(book.getId());
var latestBook = collection.get(book.getId());
if (book.getVersion() != latestBook.getVersion()) {
throw new VersionMismatchException(
"Tried to update stale version " + book.getVersion()