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

Advertised null safe syntax doesn't work #76

Open
bendem opened this issue Oct 21, 2017 · 1 comment
Open

Advertised null safe syntax doesn't work #76

bendem opened this issue Oct 21, 2017 · 1 comment

Comments

@bendem
Copy link
Contributor

bendem commented Oct 21, 2017

The null safe syntax advertised in the docs doesn't work as expected.

The example shows @?user.getName() which generates __internal.renderValue(user.getName(), true);.

If user is null, that will throw a NPE.

@bendem
Copy link
Contributor Author

bendem commented Oct 21, 2017

After reading it again, I do understand that it is expected that only the return value of getName() be null, but I really expected the whole expression to be null safe since there is not ?. syntax. I guess my issue is more of a feature request for null safe dereference (@user?.getName()).

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

1 participant