https://issues.apache.org/bugzilla/show_bug.cgi?id=56059

            Bug ID: 56059
           Summary: Older TestBeans incompatible with 2.11 when using
                    TextAreaEditor
           Product: JMeter
           Version: 2.11
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 31250
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31250&action=edit
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)

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to