{"action":"opened","number":347,"pull_request":{"url":"https://api.github.com/repos/square/javapoet/pulls/347","id":47757581,"html_url":"https://github.com/square/javapoet/pull/347","diff_url":"https://github.com/square/javapoet/pull/347.diff","patch_url":"https://github.com/square/javapoet/pull/347.patch","issue_url":"https://api.github.com/repos/square/javapoet/issues/347","number":347,"state":"open","locked":false,"title":"equals() and hashCode() implemented","user":{"login":"sormuras","id":2319838,"avatar_url":"https://avatars.githubusercontent.com/u/2319838?v=3","gravatar_id":"","url":"https://api.github.com/users/sormuras","html_url":"https://github.com/sormuras","followers_url":"https://api.github.com/users/sormuras/followers","following_url":"https://api.github.com/users/sormuras/following{/other_user}","gists_url":"https://api.github.com/users/sormuras/gists{/gist_id}","starred_url":"https://api.github.com/users/sormuras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sormuras/subscriptions","organizations_url":"https://api.github.com/users/sormuras/orgs","repos_url":"https://api.github.com/users/sormuras/repos","events_url":"https://api.github.com/users/sormuras/events{/privacy}","received_events_url":"https://api.github.com/users/sormuras/received_events","type":"User","site_admin":false},"body":"https://github.com/square/javapoet/issues/345\r\n\r\n**Implementation outline**\r\n* Used `toString().hashCode()` in all JavaPoet Spec and Name types instead of comparing the internal properties one-by-one.\r\n* Tried to pre-calculate hash codes in constructors where possible. In case of `TypeName` and its subclasses the hash code is calculated on-demand. Could be cached, if performance is an issue.\r\n* Add initial bunch of tests, should be extended someday.\r\n\r\nFixed a `NullPointerException` in `ClassName.java` along the way.","created_at":"2015-10-15T08:33:58Z","updated_at":"2015-10-15T08:33:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/square/javapoet/pulls/347/commits","review_comments_url":"https://api.github.com/repos/square/javapoet/pulls/347/comments","review_comment_url":"https://api.github.com/repos/square/javapoet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/square/javapoet/issues/347/comments","statuses_url":"https://api.github.com/repos/square/javapoet/statuses/19fbfaa839ca81ea5f53fc10876424594030499e","head":{"label":"sormuras:master","ref":"master","sha":"19fbfaa839ca81ea5f53fc10876424594030499e","user":{"login":"sormuras","id":2319838,"avatar_url":"https://avatars.githubusercontent.com/u/2319838?v=3","gravatar_id":"","url":"https://api.github.com/users/sormuras","html_url":"https://github.com/sormuras","followers_url":"https://api.github.com/users/sormuras/followers","following_url":"https://api.github.com/users/sormuras/following{/other_user}","gists_url":"https://api.github.com/users/sormuras/gists{/gist_id}","starred_url":"https://api.github.com/users/sormuras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sormuras/subscriptions","organizations_url":"https://api.github.com/users/sormuras/orgs","repos_url":"https://api.github.com/users/sormuras/repos","events_url":"https://api.github.com/users/sormuras/events{/privacy}","received_events_url":"https://api.github.com/users/sormuras/received_events","type":"User","site_admin":false},"repo":{"id":40235954,"name":"javapoet","full_name":"sormuras/javapoet","owner":{"login":"sormuras","id":2319838,"avatar_url":"https://avatars.githubusercontent.com/u/2319838?v=3","gravatar_id":"","url":"https://api.github.com/users/sormuras","html_url":"https://github.com/sormuras","followers_url":"https://api.github.com/users/sormuras/followers","following_url":"https://api.github.com/users/sormuras/following{/other_user}","gists_url":"https://api.github.com/users/sormuras/gists{/gist_id}","starred_url":"https://api.github.com/users/sormuras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sormuras/subscriptions","organizations_url":"https://api.github.com/users/sormuras/orgs","repos_url":"https://api.github.com/users/sormuras/repos","events_url":"https://api.github.com/users/sormuras/events{/privacy}","received_events_url":"https://api.github.com/users/sormuras/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sormuras/javapoet","description":"A Java API for generating .java source files.","fork":true,"url":"https://api.github.com/repos/sormuras/javapoet","forks_url":"https://api.github.com/repos/sormuras/javapoet/forks","keys_url":"https://api.github.com/repos/sormuras/javapoet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sormuras/javapoet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sormuras/javapoet/teams","hooks_url":"https://api.github.com/repos/sormuras/javapoet/hooks","issue_events_url":"https://api.github.com/repos/sormuras/javapoet/issues/events{/number}","events_url":"https://api.github.com/repos/sormuras/javapoet/events","assignees_url":"https://api.github.com/repos/sormuras/javapoet/assignees{/user}","branches_url":"https://api.github.com/repos/sormuras/javapoet/branches{/branch}","tags_url":"https://api.github.com/repos/sormuras/javapoet/tags","blobs_url":"https://api.github.com/repos/sormuras/javapoet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sormuras/javapoet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sormuras/javapoet/git/refs{/sha}","trees_url":"https://api.github.com/repos/sormuras/javapoet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sormuras/javapoet/statuses/{sha}","languages_url":"https://api.github.com/repos/sormuras/javapoet/languages","stargazers_url":"https://api.github.com/repos/sormuras/javapoet/stargazers","contributors_url":"https://api.github.com/repos/sormuras/javapoet/contributors","subscribers_url":"https://api.github.com/repos/sormuras/javapoet/subscribers","subscription_url":"https://api.github.com/repos/sormuras/javapoet/subscription","commits_url":"https://api.github.com/repos/sormuras/javapoet/commits{/sha}","git_commits_url":"https://api.github.com/repos/sormuras/javapoet/git/commits{/sha}","comments_url":"https://api.github.com/repos/sormuras/javapoet/comments{/number}","issue_comment_url":"https://api.github.com/repos/sormuras/javapoet/issues/comments{/number}","contents_url":"https://api.github.com/repos/sormuras/javapoet/contents/{+path}","compare_url":"https://api.github.com/repos/sormuras/javapoet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sormuras/javapoet/merges","archive_url":"https://api.github.com/repos/sormuras/javapoet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sormuras/javapoet/downloads","issues_url":"https://api.github.com/repos/sormuras/javapoet/issues{/number}","pulls_url":"https://api.github.com/repos/sormuras/javapoet/pulls{/number}","milestones_url":"https://api.github.com/repos/sormuras/javapoet/milestones{/number}","notifications_url":"https://api.github.com/repos/sormuras/javapoet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sormuras/javapoet/labels{/name}","releases_url":"https://api.github.com/repos/sormuras/javapoet/releases{/id}","created_at":"2015-08-05T09:12:10Z","updated_at":"2015-08-05T09:12:12Z","pushed_at":"2015-10-15T08:24:13Z","git_url":"git://github.com/sormuras/javapoet.git","ssh_url":"git@github.com:sormuras/javapoet.git","clone_url":"https://github.com/sormuras/javapoet.git","svn_url":"https://github.com/sormuras/javapoet","homepage":"","size":1166,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"square:master","ref":"master","sha":"50e0cbbb8dbe392875dd15e418476cfaaeb908c0","user":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":7961991,"name":"javapoet","full_name":"square/javapoet","owner":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/javapoet","description":"A Java API for generating .java source files.","fork":false,"url":"https://api.github.com/repos/square/javapoet","forks_url":"https://api.github.com/repos/square/javapoet/forks","keys_url":"https://api.github.com/repos/square/javapoet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/javapoet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/javapoet/teams","hooks_url":"https://api.github.com/repos/square/javapoet/hooks","issue_events_url":"https://api.github.com/repos/square/javapoet/issues/events{/number}","events_url":"https://api.github.com/repos/square/javapoet/events","assignees_url":"https://api.github.com/repos/square/javapoet/assignees{/user}","branches_url":"https://api.github.com/repos/square/javapoet/branches{/branch}","tags_url":"https://api.github.com/repos/square/javapoet/tags","blobs_url":"https://api.github.com/repos/square/javapoet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/javapoet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/javapoet/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/javapoet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/javapoet/statuses/{sha}","languages_url":"https://api.github.com/repos/square/javapoet/languages","stargazers_url":"https://api.github.com/repos/square/javapoet/stargazers","contributors_url":"https://api.github.com/repos/square/javapoet/contributors","subscribers_url":"https://api.github.com/repos/square/javapoet/subscribers","subscription_url":"https://api.github.com/repos/square/javapoet/subscription","commits_url":"https://api.github.com/repos/square/javapoet/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/javapoet/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/javapoet/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/javapoet/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/javapoet/contents/{+path}","compare_url":"https://api.github.com/repos/square/javapoet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/javapoet/merges","archive_url":"https://api.github.com/repos/square/javapoet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/javapoet/downloads","issues_url":"https://api.github.com/repos/square/javapoet/issues{/number}","pulls_url":"https://api.github.com/repos/square/javapoet/pulls{/number}","milestones_url":"https://api.github.com/repos/square/javapoet/milestones{/number}","notifications_url":"https://api.github.com/repos/square/javapoet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/javapoet/labels{/name}","releases_url":"https://api.github.com/repos/square/javapoet/releases{/id}","created_at":"2013-02-01T16:56:30Z","updated_at":"2015-10-15T07:58:39Z","pushed_at":"2015-10-15T03:27:45Z","git_url":"git://github.com/square/javapoet.git","ssh_url":"git@github.com:square/javapoet.git","clone_url":"https://github.com/square/javapoet.git","svn_url":"https://github.com/square/javapoet","homepage":"","size":3513,"stargazers_count":1293,"watchers_count":1293,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":196,"mirror_url":null,"open_issues_count":17,"forks":196,"open_issues":17,"watchers":1293,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/square/javapoet/pulls/347"},"html":{"href":"https://github.com/square/javapoet/pull/347"},"issue":{"href":"https://api.github.com/repos/square/javapoet/issues/347"},"comments":{"href":"https://api.github.com/repos/square/javapoet/issues/347/comments"},"review_comments":{"href":"https://api.github.com/repos/square/javapoet/pulls/347/comments"},"review_comment":{"href":"https://api.github.com/repos/square/javapoet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/square/javapoet/pulls/347/commits"},"statuses":{"href":"https://api.github.com/repos/square/javapoet/statuses/19fbfaa839ca81ea5f53fc10876424594030499e"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":268,"deletions":9,"changed_files":15}}