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

Intantiation problem in iogi param provider #525

Open
ghost opened this issue May 20, 2013 · 1 comment
Open

Intantiation problem in iogi param provider #525

ghost opened this issue May 20, 2013 · 1 comment
Labels

Comments

@ghost
Copy link

ghost commented May 20, 2013

All Objects is be instantiate but no parameters is provided in request . Example

public void inst(Person person,Phone phone) {}

if request some url to controller => inst?person.id=1 both parameteres is instantiate when one of them (phone) should be null

@rafaeldff
Copy link
Contributor

Thanks for your report, and for the contribution.

I'm torn on what to do about this issue, though. It may be useful to be able to get null when no parameter is received, but often it will just mask a bug. Nulls are evil.

Ideally the user should be able to specify for a specific Target whether she wants to get nulls. We do have this possibility for the type converters, with the FallbackConverter infrastructure: https://github.com/rafaeldff/Iogi/blob/master/src/br/com/caelum/iogi/conversion/FallbackConverter.java#L10 . Maybe we could broaden it's scope to general objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant