You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by korovkin <gi...@git.apache.org> on 2016/07/25 19:39:50 UTC

[GitHub] thrift pull request #1056: java: adding factories to the generated Java clas...

GitHub user korovkin opened a pull request:

    https://github.com/apache/thrift/pull/1056

    java: adding factories to the generated Java classes

    adding factories to the generated Java classes, allowing the user to control the type of classes to be allocated when de-serializing the incoming message.
    
    example of generated code:
    
    ```
    public class Team implements ... {
    
      ...
      public static class TeamFactory {
        public Team allocate() { return new Team(); }
        public Team allocate(Team other) { return new Team(other); }
        public Team allocate(String teamId, String name, String domain, String email_domain, String plan) { return new Team(teamId, name, domain, email_domain, plan); }
      }
    
      public static volatile TeamFactory factory = new TeamFactory();
      public static void setFactory(TeamFactory f) { factory = f;}
      public static TeamFactory getFactory() { return factory;}
    
      ...
    }
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/korovkin/thrift java_factories

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/1056.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1056
    
----
commit 1228ca2e6f70f0e778a9b8d8c99bcc0795248e5c
Author: Haim Grosman <ko...@gmail.com>
Date:   2016-07-25T19:32:20Z

    factories for the generated java classes

commit 1976dc6d2b8df44210586c9be028a3b07df35735
Author: Haim Grosman <ko...@gmail.com>
Date:   2016-07-25T19:36:20Z

    cleanup

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift issue #1056: java: adding factories to the generated Java classes

Posted by jeking3 <gi...@git.apache.org>.
Github user jeking3 commented on the issue:

    https://github.com/apache/thrift/pull/1056
  
    This needs to be rebased on the current master and resubmitted; we need a clean CI build before we can proceed.


---

[GitHub] thrift issue #1056: java: adding factories to the generated Java classes

Posted by korovkin <gi...@git.apache.org>.
Github user korovkin commented on the issue:

    https://github.com/apache/thrift/pull/1056
  
    contributing back from slackhq


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift issue #1056: java: adding factories to the generated Java classes

Posted by Jens-G <gi...@git.apache.org>.
Github user Jens-G commented on the issue:

    https://github.com/apache/thrift/pull/1056
  
    Hi @korovkin, thanks! Could you please create a matching JIRA ticket for it, according to our [contrib guidelines](https://thrift.apache.or/docs/HowToContribute)? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift issue #1056: java: adding factories to the generated Java classes

Posted by jeking3 <gi...@git.apache.org>.
Github user jeking3 commented on the issue:

    https://github.com/apache/thrift/pull/1056
  
    This needs to be rebased on the current master and resubmitted; we need a clean CI build before we can proceed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift issue #1056: java: adding factories to the generated Java classes

Posted by korovkin <gi...@git.apache.org>.
Github user korovkin commented on the issue:

    https://github.com/apache/thrift/pull/1056
  
    sure. 
    added: https://issues.apache.org/jira/browse/THRIFT-3887



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift issue #1056: java: adding factories to the generated Java classes

Posted by korovkin <gi...@git.apache.org>.
Github user korovkin commented on the issue:

    https://github.com/apache/thrift/pull/1056
  
    CC: @smourachov



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---