You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2016/12/30 20:51:47 UTC

svn commit: r1776639 - /jmeter/trunk/src/core/org/apache/jmeter/engine/util/ReplaceFunctionsWithStrings.java

Author: pmouawad
Date: Fri Dec 30 20:51:46 2016
New Revision: 1776639

URL: http://svn.apache.org/viewvc?rev=1776639&view=rev
Log:
Sonar : Remove useless assignment

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

Modified: jmeter/trunk/src/core/org/apache/jmeter/engine/util/ReplaceFunctionsWithStrings.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/engine/util/ReplaceFunctionsWithStrings.java?rev=1776639&r1=1776638&r2=1776639&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/engine/util/ReplaceFunctionsWithStrings.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/engine/util/ReplaceFunctionsWithStrings.java Fri Dec 30 20:51:46 2016
@@ -68,7 +68,6 @@ public class ReplaceFunctionsWithStrings
     @Override
     public JMeterProperty transformValue(JMeterProperty prop) throws InvalidVariableException {
         PatternMatcher pm = JMeterUtils.getMatcher();
-        Pattern pattern = null;
         PatternCompiler compiler = new Perl5Compiler();
         String input = prop.getStringValue();
         if(input == null) {
@@ -79,7 +78,7 @@ public class ReplaceFunctionsWithStrings
             String value = entry.getValue();
             if (regexMatch) {
                 try {
-                    pattern = compiler.compile(constructPattern(value));
+                    Pattern pattern = compiler.compile(constructPattern(value));
                     input = Util.substitute(pm, pattern,
                             new StringSubstitution(FUNCTION_REF_PREFIX + key + FUNCTION_REF_SUFFIX),
                             input, Util.SUBSTITUTE_ALL);