Minor refactorings and code style changes (#807)
* Made minor changes in some patterns such as removed throws clause where not needed, changed incorrect order of arguments in assertEquals * Minor refactorings and code style changes. 1) Removed several use of raw types 2) Removed unnecessary throws clauses 3) Used lambda expressions wherever applicable 4) Used apt assertion methods for readability 5) Use of try with resources wherever applicable 6) Corrected incorrect order of assertXXX arguments * Removed unused import from Promise * Addressed review comments * Addressed checkstyle issue
This commit is contained in:
@ -74,7 +74,7 @@ public class App {
|
||||
LOGGER.info("Running the system first time............");
|
||||
eventProcessor.reset();
|
||||
|
||||
LOGGER.info("Creating th accounts............");
|
||||
LOGGER.info("Creating the accounts............");
|
||||
|
||||
eventProcessor.process(new AccountCreateEvent(
|
||||
0, new Date().getTime(), ACCOUNT_OF_DAENERYS, "Daenerys Targaryen"));
|
||||
@ -98,7 +98,7 @@ public class App {
|
||||
LOGGER.info(AccountAggregate.getAccount(ACCOUNT_OF_DAENERYS).toString());
|
||||
LOGGER.info(AccountAggregate.getAccount(ACCOUNT_OF_JON).toString());
|
||||
|
||||
LOGGER.info("At that point system had a shot down, state in memory is cleared............");
|
||||
LOGGER.info("At that point system had a shut down, state in memory is cleared............");
|
||||
AccountAggregate.resetState();
|
||||
|
||||
LOGGER.info("Recover the system by the events in journal file............");
|
||||
|
@ -92,7 +92,7 @@ public class MoneyTransferEvent extends DomainEvent {
|
||||
}
|
||||
Account accountTo = AccountAggregate.getAccount(accountNoTo);
|
||||
if (accountTo == null) {
|
||||
throw new RuntimeException("Account not found" + accountTo);
|
||||
throw new RuntimeException("Account not found " + accountNoTo);
|
||||
}
|
||||
|
||||
accountFrom.handleTransferFromEvent(this);
|
||||
|
Reference in New Issue
Block a user