Skip to content

Commit 02447fc

Browse files
committed
ReusableExecutor: add missing finally block
1 parent 3c809e6 commit 02447fc

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

soot-infoflow/src/soot/jimple/infoflow/util/ReusableExecutor.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,14 @@ public void execute(Runnable command) {
3535

3636
@Override
3737
public void run() {
38-
command.run();
39-
int c = counter.decrementAndGet();
40-
if (c == 0) {
41-
synchronized (obj) {
42-
obj.notify();
38+
try {
39+
command.run();
40+
} finally {
41+
int c = counter.decrementAndGet();
42+
if (c == 0) {
43+
synchronized (obj) {
44+
obj.notify();
45+
}
4346
}
4447
}
4548
}

0 commit comments

Comments
 (0)