{"action":"created","issue":{"url":"https://api.github.com/repos/mapstruct/mapstruct/issues/582","labels_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/582/labels{/name}","comments_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/582/comments","events_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/582/events","html_url":"https://github.com/mapstruct/mapstruct/pull/582","id":92165275,"number":582,"title":"#580 Add null-check for mapped -> type-converted property mapping.","user":{"login":"agudian","id":2737102,"avatar_url":"https://avatars.githubusercontent.com/u/2737102?v=3","gravatar_id":"","url":"https://api.github.com/users/agudian","html_url":"https://github.com/agudian","followers_url":"https://api.github.com/users/agudian/followers","following_url":"https://api.github.com/users/agudian/following{/other_user}","gists_url":"https://api.github.com/users/agudian/gists{/gist_id}","starred_url":"https://api.github.com/users/agudian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agudian/subscriptions","organizations_url":"https://api.github.com/users/agudian/orgs","repos_url":"https://api.github.com/users/agudian/repos","events_url":"https://api.github.com/users/agudian/events{/privacy}","received_events_url":"https://api.github.com/users/agudian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-30T18:27:38Z","updated_at":"2015-07-01T06:42:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mapstruct/mapstruct/pulls/582","html_url":"https://github.com/mapstruct/mapstruct/pull/582","diff_url":"https://github.com/mapstruct/mapstruct/pull/582.diff","patch_url":"https://github.com/mapstruct/mapstruct/pull/582.patch"},"body":"At least our built-in mapping methods return null for null input, which would break the type-conversion.\r\n\r\n@sjaakd, I think this null-check was left out intentionally to give users the chance to manually map null-values to non-null values? Could you please give this a quick check?\r\n"},"comment":{"url":"https://api.github.com/repos/mapstruct/mapstruct/issues/comments/117469898","html_url":"https://github.com/mapstruct/mapstruct/pull/582#issuecomment-117469898","issue_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/582","id":117469898,"user":{"login":"agudian","id":2737102,"avatar_url":"https://avatars.githubusercontent.com/u/2737102?v=3","gravatar_id":"","url":"https://api.github.com/users/agudian","html_url":"https://github.com/agudian","followers_url":"https://api.github.com/users/agudian/followers","following_url":"https://api.github.com/users/agudian/following{/other_user}","gists_url":"https://api.github.com/users/agudian/gists{/gist_id}","starred_url":"https://api.github.com/users/agudian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agudian/subscriptions","organizations_url":"https://api.github.com/users/agudian/orgs","repos_url":"https://api.github.com/users/agudian/repos","events_url":"https://api.github.com/users/agudian/events{/privacy}","received_events_url":"https://api.github.com/users/agudian/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T06:42:48Z","updated_at":"2015-07-01T06:42:48Z","body":"> Background: when calling a (builtin) method is called, a source null value could have meaning.\r\n\r\nThat's what I remembered as well as the reason not to do a null-check.\r\n\r\nThe alternative would be to add a local variable that is assigned with the result of the property-mapping method and do the null-check on that variable before handing it to the conversion."}}