Details
-
Improvement
-
Status: Closed
-
Critical
-
Resolution: Not A Problem
-
2.2.1
-
None
-
None
Description
In the file
./struts-2.2.1/src/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationValidationConfigurationBuilder.java line:547
DateFormat.getDateTimeInstance() is called 3 times for each function call of "parseDateString"
We can add a class field to store the instances to improve performance.
Similar code can be found in (./struts-2.2.1/src/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkBasicConverter.java line: 323)
(Similar to the Appache Bug https://issues.apache.org/bugzilla/show_bug.cgi?id=48778 )