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

do not force to set setTitles() in a Builder #31

Closed
hardysim opened this issue Jan 24, 2017 · 3 comments
Closed

do not force to set setTitles() in a Builder #31

hardysim opened this issue Jan 24, 2017 · 3 comments

Comments

@hardysim
Copy link
Contributor

from #28 (comment)

if needed I think the constructor would be a better place

@hardysim hardysim changed the title do not forced to set setTitles() in a Builder do not force to set setTitles() in a Builder Jan 27, 2017
@dvdciri
Copy link
Owner

dvdciri commented Jan 30, 2017

Where am i forcing to set the title?

@hardysim
Copy link
Contributor Author

The MultiChoiceToolbar#Builder() takes setTitles().
If I do not add this to the builder, it crashes with:

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.trim()' on a null object reference
at com.davidecirillo.multichoicerecyclerview.MultiChoiceToolbar.<init>(MultiChoiceToolbar.java:26)
at com.davidecirillo.multichoicerecyclerview.MultiChoiceToolbar.<init>(MultiChoiceToolbar.java:9)
at com.davidecirillo.multichoicerecyclerview.MultiChoiceToolbar$Builder.build(MultiChoiceToolbar.java:122)

In my understanding, a builder is the thing where I might add options (but I can leave them unset).
Am I wrong?


This is not a bug - more like a architectural discussion ;-)

@dvdciri
Copy link
Owner

dvdciri commented Jan 31, 2017

Correct, thanks for adding info, will fix this later

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