curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jordan Zimmerman (JIRA)" <>
Subject [jira] [Updated] (CURATOR-5) Make JsonInstanceSerializer#deserialize leverage ServiceInstanceBuilder
Date Wed, 25 Sep 2013 03:51:05 GMT


Jordan Zimmerman updated CURATOR-5:

    Fix Version/s: TBD
> Make JsonInstanceSerializer#deserialize leverage ServiceInstanceBuilder
> -----------------------------------------------------------------------
>                 Key: CURATOR-5
>                 URL:
>             Project: Apache Curator
>          Issue Type: Improvement
>          Components: Recipes
>    Affects Versions: 2.0.0-incubating
>            Reporter: Jordan Zimmerman
>            Priority: Minor
>             Fix For: TBD
> From
> Proposing a way to change JsonInstanceSerializer leverage ServiceInstance's builder pattern
> See discussion and request to generate a patch here:
> ===
> It's possible a lot of the lower-level JSON deserialization code in JsonInstanceSerializer#deserialize()
could be passed off to Jackson if ServiceInstanceBuilder's setters also followed the bean
patterns (e.g. setId() versus id()). If ServiceInstanceBuilder followed this pattern, Jackson's
standard bean deserialization could, I believe, deserialize directly into the ServiceInstanceBuilder
and JsonInstanceSerializer#deserialize() could use that higher-level pattern to eliminate
a fair chunk of code here.
> ===
> So, why don't we make ServiceInstanceBuilder follow the bean API? Can you update this
pull to reflect that? I suggest leaving the old builder-style methods and marking them as
deprecated. This way it won't break existing users.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message