Author: sebb
Date: Fri Aug 21 23:40:27 2009
New Revision: 806760
URL: http://svn.apache.org/viewvc?rev=806760&view=rev
Log:
Generics tweak
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java?rev=806760&r1=806759&r2=806760&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
(original)
+++
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
Fri Aug 21 23:40:27 2009
@@ -383,8 +383,8 @@
public synchronized void deliverSampler(HTTPSamplerBase sampler,
TestElement[] subConfigs, SampleResult result) {
if (filterContentType(result) && filterUrl(sampler)) {
JMeterTreeNode myTarget = findTargetControllerNode();
- Collection defaultConfigurations =
findApplicableElements(myTarget, ConfigTestElement.class, false);
- Collection userDefinedVariables = findApplicableElements(myTarget,
Arguments.class, true);
+ Collection<ConfigTestElement> defaultConfigurations =
(Collection<ConfigTestElement>) findApplicableElements(myTarget,
ConfigTestElement.class, false);
+ Collection<Arguments> userDefinedVariables =
(Collection<Arguments>) findApplicableElements(myTarget, Arguments.class, true);
removeValuesFromSampler(sampler, defaultConfigurations);
replaceValues(sampler, subConfigs, userDefinedVariables);
@@ -668,7 +668,8 @@
*
* @return a collection of applicable objects of the given class.
*/
- private Collection<TestElement> findApplicableElements(JMeterTreeNode
myTarget, Class<?> myClass, boolean ascending) {
+ // TODO - could be converted to generic class?
+ private Collection<?> findApplicableElements(JMeterTreeNode myTarget,
Class<? extends TestElement> myClass, boolean ascending) {
JMeterTreeModel treeModel = GuiPackage.getInstance().getTreeModel();
LinkedList<TestElement> elements = new LinkedList<TestElement>();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]