Skip to content

Instantly share code, notes, and snippets.

@caina caina/null-pattern.java
Last active Jun 29, 2018

Embed
What would you like to do?
public News saveNews(News news) {
news.publishedAt = convertToDate(news.publishedAt);
orm.save(news);
}
private Timestamp convertToDate(String date) {
if(date == null) {
return null;
}
[.<implementation>.]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.