Skip to content

Lazily initialize DataSize.PATTERN #28560

Closed
@sbrannen

Description

@sbrannen

To avoid unnecessary eager initialization of org.springframework.util.unit.DataSize.PATTERN, we should initialize it lazily in the first invocation of DataSize.parse(CharSequence, DataUnit).

This can be achieved by moving PATTERN to a private static nested class.

See oracle/graal#4489 for details.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions