Skip to content

Commit

Permalink
mapstruct#121 adjust formatting of builtin methods
Browse files Browse the repository at this point in the history
  • Loading branch information
agudian committed Jul 29, 2014
1 parent 9f03def commit 6093f52
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
Expand Up @@ -18,9 +18,10 @@
limitations under the License.
-->
private ZonedDateTime ${name}( Calendar cal ) {
if ( cal == null) {
return null;
}
return ZonedDateTime.ofInstant( cal.toInstant(), cal.getTimeZone().toZoneId());
private ZonedDateTime ${name}(Calendar cal) {
if ( cal == null ) {
return null;
}

return ZonedDateTime.ofInstant( cal.toInstant(), cal.getTimeZone().toZoneId() );
}
Expand Up @@ -18,11 +18,12 @@
limitations under the License.
-->
private Calendar ${name}( ZonedDateTime dateTime ) {
if (dateTime == null) {
return null;
}
Calendar instance = Calendar.getInstance( TimeZone.getTimeZone( dateTime.getZone() ) );
instance.setTimeInMillis( dateTime.toInstant().toEpochMilli() );
return instance;
private Calendar ${name}(ZonedDateTime dateTime) {
if ( dateTime == null ) {
return null;
}

Calendar instance = Calendar.getInstance( TimeZone.getTimeZone( dateTime.getZone() ) );
instance.setTimeInMillis( dateTime.toInstant().toEpochMilli() );
return instance;
}

0 comments on commit 6093f52

Please sign in to comment.