Author: sebb
Date: Fri Sep 19 19:39:47 2008
New Revision: 697316
URL: http://svn.apache.org/viewvc?rev=697316&view=rev
Log:
Oops - HashTree#clone() is used by the IncludeController
Added Cloneable, and made the map final
Modified:
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/collections/HashTree.java
Modified:
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/collections/HashTree.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/collections/HashTree.java?rev=697316&r1=697315&r2=697316&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/collections/HashTree.java
(original)
+++
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/collections/HashTree.java
Fri Sep 19 19:39:47 2008
@@ -48,7 +48,7 @@
* @see HashTreeTraverser
* @see SearchByClass
*/
-public class HashTree implements Serializable, Map {
+public class HashTree implements Serializable, Map, Cloneable {
// GetLoggerForClass() uses ClassContext, which
// causes a Security violation in RemoteJMeterImpl
// Currently log is only used by test code, so moved there.
@@ -59,6 +59,8 @@
// Used for the RuntimeException to short-circuit the traversal
private static final String FOUND = "found"; // $NON-NLS-1$
+ protected final Map data;
+
/**
* Creates an empty new HashTree.
*/
@@ -252,7 +254,7 @@
}
/**
- * Sets a key and it's values in the HashTree. It sets up a key in the
+ * Sets a key and its values in the HashTree. It sets up a key in the
* current node, and then creates a node for that key, and sets all the
* values in the array as keys in the new node. Any keys previously held
* under the given key are lost.
@@ -598,7 +600,7 @@
* contents of the tree are not cloned).
*
*/
- private HashTree localclone() {
+ public Object clone() {
HashTree newTree = new HashTree();
cloneTree(newTree);
return newTree;
@@ -608,7 +610,7 @@
Iterator iter = list().iterator();
while (iter.hasNext()) {
Object key = iter.next();
- newTree.set(key, getTree(key).localclone());
+ newTree.set(key, (HashTree) getTree(key).clone());
}
}
@@ -985,8 +987,6 @@
return converter.toString();
}
- protected Map data;
-
private static class TreeSearcher implements HashTreeTraverser {
Object target;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]