mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#746 Add missing import for TimeZone in ZonedDateTimeToCalendar
This commit is contained in:
parent
9a4738950f
commit
eb99d7b1ef
@ -40,7 +40,7 @@ public class JaxbElemToValue extends BuiltInMethod {
|
||||
public JaxbElemToValue(TypeFactory typeFactory) {
|
||||
this.parameter = new Parameter( "element", typeFactory.getType( JAXBElement.class ) );
|
||||
this.returnType = typeFactory.getType( Object.class );
|
||||
this.importTypes = asSet( typeFactory.getType( JAXBElement.class ) );
|
||||
this.importTypes = asSet( parameter.getType() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -18,14 +18,16 @@
|
||||
*/
|
||||
package org.mapstruct.ap.internal.model.source.builtin;
|
||||
|
||||
import static org.mapstruct.ap.internal.util.Collections.asSet;
|
||||
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.Calendar;
|
||||
import java.util.Set;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.mapstruct.ap.internal.model.common.Parameter;
|
||||
import org.mapstruct.ap.internal.model.common.Type;
|
||||
import org.mapstruct.ap.internal.model.common.TypeFactory;
|
||||
import org.mapstruct.ap.internal.util.Collections;
|
||||
import org.mapstruct.ap.internal.util.JavaTimeConstants;
|
||||
|
||||
/**
|
||||
@ -41,7 +43,7 @@ public class ZonedDateTimeToCalendar extends BuiltInMethod {
|
||||
ZonedDateTimeToCalendar(TypeFactory typeFactory) {
|
||||
this.returnType = typeFactory.getType( Calendar.class );
|
||||
this.parameter = new Parameter( "dateTime", typeFactory.getType( JavaTimeConstants.ZONED_DATE_TIME_FQN ) );
|
||||
this.importedTypes = Collections.asSet( returnType, parameter.getType() );
|
||||
this.importedTypes = asSet( returnType, parameter.getType(), typeFactory.getType( TimeZone.class ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user