You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jakarta.apache.org by se...@apache.org on 2011/05/13 19:51:12 UTC

svn commit: r1102828 - /jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/util/CompoundVariable.java

Author: sebb
Date: Fri May 13 17:51:12 2011
New Revision: 1102828

URL: http://svn.apache.org/viewvc?rev=1102828&view=rev
Log:
Don't try to add empty function alias

Modified:
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/util/CompoundVariable.java

Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/util/CompoundVariable.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/util/CompoundVariable.java?rev=1102828&r1=1102827&r2=1102828&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/util/CompoundVariable.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/util/CompoundVariable.java Fri May 13 17:51:12 2011
@@ -75,10 +75,12 @@ public class CompoundVariable implements
             while (iter.hasNext()) {
                 Function tempFunc = (Function) Class.forName(iter.next()).newInstance();
                 String referenceKey = tempFunc.getReferenceKey();
-                functions.put(referenceKey, tempFunc.getClass());
-                // Add alias for original StringFromFile name (had only one underscore)
-                if (referenceKey.equals("__StringFromFile")){//$NON-NLS-1$
-                    functions.put("_StringFromFile", tempFunc.getClass());//$NON-NLS-1$
+                if (referenceKey.length() > 0) { // ignore self
+                    functions.put(referenceKey, tempFunc.getClass());
+                    // Add alias for original StringFromFile name (had only one underscore)
+                    if (referenceKey.equals("__StringFromFile")){//$NON-NLS-1$
+                        functions.put("_StringFromFile", tempFunc.getClass());//$NON-NLS-1$
+                    }
                 }
             }
             final int functionCount = functions.size();



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