Skip to content

Commit 6a97e64

Browse files
authored
Merge pull request #845 from MarcMil/extensible
ReusableExecutor: add missing finally block
2 parents e68d4b3 + 02447fc commit 6a97e64

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

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)