Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZeb Ford-Reitz2012-04-17 09:01:41 +0000
committerZeb Ford-Reitz2012-04-17 09:01:41 +0000
commitbf8d658405c82c33c9b781a05401891dc5962397 (patch)
tree17de347b618fdf920612c36b41479c7e230b7ddb
parent7d775e1556246e770da8fc9ea835ad3d6d15894e (diff)
downloadorg.eclipse.jubula.core-bf8d658405c82c33c9b781a05401891dc5962397.tar.gz
org.eclipse.jubula.core-bf8d658405c82c33c9b781a05401891dc5962397.tar.xz
org.eclipse.jubula.core-bf8d658405c82c33c9b781a05401891dc5962397.zip
fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=375632
-rw-r--r--org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/utils/RefToken.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/utils/RefToken.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/utils/RefToken.java
index 8dab6bd94..8c36f3e54 100644
--- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/utils/RefToken.java
+++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/utils/RefToken.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.jubula.client.core.utils;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.ListIterator;
@@ -329,8 +330,15 @@ public class RefToken extends AbstractParamValueToken {
ParamValueConverter conv = new ModelParamValueConverter(
data.getValue(locale),
execNode, locale, getParamDescription());
- stack.remove(stack.size() - 1);
- return conv.getExecutionString(stack, locale);
+
+ // Look for the reference value further up (or down,
+ // actually) the execution stack. We initialize a new
+ // list here in order to avoid modifying the provided
+ // list, which was the cause of bug 375632.
+ List<ExecObject> reducedStack =
+ new ArrayList<ExecObject>(stack);
+ reducedStack.remove(reducedStack.size() - 1);
+ return conv.getExecutionString(reducedStack, locale);
}
}
}

Back to the top