felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Leangen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-5330) Double fields in Map if superclass shares a field name
Date Mon, 22 Aug 2016 10:13:21 GMT

    [ https://issues.apache.org/jira/browse/FELIX-5330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15430505#comment-15430505
] 

David Leangen commented on FELIX-5330:
--------------------------------------

Thank you very much, David B.!!

As a workaround, I removed the field in the parent class so I cannot confirm, but I'm sure
that the fix works. :-)

> Double fields in Map if superclass shares a field name
> ------------------------------------------------------
>
>                 Key: FELIX-5330
>                 URL: https://issues.apache.org/jira/browse/FELIX-5330
>             Project: Felix
>          Issue Type: Bug
>          Components: Converter
>            Reporter: David Leangen
>            Assignee: David Bosschaert
>
> If a DTO inherits from an superclass, and both the DTO and the superclass have a field
with the same name, then a converted map has two fields with that name.
> Example:
> {code}
> MyDTOSuper extends DTO {
>   public String data;
> }
> MyDTOChild extends MyDTOSuper {
>   public String data;
> }
> MyDTOChild dto = new MyDTOChild();
> dto.data = "howdy!";
> {code}
> When converted to Map, it will have 2 fields named "data", one with the value "howdy!",
the other with a null value.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message