You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/08/12 01:29:14 UTC
DO NOT REPLY [Bug 22333] New: -
JXPathContextFactory doesn't cache most common result of search
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22333>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22333
JXPathContextFactory doesn't cache most common result of search
Summary: JXPathContextFactory doesn't cache most common result of
search
Product: Commons
Version: Nightly Builds
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: JXPath
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: Eric.D.Friedman@wellsfargo.com
JXPathContextFactory's search for a factory class name caches all values
returned in the search *except* the default value. This means that in the
default case (which is the most common, obviously), the search is performed
every time, which is quite expensive.
this is the problem method:
private static String findFactory(String property, String defaultFactory)
note that it does not cache the value of defaultFactory in the foundFactory
class variable when that is the value returned.
suggest adding
foundFactory = defaultFactory;
return foundFactory;
in place of
return defaultFactory;
at the end of this method.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org