New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix IllegalArgumentException for File properties wich allow null value #394
Conversation
Any news? |
Thanks for your contribution and the detailed description. |
In my plugin it is filepath that enable optional feature, so when it is undefined the feature is off. In the next 2 weeks I will not be able to work on PR since I am on vacation, therefore if any additional work are required, then be not surprised that I will answer not soon. |
7495471
to
33d461f
Compare
Now its ready to merge. Travis fail is unrelated to this changes |
I have modified your code slightly where I think it helps readability. It should contain no functional difference to your code. It would be nice, if you could test the next nightly or current trunk. Thanks again for your contribution. |
Thanks! I was tested with 2c82bf3 (trunk branch). The exception does not arise any more though to set Undefined value for File property is impossible now, even though the flag {{NOT_UNDEFINED}} is not set for property. I attach 2 screenshots showing behavior of the same plugin file in versions 3.1 and 5.1: Therefore this fix so far not really helps me |
Relates to #394 on github. git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1842263 13f79535-47bb-0310-9956-ffa450edef68
OK, so we really have to explicitly allow |
No. Actually, the problem isn't connected with this task any more, the editor has changed as a result of the сommit fc4781d which is linked to bug 61625, at first sight absolutely not relating to it After reverting this change editor look as I expect: @pmouawad, can you look at this? Change that you made is necessary? What strange behavior that you talk about? In my opinion, combobox works as expected and I don't represent at all how it can influence perfomance |
Based on patch by Mingun (alexander_sergey at mail.ru) Closes apache#394 git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1841688 13f79535-47bb-0310-9956-ffa450edef68 Former-commit-id: 413bab2
Relates to apache#394 on github. git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1842263 13f79535-47bb-0310-9956-ffa450edef68 Former-commit-id: 4f2b6d2
Description
This fix the
IllegalArgumentException
whenTestBean
class contains nullableFile
field (in my case field has namevendorSKPath
):Motivation and Context
Though in the comment to the class
FieldStringEditor
it is told that it processes only non-null strings:jmeter/src/core/org/apache/jmeter/testbeans/gui/FieldStringEditor.java
Lines 29 to 37 in 0a6f36c
the class
WrappedEditor
can callsetValue
withnull
:jmeter/src/core/org/apache/jmeter/testbeans/gui/WrapperEditor.java
Lines 332 to 349 in 0a6f36c
So I think that comment also need to be updated, but I am not sure. It is possible that this class as envisioned shall not allow
null
and it is necessary to do fix in other place, but in case of my testing this fix works fine.How Has This Been Tested?
Create plugin with any
TestBean
class with nullableFile
field as show aboveTypes of changes
Checklist: