Bug 52789

Summary: Proxy with Regexp Matching can fail with NullPointerException in Value Replacement if value is null
Product: JMeter Reporter: Philippe Mouawad <p.mouawad>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal CC: p.mouawad
Priority: P2    
Version: 2.6   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Philippe Mouawad 2012-02-28 16:43:50 UTC
I have a case where Argument.metadata is null during recording, so I get this error because ReplaceFunctionsWithStrings does not check if value of Property is null before replacing.



2012/02/28 17:27:46 ERROR - jmeter.JMeter: Uncaught exception:  java.lang.NullPointerException
	at org.apache.oro.text.regex.Util.substitute(Unknown Source)
	at org.apache.jmeter.engine.util.ReplaceFunctionsWithStrings.transformValue(ReplaceFunctionsWithStrings.java:79)
	at org.apache.jmeter.engine.util.ValueReplacer.replaceValues(ValueReplacer.java:118)
	at org.apache.jmeter.engine.util.ValueReplacer.replaceValues(ValueReplacer.java:125)
	at org.apache.jmeter.engine.util.ValueReplacer.replaceValues(ValueReplacer.java:125)
	at org.apache.jmeter.engine.util.ValueReplacer.replaceValues(ValueReplacer.java:125)
	at org.apache.jmeter.engine.util.ValueReplacer.reverseReplace(ValueReplacer.java:82)
	at org.apache.jmeter.protocol.http.proxy.ProxyControl.replaceValues(ProxyControl.java:972)
	at org.apache.jmeter.protocol.http.proxy.ProxyControl.deliverSampler(ProxyControl.java:405)
	at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:299)
Comment 1 Philippe Mouawad 2012-02-28 16:53:51 UTC
Date: Tue Feb 28 16:45:58 2012
New Revision: 1294726

URL: http://svn.apache.org/viewvc?rev=1294726&view=rev
Log:
Bug 52789 - Proxy with Regexp Matching can fail with NullPointerException in Value Replacement if value is null

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