gnuemacscoin
gnuemacscoin
I would like to offer another perspective. To me it makes sense for the outermost `null` to be tied to the object's `required` list, the way it is now, since...
When merging one object into another (using `void` mapper methods and a `@MappingTarget` parameter), you tell `MapStruct` to skip all properties that are `null` in the source object. So when...
``` java public class Opt { public @Nullable T value; } public class Target { public @Nullable String prop; public @Nonnull String nonnullProp = ".*"; } public class Source {...
> In fact, the Opt class is actually JsonNullable equivalent here. That's what I at first thought the role of JsonNullable was, but JsonNullable wraps both `null` and `undefined` (missing...
> And again I don’t like to have a mapping step from dto to dto. In my example `Source` would be a patch DTO, and `Target` would be an `@Entity`...
Anyway here's a `MapStruct` configuration grounded in reality of the current `JsonNullable`. ``` java @Mapper(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE) public interface OptMapper { @Condition default boolean isPresent(@Nonnull JsonNullable nullable) { return nullable.isPresent();...