mapstruct/mapstruct

Introduce dedicated `nullValueIterablePropertyMappingStrategy` and `nullValueMapPropertyMappingStrategy`

開放

#3,387 建立於 2023年9月16日

 (1 則留言) (0 個反應) (0 位負責人)Java (904 個分叉)batch import
enhancementgood first issue

倉庫指標

星標
 (6,640 顆星)
PR 合併指標
 (平均合併 7天 19小時) (30 天內合併 10 個 PR)

描述

Discussed in https://github.com/mapstruct/mapstruct/discussions/3380

Originally posted by drahkrub September 11, 2023 Since 1.5.0 the nullValueMappingStrategy can be separately defined for Iterables and Maps via nullValueIterableMappingStrategy and nullValueMapMappingStrategy respectively.

It would be nice to do the same for nullValuePropertyMappingStrategy by introducing nullValueIterablePropertyMappingStrategy and nullValueMapPropertyMappingStrategy.

(by the way, I would have found nullValueCollectionMappingStrategy more appropriate than nullValueIterableMappingStrategy)

This would also facilitate the introduction of another NullValuePropertyMappingStrategy, but for that I'll start a new discussion: https://github.com/mapstruct/mapstruct/discussions/3381.

貢獻者指南