mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#295 Formatting
This commit is contained in:
parent
4ca2b6ecf1
commit
2fde97c039
@ -27,7 +27,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.lang.model.element.ExecutableElement;
|
||||
import javax.tools.Diagnostic;
|
||||
|
||||
@ -40,8 +39,8 @@ import org.mapstruct.ap.model.source.Mapping;
|
||||
import org.mapstruct.ap.model.source.SourceMethod;
|
||||
import org.mapstruct.ap.model.source.SourceReference;
|
||||
import org.mapstruct.ap.option.ReportingPolicy;
|
||||
import org.mapstruct.ap.prism.NullValueMappingPrism;
|
||||
import org.mapstruct.ap.prism.CollectionMappingStrategyPrism;
|
||||
import org.mapstruct.ap.prism.NullValueMappingPrism;
|
||||
import org.mapstruct.ap.util.Executables;
|
||||
import org.mapstruct.ap.util.MapperConfig;
|
||||
import org.mapstruct.ap.util.Strings;
|
||||
@ -183,7 +182,8 @@ public class BeanMappingMethod extends MappingMethod {
|
||||
if ( targetProperty == null ) {
|
||||
ctx.getMessager().printMessage(
|
||||
Diagnostic.Kind.ERROR,
|
||||
String.format( "Unknown property \"%s\" in return type.",
|
||||
String.format(
|
||||
"Unknown property \"%s\" in return type.",
|
||||
mapping.getTargetName()
|
||||
),
|
||||
method.getExecutable(),
|
||||
@ -456,7 +456,6 @@ public class BeanMappingMethod extends MappingMethod {
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void reportErrorForUnmappedTargetPropertiesIfRequired() {
|
||||
|
||||
// fetch settings from element to implement
|
||||
|
@ -21,7 +21,6 @@ package org.mapstruct.ap.model;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.lang.model.type.TypeMirror;
|
||||
import javax.tools.Diagnostic;
|
||||
|
||||
|
@ -21,7 +21,6 @@ package org.mapstruct.ap.model;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.lang.model.type.TypeMirror;
|
||||
import javax.tools.Diagnostic;
|
||||
|
||||
|
@ -22,17 +22,16 @@ import javax.xml.bind.annotation.XmlElementDecl;
|
||||
|
||||
import net.java.dev.hickory.prism.GeneratePrism;
|
||||
import net.java.dev.hickory.prism.GeneratePrisms;
|
||||
|
||||
import org.mapstruct.DecoratedWith;
|
||||
import org.mapstruct.InheritInverseConfiguration;
|
||||
import org.mapstruct.IterableMapping;
|
||||
import org.mapstruct.MapMapping;
|
||||
import org.mapstruct.NullValueMapping;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.MapperConfig;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.MappingTarget;
|
||||
import org.mapstruct.Mappings;
|
||||
import org.mapstruct.NullValueMapping;
|
||||
import org.mapstruct.Qualifier;
|
||||
import org.mapstruct.TargetType;
|
||||
|
||||
|
@ -22,20 +22,18 @@ import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.lang.model.element.AnnotationMirror;
|
||||
import javax.lang.model.element.Element;
|
||||
import javax.lang.model.type.DeclaredType;
|
||||
import javax.lang.model.type.TypeKind;
|
||||
import javax.lang.model.type.TypeMirror;
|
||||
|
||||
import org.mapstruct.ap.prism.NullValueMappingStrategyPrism;
|
||||
import org.mapstruct.ap.prism.NullValueMappingPrism;
|
||||
|
||||
import org.mapstruct.ap.option.ReportingPolicy;
|
||||
import org.mapstruct.ap.prism.CollectionMappingStrategyPrism;
|
||||
import org.mapstruct.ap.prism.MapperConfigPrism;
|
||||
import org.mapstruct.ap.prism.MapperPrism;
|
||||
import org.mapstruct.ap.prism.NullValueMappingPrism;
|
||||
import org.mapstruct.ap.prism.NullValueMappingStrategyPrism;
|
||||
|
||||
import static org.mapstruct.ap.prism.CollectionMappingStrategyPrism.valueOf;
|
||||
|
||||
|
@ -18,8 +18,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.mapnulltodefault;
|
||||
|
||||
import static org.mapstruct.NullValueMappingStrategy.RETURN_DEFAULT;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
@ -32,6 +30,8 @@ import org.mapstruct.ap.test.mapnulltodefault.source.Car;
|
||||
import org.mapstruct.ap.test.mapnulltodefault.target.CarDto;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import static org.mapstruct.NullValueMappingStrategy.RETURN_DEFAULT;
|
||||
|
||||
@Mapper(imports = UUID.class)
|
||||
public interface CarMapper {
|
||||
|
||||
|
@ -23,10 +23,10 @@ import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.NullValueMapping;
|
||||
import org.mapstruct.NullValueMappingStrategy;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.Mappings;
|
||||
import org.mapstruct.NullValueMapping;
|
||||
import org.mapstruct.NullValueMappingStrategy;
|
||||
import org.mapstruct.ap.test.mapnulltodefault.source.Car;
|
||||
import org.mapstruct.ap.test.mapnulltodefault.target.CarDto;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
@ -23,10 +23,10 @@ import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.NullValueMapping;
|
||||
import org.mapstruct.NullValueMappingStrategy;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.Mappings;
|
||||
import org.mapstruct.NullValueMapping;
|
||||
import org.mapstruct.NullValueMappingStrategy;
|
||||
import org.mapstruct.ap.test.mapnulltodefault.source.Car;
|
||||
import org.mapstruct.ap.test.mapnulltodefault.target.CarDto;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
@ -22,8 +22,6 @@ import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import static org.fest.assertions.Assertions.assertThat;
|
||||
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@ -32,6 +30,8 @@ import org.mapstruct.ap.test.mapnulltodefault.target.CarDto;
|
||||
import org.mapstruct.ap.testutil.WithClasses;
|
||||
import org.mapstruct.ap.testutil.runner.AnnotationProcessorTestRunner;
|
||||
|
||||
import static org.fest.assertions.Assertions.assertThat;
|
||||
|
||||
@WithClasses({
|
||||
Car.class,
|
||||
CarDto.class,
|
||||
|
@ -18,11 +18,10 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.mapnulltodefault;
|
||||
|
||||
import org.mapstruct.NullValueMappingStrategy;
|
||||
import org.mapstruct.MapperConfig;
|
||||
import org.mapstruct.NullValueMappingStrategy;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
@MapperConfig(nullValueMappingStrategy = NullValueMappingStrategy.RETURN_DEFAULT)
|
||||
|
Loading…
x
Reference in New Issue
Block a user