Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/command/RepeatingCommandWrapper.java')
-rw-r--r--common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/command/RepeatingCommandWrapper.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/command/RepeatingCommandWrapper.java b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/command/RepeatingCommandWrapper.java
index 6ddc8feb73..48441b4659 100644
--- a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/command/RepeatingCommandWrapper.java
+++ b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/command/RepeatingCommandWrapper.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 Oracle. All rights reserved.
+ * Copyright (c) 2012, 2016 Oracle. 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.
@@ -64,7 +64,7 @@ public class RepeatingCommandWrapper
* starting with the initial invocation. The list is cleared with each
* initial invocation of the command.
*/
- private final ArrayList<StackTrace> stackTraces = DEBUG ? new ArrayList<StackTrace>() : null;
+ private final ArrayList<StackTrace> stackTraces = DEBUG ? new ArrayList<>() : null;
// see RepeatingCommandWrapperTests.testDEBUG()
private static final boolean DEBUG = false;
@@ -163,13 +163,11 @@ public class RepeatingCommandWrapper
* causing the command to execute again.
*/
/* CU private */ void execute_() {
- if (this.state.wasStoppedBeforeFirstExecutionCouldStart()) {
- return;
+ if ( ! this.state.wasStoppedBeforeFirstExecutionCouldStart()) {
+ do {
+ this.executeCommand();
+ } while (this.state.isRepeat());
}
-
- do {
- this.executeCommand();
- } while (this.state.isRepeat());
}
/**

Back to the top