Bug 55858 - Startup Performance : On Startup, BeanInfoSupport should test for key availability instead of throwing
Startup Performance : On Startup, BeanInfoSupport should test for key availab...
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
2.6
All All
: P2 enhancement (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-12-08 14:52 UTC by Philippe Mouawad
Modified: 2013-12-19 21:49 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 2013-12-08 14:52:04 UTC
At startup BeanInfoSupport constructor fetches i18n values catching MissingResourceException.
Since java 6, it is better to test for key existence
Comment 1 Philippe Mouawad 2013-12-08 14:52:29 UTC
Affects all versions up to 2.10
Comment 2 Philippe Mouawad 2013-12-08 15:01:02 UTC
Date: Sun Dec  8 14:53:49 2013
New Revision: 1549033

URL: http://svn.apache.org/r1549033
Log:
Bug 55858 - Startup Performance : On Startup, BeanInfoSupport should test for key availability instead of throwing
Bugzilla Id: 55858

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/testbeans/BeanInfoSupport.java
    jmeter/trunk/xdocs/changes.xml
Comment 3 Sebb 2013-12-08 15:12:33 UTC
Is the exception frequently generated?

If not, checking to ensure it does not happen is likely a waste of time. Also the new code creates the string twice; this is unnecessary and somewhat fragile - the same field should be used for both to enure they are identical.

If this is a frequent code pattern, there should probably be a common helper method to do the check.

This is quite different from Bug 55857 where an empty string does occur frequently.
Comment 4 Philippe Mouawad 2013-12-08 20:11:52 UTC
40 times.
Comment 5 Philippe Mouawad 2013-12-08 20:12:02 UTC
Date: Sun Dec  8 20:10:53 2013
New Revision: 1549201

URL: http://svn.apache.org/r1549201
Log:
Bug 55858 - Startup Performance : On Startup, BeanInfoSupport should test for key availability instead of throwing
Avoid duplicate string creation
Bugzilla Id: 55858

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/testbeans/BeanInfoSupport.java
Comment 6 Philippe Mouawad 2013-12-19 21:49:40 UTC
Closing as no more comment.
Feel free to reopen if you want me to change