Skip to content

Lazy #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Apr 24, 2024
Merged

Lazy #65

merged 20 commits into from
Apr 24, 2024

Conversation

JohannesRabauer
Copy link
Member

No description provided.

@SuppressWarnings("unchecked")
private Lazy<T> createNewDefaultLazyWithClearableReference()
{
Objects.requireNonNull(this.loader);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move those requireNonNull lines to constructor?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not valid. In the constructor it is valid to leave the loader to null (hence the other constructors). But the method is not allowed to get executed when the loader is null.

Copy link

@tboehm-xdev tboehm-xdev merged commit 170e35a into develop Apr 24, 2024
@tboehm-xdev tboehm-xdev deleted the lazy branch April 24, 2024 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants