{"action":"created","issue":{"url":"https://api.github.com/repos/vimeo/stag-java/issues/54","repository_url":"https://api.github.com/repos/vimeo/stag-java","labels_url":"https://api.github.com/repos/vimeo/stag-java/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/vimeo/stag-java/issues/54/comments","events_url":"https://api.github.com/repos/vimeo/stag-java/issues/54/events","html_url":"https://github.com/vimeo/stag-java/issues/54","id":205533200,"number":54,"title":"Duplicate Classes generated","user":{"login":"yasirmhd","id":13655724,"avatar_url":"https://avatars.githubusercontent.com/u/13655724?v=3","gravatar_id":"","url":"https://api.github.com/users/yasirmhd","html_url":"https://github.com/yasirmhd","followers_url":"https://api.github.com/users/yasirmhd/followers","following_url":"https://api.github.com/users/yasirmhd/following{/other_user}","gists_url":"https://api.github.com/users/yasirmhd/gists{/gist_id}","starred_url":"https://api.github.com/users/yasirmhd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yasirmhd/subscriptions","organizations_url":"https://api.github.com/users/yasirmhd/orgs","repos_url":"https://api.github.com/users/yasirmhd/repos","events_url":"https://api.github.com/users/yasirmhd/events{/privacy}","received_events_url":"https://api.github.com/users/yasirmhd/received_events","type":"User","site_admin":false},"labels":[{"id":395621767,"url":"https://api.github.com/repos/vimeo/stag-java/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-06T09:51:12Z","updated_at":"2017-02-07T14:49:57Z","closed_at":"2017-02-07T14:49:57Z","body":"#### Issue Summary\r\nDuplicate classes are being generated when both the base class and derived class use @UseStag annotation and the base class exists in another module.\r\n\r\n#### Reproduction Steps\r\nDefine a class in sample_model library\r\n\r\n````java \r\npackage com.vimeo.sample_model;\r\n\r\nimport com.vimeo.stag.UseStag;\r\n\r\n@UseStag\r\npublic class BaseExternalModel {\r\n    public String type;\r\n\r\n    public int baseValue;\r\n\r\n}\r\n````\r\n\r\nIn sample app module add ExternalModelDerivedExample class\r\n````java \r\npackage com.vimeo.sample.model;\r\n\r\nimport com.vimeo.sample_model.BaseExternalModel;\r\nimport com.vimeo.stag.UseStag;\r\n\r\n@UseStag\r\npublic class ExternalModelDerivedExample extends BaseExternalModel {\r\n\r\n    public Boolean derivedBoolean;\r\n}\r\n\r\n````\r\n#### Expected Behavior\r\nIt should create only one TypeAdapter for BaseExternalModel which should exist in the sample_module module only.\r\n\r\n#### Actual Behavior\r\nIt generates two classes by BaseExternalModel$TypeAdapter in both the modules. Please check the screen shot below\r\n\r\n\r\nWhat currently happens as a result of the reproduction steps?\r\n![image](https://cloud.githubusercontent.com/assets/13655724/22642098/4f311e76-ec7f-11e6-92bb-4ddfb7d2c6e9.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/vimeo/stag-java/issues/comments/278021499","html_url":"https://github.com/vimeo/stag-java/issues/54#issuecomment-278021499","issue_url":"https://api.github.com/repos/vimeo/stag-java/issues/54","id":278021499,"user":{"login":"anthonycr","id":1966779,"avatar_url":"https://avatars.githubusercontent.com/u/1966779?v=3","gravatar_id":"","url":"https://api.github.com/users/anthonycr","html_url":"https://github.com/anthonycr","followers_url":"https://api.github.com/users/anthonycr/followers","following_url":"https://api.github.com/users/anthonycr/following{/other_user}","gists_url":"https://api.github.com/users/anthonycr/gists{/gist_id}","starred_url":"https://api.github.com/users/anthonycr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthonycr/subscriptions","organizations_url":"https://api.github.com/users/anthonycr/orgs","repos_url":"https://api.github.com/users/anthonycr/repos","events_url":"https://api.github.com/users/anthonycr/events{/privacy}","received_events_url":"https://api.github.com/users/anthonycr/received_events","type":"User","site_admin":false},"created_at":"2017-02-07T14:49:57Z","updated_at":"2017-02-07T14:49:57Z","body":"Fixed by https://github.com/vimeo/stag-java/pull/55, tests to verify added here https://github.com/vimeo/stag-java/pull/57. Closing as fixed"}}
{"actor":{"display_login":"anthonycr"}}