Skip to content
Snippets Groups Projects
Commit f5209b37 authored by Christian Wulf's avatar Christian Wulf
Browse files

added potential performance improvement

parent cbda876d
No related branches found
No related tags found
No related merge requests found
......@@ -25,17 +25,11 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
<nature>net.sourceforge.pmd.eclipse.plugin.pmdNature</nature>
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
</natures>
</projectDescription>
......@@ -39,6 +39,7 @@ abstract class AbstractRunnableStage implements Runnable {
@Override
public final void run() {
final Stage stage = this.stage; // should prevent the stage to be reloaded after a volatile read
this.logger.debug("Executing runnable stage...");
try {
......@@ -49,7 +50,7 @@ abstract class AbstractRunnableStage implements Runnable {
executeStage();
} while (!stage.shouldBeTerminated());
} catch (StageException e) {
this.stage.terminate();
stage.terminate();
throw e;
} finally {
afterStageExecution();
......@@ -67,7 +68,7 @@ abstract class AbstractRunnableStage implements Runnable {
}
}
logger.debug("Finished runnable stage. (" + this.stage.getId() + ")");
logger.debug("Finished runnable stage. (" + stage.getId() + ")");
}
protected abstract void beforeStageExecution() throws InterruptedException;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment