You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2008/01/03 16:06:14 UTC

svn commit: r608516 - /jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/ThreadNumber.java

Author: sebb
Date: Thu Jan  3 07:06:13 2008
New Revision: 608516

URL: http://svn.apache.org/viewvc?rev=608516&view=rev
Log:
Extend AbstractFunction; add parameter check.

Modified:
    jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/ThreadNumber.java

Modified: jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/ThreadNumber.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/ThreadNumber.java?rev=608516&r1=608515&r2=608516&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/ThreadNumber.java (original)
+++ jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/ThreadNumber.java Thu Jan  3 07:06:13 2008
@@ -18,7 +18,6 @@
 
 package org.apache.jmeter.functions;
 
-import java.io.Serializable;
 import java.util.Collection;
 import java.util.LinkedList;
 import java.util.List;
@@ -27,9 +26,9 @@
 import org.apache.jmeter.samplers.Sampler;
 
 /**
- * TODO: should this extend AbstractFunction?
+ * Function to return the current thread number.
  */
-public class ThreadNumber implements Function, Serializable {
+public class ThreadNumber extends AbstractFunction {
 
 	private static final String KEY = "__threadNum"; //$NON-NLS-1$
 
@@ -50,6 +49,7 @@
 	 * @see org.apache.jmeter.functions.Function#setParameters(Collection)
 	 */
 	public void setParameters(Collection parameters) throws InvalidVariableException {
+		checkParameterCount(parameters,0,0);
 	}
 
 	/*



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org