[
https://issues.apache.org/jira/browse/FELIX-5678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16172958#comment-16172958
]
David Bosschaert commented on FELIX-5678:
-----------------------------------------
bq. IIUC the API is no longer open for comments, correct? So either we'd have
to go about it this way, or build an extra layer on top of the Converter. Or,
maybe this is something all together different.
Yes, the OSGi Converter API for the R7 release is pretty much locked down now,
but we can still work on enhancements and improvements for R8...
> Allow merging of objects
> ------------------------
>
> Key: FELIX-5678
> URL: https://issues.apache.org/jira/browse/FELIX-5678
> Project: Felix
> Issue Type: Bug
> Components: Converter
> Reporter: David Leangen
>
> Given a typed object O1 and a "partial" representation of an object O2 (for
> instance in the form of a Map), allow O2 to be merged into O1.
> Example:
> {code}
> public class Foo {
> public String a;
> public String b;
> public String c;
> }
> Foo f = new Foo();
> a = "Eh!";
> b = "Be cool.";
> c = "See you later?";
> Map<String, String> m = new Map<>();
> m.put("b", "Be there or be square");
> Foo f2 = Converter.convert(f).merge(m);
> {code}
> I am sure there are many ways to skin this cat.
> If the Converter API cannot be changed, what would be the best way to tackle
> this problem?
> (In the meantime, while awaiting comments form [~bosschaert], I'll try to run
> a few experiments to see if I can come up with something reasonable.)
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)