Skip to content

Instantly share code, notes, and snippets.

View stuartrexking's full-sized avatar

Stuart King stuartrexking

  • Townsville, QLD.
View GitHub Profile
@stuartrexking
stuartrexking / gist:1671252
Created January 24, 2012 17:18
Mkae this leaner
private void mapCover(ProfileDocument profileDocument, UpdateProfile updateProfile) {
boolean updateTitle = StringUtils.isNotBlank(updateProfile.getCoverTitle());
boolean updateCoverMedia = CollectionUtils.isMapNotEmpty(updateProfile.getCoverMedia());
if (updateTitle || updateCoverMedia) {
UserCoverDocument document = profileDocument.getCover();
if (null == document) {
document = new UserCoverDocument();
profileDocument.setCover(document);
}