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

Should opt for immutability where we can #67

Open
xibz opened this issue Jan 5, 2024 · 1 comment
Open

Should opt for immutability where we can #67

xibz opened this issue Jan 5, 2024 · 1 comment

Comments

@xibz
Copy link

xibz commented Jan 5, 2024

Currently all objects in the SDK are mutable. If a new event or object is needed, it should be recreated, instead of using setters to set things.

public void setContent(Content content) {
this.content = content;
}

Instead we should utilize the builder pattern, imo. Look at lombok, https://projectlombok.org/features/Builder. This will make it a lot easier to generate these and make them properly immutable

@aalmiray
Copy link
Contributor

Duplicate of #66

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

No branches or pull requests

2 participants