Skip to content

Commit 00b1d5b

Browse files
committed
Fix bugs
1 parent c30557a commit 00b1d5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/io/diffblue/corebanking/account/Account.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public void takeFromBalance(final long amount) throws AccountException {
9191
if (getAccountState() != AccountState.OPEN) {
9292
throw new AccountException("Cannot take from balance, account is closed.");
9393
}
94-
if (currentBalance + amount < 0) {
94+
if (currentBalance - amount < 0) {
9595
throw new AccountException(
9696
"Trying to take "
9797
+ amount
@@ -208,7 +208,7 @@ public class AccountStatement {
208208
private final List<Transaction> transactions;
209209

210210
/** Constructor. */
211-
private AccountStatement() {
211+
public AccountStatement() {
212212
transactions = new ArrayList<Transaction>();
213213
}
214214

0 commit comments

Comments
 (0)