Bug 52789 - Proxy with Regexp Matching can fail with NullPointerException in Value Replacement if value is null
Summary: Proxy with Regexp Matching can fail with NullPointerException in Value Replac...
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.6
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
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
Comment 2 The ASF infrastructure team 2022-09-24 20:37:49 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2758