Use message in all Assert

This ensures compatibility with Spring 5.

Fixes gh-4193
This commit is contained in:
Rob Winch
2017-01-30 19:58:24 -06:00
parent 4c79107e01
commit 9c03571bbb
25 changed files with 67 additions and 67 deletions

View File

@@ -21,7 +21,7 @@ public class BankServiceImpl implements BankService {
private final BankDao bankDao;
public BankServiceImpl(BankDao bankDao) {
Assert.notNull(bankDao);
Assert.notNull(bankDao, "bankDao cannot be null");
this.bankDao = bankDao;
}
@@ -30,7 +30,7 @@ public class BankServiceImpl implements BankService {
}
public Account post(Account account, double amount) {
Assert.notNull(account);
Assert.notNull(account, "account cannot be null");
// We read account back from DAO so it reflects the latest balance
Account a = bankDao.readAccount(account.getId());