Skip to content
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

Exception when instantiating an empty entity. #5

Open
kerbymart opened this issue Feb 28, 2024 · 0 comments
Open

Exception when instantiating an empty entity. #5

kerbymart opened this issue Feb 28, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@kerbymart
Copy link
Member

When instantiating an entity with no parameters like;

DataFactoryEntity emptyEntity = new DataFactoryEntityBuilder().build();

It should be handled at compile-time to prevent NPEs.

java.lang.NullPointerException: environment

	at java.util.Objects.requireNonNull(Objects.java:228)
	at com.divroll.datafactory.builders.DataFactoryEntityBuilder$ImmutableDataFactoryEntity$InitShim.environment(DataFactoryEntityBuilder.java:728)
	at com.divroll.datafactory.builders.DataFactoryEntityBuilder$ImmutableDataFactoryEntity.<init>(DataFactoryEntityBuilder.java:701)
	at com.divroll.datafactory.builders.DataFactoryEntityBuilder$ImmutableDataFactoryEntity.<init>(DataFactoryEntityBuilder.java:656)
	at com.divroll.datafactory.builders.DataFactoryEntityBuilder.build(DataFactoryEntityBuilder.java:612)
@kerbymart kerbymart added the bug Something isn't working label Feb 28, 2024
@kerbymart kerbymart self-assigned this Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant