Skip to content

Commit

Permalink
put this comment down
Browse files Browse the repository at this point in the history
  • Loading branch information
Treetrain1 committed Sep 16, 2023
1 parent 187da88 commit ed942f8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public interface StorageInteraction<T> {

default long moveResources(Storage<T> storage, T resource, long maxAmount, TransactionContext transaction, boolean simulate) {
if (simulate) {
// closes this automatically
// check functionality of AutoCloseable class
try (Transaction simulateTransaction = Transaction.openNested(transaction)) {
return moveResources(storage, resource, maxAmount, simulateTransaction);
}
Expand Down

0 comments on commit ed942f8

Please sign in to comment.