You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2014/01/24 09:42:23 UTC

[Bug 56059] New: Older TestBeans incompatible with 2.11 when using TextAreaEditor

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: issues@jmeter.apache.org
          Reporter: real_thuri@gmx.de

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.

[Bug 56059] Older TestBeans incompatible with 2.11 when using TextAreaEditor

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56059

--- Comment #1 from Sebb <se...@apache.org> ---
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.

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

[Bug 56059] Older TestBeans incompatible with 2.11 when using TextAreaEditor

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56059

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Sebb <se...@apache.org> ---
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

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