Skip to content

Commit

Permalink
[hotfix] [tests] Small simplification in 'CheckedThread'.
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanEwen committed Jan 24, 2018
1 parent 1c9c1e3 commit 6e894ee
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ public abstract class CheckedThread extends Thread {
/** The error thrown from the main work method. */
private volatile Throwable error;

private volatile boolean finished = false;

// ------------------------------------------------------------------------

/**
Expand Down Expand Up @@ -78,9 +76,6 @@ public final void run() {
catch (Throwable t) {
error = t;
}
finally {
finished = true;
}
}

/**
Expand Down Expand Up @@ -123,7 +118,7 @@ else if (error instanceof Exception) {
}

private void checkFinished() throws Exception {
if (!finished) {
if (getState() != State.TERMINATED) {
throw new Exception(String.format(
"%s[name = %s] has not finished!",
this.getClass().getSimpleName(),
Expand Down

0 comments on commit 6e894ee

Please sign in to comment.