Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Implemented
-
2.5
-
Tested on Mac OSX 10.9, Java SE 7 (1.7.0_04)
Description
After having profiled an application I'm coding, and having detected hotspot methods, I've come across with a few suggestions por performance improvement which actually have worked in my environment.
Changing the referenced method to the following code makes the small trick:
From:
public String getXMLParserClassName() {
try
catch (Exception e)
{ return null; }}
To:
private static final String xmlParserClassName;
static {
String result;
try
catch (Exception e)
{ result = null; } xmlParserClassName = result;
}
public String getXMLParserClassName()
{ return xmlParserClassName; }Could this be added as a patch to the trunk please?