final JCloudsComputer c = (JCloudsComputer) build.getExecutor().getOwner();
return new Environment() {</BUG>
@Override
public boolean tearDown(AbstractBuild build, final BuildListener listener) throws IOException, InterruptedException {
<BUG>c.setPendingDelete(true);
return true;</BUG>
}
};
} else {
return new Environment() {

public JCloudsOneOffSlave() {
}
@Override
@SuppressWarnings("rawtypes")
public Environment setUp(AbstractBuild build, Launcher launcher, final BuildListener listener) {
final Computer c = build.getExecutor().getOwner();
if (c instanceof JCloudsComputer) {
return new Environment() {
@Override
public boolean tearDown(AbstractBuild build, final BuildListener listener) throws IOException, InterruptedException {
((JCloudsComputer) c).setPendingDelete(true);
return true;
}
