Commit 5a69cc16 authored by Kristof Szabados's avatar Kristof Szabados
Browse files

AtomicBoolean can do the job we did with our own MyBoolean implementation, so...


AtomicBoolean can do the job we did with our own MyBoolean implementation, so lets just use the built-in version
Signed-off-by: Kristof Szabados's avatarkristof <Kristof.Szabados@ericsson.com>
parent baf00736
/******************************************************************************
* Copyright (c) 2000-2017 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
package org.eclipse.titan.executor.executors.single;
/**
* Our internal Boolean implementation, where the internal value can be changed.
*
* @author Kristof Szabados
* */
public final class MyBoolean {
private boolean value;
public MyBoolean(final boolean value) {
this.value = value;
}
public boolean getValue() {
return value;
}
public void setValue(final boolean value) {
this.value = value;
}
}
......@@ -16,6 +16,7 @@ import java.util.Date;
import java.util.Formatter;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -133,7 +134,7 @@ public final class SingleExecutor extends BaseExecutor {
lastTimeSelectionTime = 1;
lastTimeSelectionType = ExecutableType.CONFIGURATIONFILE;
} else {
final MyBoolean temp = new MyBoolean(true);
final AtomicBoolean temp = new AtomicBoolean(true);
Display.getDefault().syncExec(new Runnable() {
@Override
......@@ -146,7 +147,7 @@ public final class SingleExecutor extends BaseExecutor {
dialog.setSelection(lastTimeSelection, lastTimeSelectionTime, lastTimeSelectionType);
if (dialog.open() != Window.OK) {
temp.setValue(false);
temp.set(false);
return;
}
......@@ -156,7 +157,7 @@ public final class SingleExecutor extends BaseExecutor {
}
});
if (!temp.getValue()) {
if (!temp.get()) {
executionStarted = false;
terminate(true);
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment