mapstruct-idea icon indicating copy to clipboard operation
mapstruct-idea copied to clipboard

For Map to Bean mappings, ignore unknown source property inspection

Open PRiewe opened this issue 5 months ago • 0 comments

For Map to Bean mappings like

  @Mapping(source = "exDate", target = "exDate", dateFormat = "yyyy-MM-dd")
  @Mapping(source = "payDate", target = "payDate", dateFormat = "yyyy-MM-dd")
  @Mapping(source = "recordDate", target = "recordDate", dateFormat = "yyyy-MM-dd")
  @Mapping(source = "annDate", target = "annDate", dateFormat = "yyyy-MM-dd")
  public abstract CorporateAction toCorporateAction(Map<String, String> rowValues);

the plugin flags all source properties as "unknown". The source property inspection should probably be skipped in this case (When source object is a Map<String,?>) since it can't possible know the contents of maps passed in.

PRiewe avatar Sep 09 '25 20:09 PRiewe