spring-batch icon indicating copy to clipboard operation
spring-batch copied to clipboard

Reduce formatter initializations in `DefaultFieldSet`

Open hpoettker opened this issue 1 year ago • 0 comments

Resolves #1694.

The PR addresses the problem that the default value for the field numberFormat of DefaultFieldSet is currently initialized twice: Once by the assignment in the declaration and once in the constructor. As the construction of the default number format is expensive, this should be avoided.

It also addresses the problem that the expensive construction of the default numberFormat and dateFormat currently cannot be avoided in the case where the default values are overwritten after calling the constructor.

hpoettker avatar Feb 07 '24 17:02 hpoettker