I want to check null in method
@Override
public void updateFooFromNonNullAttributesOfDto(FooDto fooDto, Foo foo) {
if ( fooDto== null ) {
return;
}
if ( fooDto.getBar() != null ) {
site.setBar( fooDto.getBar() );
}
if ( fooDto.getBaz() != null ) {
site.setBar( fooDto.getBaz() );
}
}
When I use
@Mapper(NullValueCheckStrategy.ALWAYS)
It's check in all methods, but I want check only in one... How to solve this problem?
@Nullable/@NotNull
annotations at the method declarations. – Foret@AfterMapping
method in the mapper? – Domingo