Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Nightly Builds
-
None
-
None
-
Operating System: All
Platform: All
-
22333
Description
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.