Created attachment 31250 [details] Zip containing the stacktrace and both potential patches When using an JMeter Plugin in 2.11 that is based on the TestBean concept and defines a Property in its BeanInfo class using p = property("text", TypeEditor.TextAreaEditor); a NullPointer Exception is thrown when loading a Testplan in GUI mode that makes use of the plugin. (see StackTrace in the attachment) The Problem seems to be that org.apache.jmeter.gui.util.JSyntaxTextArea#setLanguage(String language) is called with a null value as argument. That originates from a missing p.setValue(TEXT_LANGUAGE, <some string>) in the BeanInfo class. There are two potential solutions to this. 1.) throw an IllegalArgumentException in setLanguage if the provided argument is null specifying a detailed error message so the plugin developers can check their code an get it done quickly (see exception.patch in attachment) 2.) use the same default value as for the case that the map lookup returns no value. This would prevent breaking existing Testplans but the problem won't be noticed by anyone (see default.patch in attachment)
I think it would be best to allow the test to continue, but ideally to log a warning if the value has not been set. Unfortunately the code that detects the problem does not have access to the details of the caller. It looks to be very difficult to work round this.
Thanks; patch applied with minor tweaks: URL: http://svn.apache.org/r1561134 Log: Older TestBeans incompatible with 2.11 when using TextAreaEditor Bugzilla Id: 56059 Added: jmeter/trunk/test/src/org/apache/jmeter/gui/util/JSyntaxTextAreaTest.java (with props) Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/JSyntaxTextArea.java jmeter/trunk/xdocs/changes.xml
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3308