Bug 52789 - Proxy with Regexp Matching can fail with NullPointerException in Value Replacement if value is null
Proxy with Regexp Matching can fail with NullPointerException in Value Replac...
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: HTTP
2.6
All All
: P2 normal (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-02-28 16:43 UTC by Philippe Mouawad
Modified: 2012-02-28 16:53 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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