Skip to content

Allow obtaining a toString() representation from a Lazy without resolving the lazy value #2751

Closed
@Axinet

Description

@Axinet

Hello Team,

As starting with version 3.0 org.springframework.data.util.Lazy class no longer offer public contructor we can no longer wrap it in our custom implementation to check if Lazy was already resolved or not. As the member private volatile boolean resolved is already there, would it be possible to provide a public getter isResolved() to a Lazy class (I can commit it, but as this is an API change it is expected to start with disscussion)?
Our use case is: depending on resolved flag use toString of object returned from Supplier or report that something was not used yet.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions