Bug 55858

Summary: Startup Performance : On Startup, BeanInfoSupport should test for key availability instead of throwing
Product: JMeter - Now in Github Reporter: Philippe Mouawad <p.mouawad>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: enhancement CC: p.mouawad
Priority: P2    
Version: 2.6   
Target Milestone: ---   
Hardware: All   
OS: All   

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
Comment 7 The ASF infrastructure team 2022-09-24 20:37:56 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3284