Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

SlackAttachment.setTimestamp(Date date) throws NullPointerException #47

Open
bubu333gh opened this issue Jun 13, 2019 · 0 comments
Open

Comments

@bubu333gh
Copy link

Null-check is needed for the setter with Date param because mappers like Mapstruct are mapping null value to it. I had to make a workaround in my mapper like this:

@mapping(target = "timestamp", expression = "java(slackAttachment.getTimestamp() == null ? null : slackAttachment.getTimestamp().getTime() / 1000L)")

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

No branches or pull requests

1 participant