Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
mjlodge committed Jul 6, 2023
1 parent c30557a commit 00b1d5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/io/diffblue/corebanking/account/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void takeFromBalance(final long amount) throws AccountException {
if (getAccountState() != AccountState.OPEN) {
throw new AccountException("Cannot take from balance, account is closed.");
}
if (currentBalance + amount < 0) {
if (currentBalance - amount < 0) {
throw new AccountException(
"Trying to take "
+ amount
Expand Down Expand Up @@ -208,7 +208,7 @@ public class AccountStatement {
private final List<Transaction> transactions;

/** Constructor. */
private AccountStatement() {
public AccountStatement() {
transactions = new ArrayList<Transaction>();
}

Expand Down

0 comments on commit 00b1d5b

Please sign in to comment.