You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by se...@apache.org on 2013/08/16 23:05:00 UTC
svn commit: r1514896 -
/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/ComboStringEditor.java
Author: sebb
Date: Fri Aug 16 21:05:00 2013
New Revision: 1514896
URL: http://svn.apache.org/r1514896
Log:
Don't allow external code to modify the tags array
Modified:
jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/ComboStringEditor.java
Modified: jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/ComboStringEditor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/ComboStringEditor.java?rev=1514896&r1=1514895&r2=1514896&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/ComboStringEditor.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/ComboStringEditor.java Fri Aug 16 21:05:00 2013
@@ -82,7 +82,7 @@ class ComboStringEditor extends Property
ComboStringEditor(String []tags, boolean noEdit, boolean noUndefined) {
// Create the combo box we will use to edit this property:
- this.tags = tags == null ? EMPTY_STRING_ARRAY : tags;
+ this.tags = tags == null ? EMPTY_STRING_ARRAY : tags.clone();
model = new DefaultComboBoxModel();
@@ -90,7 +90,7 @@ class ComboStringEditor extends Property
model.addElement(UNDEFINED);
}
for (String tag : this.tags) {
- model.addElement(tag);
+ model.addElement(tag); // TODO I10N
}
if (!noEdit) {
model.addElement(EDIT);
@@ -211,7 +211,7 @@ class ComboStringEditor extends Property
*/
@Override
public String[] getTags() {
- return tags;
+ return tags.clone();
}
/**