()
| 19 | } |
| 20 | |
| 21 | public void run() { |
| 22 | completionLock.lock(); |
| 23 | int[] operations = AssortedMethods.randomArray(20, -50, 50); |
| 24 | for (int op : operations) { |
| 25 | delta += op; |
| 26 | if (op < 0) { |
| 27 | int val = op * -1; |
| 28 | noLockATM.withdraw(val); |
| 29 | lockedATM.withdraw(val); |
| 30 | } else { |
| 31 | noLockATM.deposit(op); |
| 32 | lockedATM.deposit(op); |
| 33 | } |
| 34 | } |
| 35 | completionLock.unlock(); |
| 36 | } |
| 37 | |
| 38 | public void waitUntilDone() { |
| 39 | completionLock.lock(); |
nothing calls this directly
no test coverage detected