Bug 62900 - ObjectProperty#getStringValue() can throw NullPointerException
Summary: ObjectProperty#getStringValue() can throw NullPointerException
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 3.3
Hardware: All All
: P2 normal (vote)
Target Milestone: JMETER_5.1
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-10 11:18 UTC by Philippe Mouawad
Modified: 2018-11-10 11:23 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 2018-11-10 11:18:29 UTC
getStringValue() should check for nullity of value.

This has at least an impact of breaking Search Feature when an element uses an ObjectProperty.

Stacktrace:

 018-11-10 12:17:56,913 ERROR o.a.j.g.a.SearchTreeDialog: Error occurred searching for word:Saver in node:1 
java.lang.NullPointerException: null
	at org.apache.jmeter.testelement.property.ObjectProperty.getStringValue(ObjectProperty.java:104) ~[ApacheJMeter_core.jar:5.1-SNAPSHOT.20181110]
	at org.apache.jmeter.testelement.AbstractTestElement.getSearchableTokens(AbstractTestElement.java:642) ~[ApacheJMeter_core.jar:5.1-SNAPSHOT.20181110]
	at org.apache.jmeter.gui.action.SearchTreeDialog.searchInTree(SearchTreeDialog.java:366) [ApacheJMeter_core.jar:5.1-SNAPSHOT.20181110]
	at org.apache.jmeter.gui.action.SearchTreeDialog.doSearch(SearchTreeDialog.java:334) [ApacheJMeter_core.jar:5.1-SNAPSHOT.20181110]
	at org.apache.jmeter.gui.action.SearchTreeDialog.actionPerformed(SearchTreeDialog.java:242) [ApacheJMeter_core.jar:5.1-SNAPSHOT.20181110]
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) [?:1.8.0_161]
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) [?:1.8.0_161]
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) [?:1.8.0_161]
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) [?:1.8.0_161]
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) [?:1.8.0_161]
	at java.awt.Component.processMouseEvent(Component.java:6533) [?:1.8.0_161]
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) [?:1.8.0_161]
	at java.awt.Component.processEvent(Component.java:6298) [?:1.8.0_161]
	at java.awt.Container.processEvent(Container.java:2237) [?:1.8.0_161]
	at java.awt.Component.dispatchEventImpl(Component.java:4889) [?:1.8.0_161]
	at java.awt.Container.dispatchEventImpl(Container.java:2295) [?:1.8.0_161]
	at java.awt.Component.dispatchEvent(Component.java:4711) [?:1.8.0_161]
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889) [?:1.8.0_161]
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526) [?:1.8.0_161]
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467) [?:1.8.0_161]
	at java.awt.Container.dispatchEventImpl(Container.java:2281) [?:1.8.0_161]
	at java.awt.Window.dispatchEventImpl(Window.java:2746) [?:1.8.0_161]
	at java.awt.Component.dispatchEvent(Component.java:4711) [?:1.8.0_161]
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) [?:1.8.0_161]
	at java.awt.EventQueue.access$500(EventQueue.java:97) [?:1.8.0_161]
	at java.awt.EventQueue$3.run(EventQueue.java:709) [?:1.8.0_161]
	at java.awt.EventQueue$3.run(EventQueue.java:703) [?:1.8.0_161]
	at java.security.AccessController.doPrivileged(Native Method) [?:1.8.0_161]
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) [?:1.8.0_161]
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) [?:1.8.0_161]
	at java.awt.EventQueue$4.run(EventQueue.java:731) [?:1.8.0_161]
	at java.awt.EventQueue$4.run(EventQueue.java:729) [?:1.8.0_161]
	at java.security.AccessController.doPrivileged(Native Method) [?:1.8.0_161]
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) [?:1.8.0_161]
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) [?:1.8.0_161]
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) [?:1.8.0_161]
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [?:1.8.0_161]
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [?:1.8.0_161]
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:1.8.0_161]
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [?:1.8.0_161]
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [?:1.8.0_161]
Comment 1 Philippe Mouawad 2018-11-10 11:23:05 UTC
Author: pmouawad
Date: Sat Nov 10 11:21:56 2018
New Revision: 1846297

URL: http://svn.apache.org/viewvc?rev=1846297&view=rev
Log:
Bug 62900 - ObjectProperty#getStringValue() can throw NullPointerException
Bugzilla Id: 62900

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/testelement/property/ObjectProperty.java
    jmeter/trunk/xdocs/changes.xml