mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#121 adjust formatting of builtin methods
This commit is contained in:
parent
9f03defb24
commit
6093f525ed
@ -22,5 +22,6 @@ private ZonedDateTime ${name}( Calendar cal ) {
|
|||||||
if ( cal == null ) {
|
if ( cal == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ZonedDateTime.ofInstant( cal.toInstant(), cal.getTimeZone().toZoneId() );
|
return ZonedDateTime.ofInstant( cal.toInstant(), cal.getTimeZone().toZoneId() );
|
||||||
}
|
}
|
@ -22,6 +22,7 @@ private Calendar ${name}( ZonedDateTime dateTime ) {
|
|||||||
if ( dateTime == null ) {
|
if ( dateTime == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Calendar instance = Calendar.getInstance( TimeZone.getTimeZone( dateTime.getZone() ) );
|
Calendar instance = Calendar.getInstance( TimeZone.getTimeZone( dateTime.getZone() ) );
|
||||||
instance.setTimeInMillis( dateTime.toInstant().toEpochMilli() );
|
instance.setTimeInMillis( dateTime.toInstant().toEpochMilli() );
|
||||||
return instance;
|
return instance;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user