{"action":"closed","number":1177,"pull_request":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/1177","id":29768485,"html_url":"https://github.com/jhipster/generator-jhipster/pull/1177","diff_url":"https://github.com/jhipster/generator-jhipster/pull/1177.diff","patch_url":"https://github.com/jhipster/generator-jhipster/pull/1177.patch","issue_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1177","number":1177,"state":"closed","locked":false,"title":"Fix null pointer issue in hashCode method","user":{"login":"ddebree","id":396348,"avatar_url":"https://avatars.githubusercontent.com/u/396348?v=3","gravatar_id":"","url":"https://api.github.com/users/ddebree","html_url":"https://github.com/ddebree","followers_url":"https://api.github.com/users/ddebree/followers","following_url":"https://api.github.com/users/ddebree/following{/other_user}","gists_url":"https://api.github.com/users/ddebree/gists{/gist_id}","starred_url":"https://api.github.com/users/ddebree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddebree/subscriptions","organizations_url":"https://api.github.com/users/ddebree/orgs","repos_url":"https://api.github.com/users/ddebree/repos","events_url":"https://api.github.com/users/ddebree/events{/privacy}","received_events_url":"https://api.github.com/users/ddebree/received_events","type":"User","site_admin":false},"body":"Currently the generated hashCode method of the entities is not null safe. When a sql entity is created, and the hashCode method is called (for example, when adding it to a HashSet), the method throws a null pointer exception since the id field is not yet set.\r\nTo fix the issue I have changed the hashCode method to use the java Objects.hashCode helper method that by default is null safe. It is also slightly more readable.\r\nI have also changed the equals method to use the Objects helper method to make it slightly more readable.","created_at":"2015-02-22T10:19:36Z","updated_at":"2015-03-05T12:41:07Z","closed_at":"2015-03-05T12:41:07Z","merged_at":"2015-03-05T12:41:07Z","merge_commit_sha":"ee6188ad214b5e096327d043524bbdfdc619b7ca","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/1177/commits","review_comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/1177/comments","review_comment_url":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1177/comments","statuses_url":"https://api.github.com/repos/jhipster/generator-jhipster/statuses/340c8ad97216369420d98493610f836a7e7eef0b","head":{"label":"ddebree:patch-1","ref":"patch-1","sha":"340c8ad97216369420d98493610f836a7e7eef0b","user":{"login":"ddebree","id":396348,"avatar_url":"https://avatars.githubusercontent.com/u/396348?v=3","gravatar_id":"","url":"https://api.github.com/users/ddebree","html_url":"https://github.com/ddebree","followers_url":"https://api.github.com/users/ddebree/followers","following_url":"https://api.github.com/users/ddebree/following{/other_user}","gists_url":"https://api.github.com/users/ddebree/gists{/gist_id}","starred_url":"https://api.github.com/users/ddebree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddebree/subscriptions","organizations_url":"https://api.github.com/users/ddebree/orgs","repos_url":"https://api.github.com/users/ddebree/repos","events_url":"https://api.github.com/users/ddebree/events{/privacy}","received_events_url":"https://api.github.com/users/ddebree/received_events","type":"User","site_admin":false},"repo":{"id":31159126,"name":"generator-jhipster","full_name":"ddebree/generator-jhipster","owner":{"login":"ddebree","id":396348,"avatar_url":"https://avatars.githubusercontent.com/u/396348?v=3","gravatar_id":"","url":"https://api.github.com/users/ddebree","html_url":"https://github.com/ddebree","followers_url":"https://api.github.com/users/ddebree/followers","following_url":"https://api.github.com/users/ddebree/following{/other_user}","gists_url":"https://api.github.com/users/ddebree/gists{/gist_id}","starred_url":"https://api.github.com/users/ddebree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddebree/subscriptions","organizations_url":"https://api.github.com/users/ddebree/orgs","repos_url":"https://api.github.com/users/ddebree/repos","events_url":"https://api.github.com/users/ddebree/events{/privacy}","received_events_url":"https://api.github.com/users/ddebree/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ddebree/generator-jhipster","description":"Hipster stack for Java developers. Yeoman + Maven + Spring + AngularJS in one handy generator.","fork":true,"url":"https://api.github.com/repos/ddebree/generator-jhipster","forks_url":"https://api.github.com/repos/ddebree/generator-jhipster/forks","keys_url":"https://api.github.com/repos/ddebree/generator-jhipster/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ddebree/generator-jhipster/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ddebree/generator-jhipster/teams","hooks_url":"https://api.github.com/repos/ddebree/generator-jhipster/hooks","issue_events_url":"https://api.github.com/repos/ddebree/generator-jhipster/issues/events{/number}","events_url":"https://api.github.com/repos/ddebree/generator-jhipster/events","assignees_url":"https://api.github.com/repos/ddebree/generator-jhipster/assignees{/user}","branches_url":"https://api.github.com/repos/ddebree/generator-jhipster/branches{/branch}","tags_url":"https://api.github.com/repos/ddebree/generator-jhipster/tags","blobs_url":"https://api.github.com/repos/ddebree/generator-jhipster/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ddebree/generator-jhipster/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ddebree/generator-jhipster/git/refs{/sha}","trees_url":"https://api.github.com/repos/ddebree/generator-jhipster/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ddebree/generator-jhipster/statuses/{sha}","languages_url":"https://api.github.com/repos/ddebree/generator-jhipster/languages","stargazers_url":"https://api.github.com/repos/ddebree/generator-jhipster/stargazers","contributors_url":"https://api.github.com/repos/ddebree/generator-jhipster/contributors","subscribers_url":"https://api.github.com/repos/ddebree/generator-jhipster/subscribers","subscription_url":"https://api.github.com/repos/ddebree/generator-jhipster/subscription","commits_url":"https://api.github.com/repos/ddebree/generator-jhipster/commits{/sha}","git_commits_url":"https://api.github.com/repos/ddebree/generator-jhipster/git/commits{/sha}","comments_url":"https://api.github.com/repos/ddebree/generator-jhipster/comments{/number}","issue_comment_url":"https://api.github.com/repos/ddebree/generator-jhipster/issues/comments{/number}","contents_url":"https://api.github.com/repos/ddebree/generator-jhipster/contents/{+path}","compare_url":"https://api.github.com/repos/ddebree/generator-jhipster/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ddebree/generator-jhipster/merges","archive_url":"https://api.github.com/repos/ddebree/generator-jhipster/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ddebree/generator-jhipster/downloads","issues_url":"https://api.github.com/repos/ddebree/generator-jhipster/issues{/number}","pulls_url":"https://api.github.com/repos/ddebree/generator-jhipster/pulls{/number}","milestones_url":"https://api.github.com/repos/ddebree/generator-jhipster/milestones{/number}","notifications_url":"https://api.github.com/repos/ddebree/generator-jhipster/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ddebree/generator-jhipster/labels{/name}","releases_url":"https://api.github.com/repos/ddebree/generator-jhipster/releases{/id}","created_at":"2015-02-22T10:07:02Z","updated_at":"2015-02-22T10:07:03Z","pushed_at":"2015-02-22T10:18:03Z","git_url":"git://github.com/ddebree/generator-jhipster.git","ssh_url":"git@github.com:ddebree/generator-jhipster.git","clone_url":"https://github.com/ddebree/generator-jhipster.git","svn_url":"https://github.com/ddebree/generator-jhipster","homepage":"http://jhipster.github.io","size":5429,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jhipster:master","ref":"master","sha":"cb1ce2904b058e9257616a638791394316c01b43","user":{"login":"jhipster","id":6059488,"avatar_url":"https://avatars.githubusercontent.com/u/6059488?v=3","gravatar_id":"","url":"https://api.github.com/users/jhipster","html_url":"https://github.com/jhipster","followers_url":"https://api.github.com/users/jhipster/followers","following_url":"https://api.github.com/users/jhipster/following{/other_user}","gists_url":"https://api.github.com/users/jhipster/gists{/gist_id}","starred_url":"https://api.github.com/users/jhipster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhipster/subscriptions","organizations_url":"https://api.github.com/users/jhipster/orgs","repos_url":"https://api.github.com/users/jhipster/repos","events_url":"https://api.github.com/users/jhipster/events{/privacy}","received_events_url":"https://api.github.com/users/jhipster/received_events","type":"Organization","site_admin":false},"repo":{"id":13753636,"name":"generator-jhipster","full_name":"jhipster/generator-jhipster","owner":{"login":"jhipster","id":6059488,"avatar_url":"https://avatars.githubusercontent.com/u/6059488?v=3","gravatar_id":"","url":"https://api.github.com/users/jhipster","html_url":"https://github.com/jhipster","followers_url":"https://api.github.com/users/jhipster/followers","following_url":"https://api.github.com/users/jhipster/following{/other_user}","gists_url":"https://api.github.com/users/jhipster/gists{/gist_id}","starred_url":"https://api.github.com/users/jhipster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhipster/subscriptions","organizations_url":"https://api.github.com/users/jhipster/orgs","repos_url":"https://api.github.com/users/jhipster/repos","events_url":"https://api.github.com/users/jhipster/events{/privacy}","received_events_url":"https://api.github.com/users/jhipster/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jhipster/generator-jhipster","description":"Hipster stack for Java developers. Yeoman + Maven + Spring + AngularJS in one handy generator.","fork":false,"url":"https://api.github.com/repos/jhipster/generator-jhipster","forks_url":"https://api.github.com/repos/jhipster/generator-jhipster/forks","keys_url":"https://api.github.com/repos/jhipster/generator-jhipster/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jhipster/generator-jhipster/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jhipster/generator-jhipster/teams","hooks_url":"https://api.github.com/repos/jhipster/generator-jhipster/hooks","issue_events_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/events{/number}","events_url":"https://api.github.com/repos/jhipster/generator-jhipster/events","assignees_url":"https://api.github.com/repos/jhipster/generator-jhipster/assignees{/user}","branches_url":"https://api.github.com/repos/jhipster/generator-jhipster/branches{/branch}","tags_url":"https://api.github.com/repos/jhipster/generator-jhipster/tags","blobs_url":"https://api.github.com/repos/jhipster/generator-jhipster/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jhipster/generator-jhipster/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jhipster/generator-jhipster/git/refs{/sha}","trees_url":"https://api.github.com/repos/jhipster/generator-jhipster/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jhipster/generator-jhipster/statuses/{sha}","languages_url":"https://api.github.com/repos/jhipster/generator-jhipster/languages","stargazers_url":"https://api.github.com/repos/jhipster/generator-jhipster/stargazers","contributors_url":"https://api.github.com/repos/jhipster/generator-jhipster/contributors","subscribers_url":"https://api.github.com/repos/jhipster/generator-jhipster/subscribers","subscription_url":"https://api.github.com/repos/jhipster/generator-jhipster/subscription","commits_url":"https://api.github.com/repos/jhipster/generator-jhipster/commits{/sha}","git_commits_url":"https://api.github.com/repos/jhipster/generator-jhipster/git/commits{/sha}","comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/comments{/number}","issue_comment_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/comments{/number}","contents_url":"https://api.github.com/repos/jhipster/generator-jhipster/contents/{+path}","compare_url":"https://api.github.com/repos/jhipster/generator-jhipster/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jhipster/generator-jhipster/merges","archive_url":"https://api.github.com/repos/jhipster/generator-jhipster/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jhipster/generator-jhipster/downloads","issues_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues{/number}","pulls_url":"https://api.github.com/repos/jhipster/generator-jhipster/pulls{/number}","milestones_url":"https://api.github.com/repos/jhipster/generator-jhipster/milestones{/number}","notifications_url":"https://api.github.com/repos/jhipster/generator-jhipster/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jhipster/generator-jhipster/labels{/name}","releases_url":"https://api.github.com/repos/jhipster/generator-jhipster/releases{/id}","created_at":"2013-10-21T20:07:22Z","updated_at":"2015-03-05T11:59:30Z","pushed_at":"2015-03-05T12:41:07Z","git_url":"git://github.com/jhipster/generator-jhipster.git","ssh_url":"git@github.com:jhipster/generator-jhipster.git","clone_url":"https://github.com/jhipster/generator-jhipster.git","svn_url":"https://github.com/jhipster/generator-jhipster","homepage":"http://jhipster.github.io","size":13196,"stargazers_count":1679,"watchers_count":1679,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":363,"mirror_url":null,"open_issues_count":29,"forks":363,"open_issues":29,"watchers":1679,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/1177"},"html":{"href":"https://github.com/jhipster/generator-jhipster/pull/1177"},"issue":{"href":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1177"},"comments":{"href":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1177/comments"},"review_comments":{"href":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/1177/comments"},"review_comment":{"href":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/1177/commits"},"statuses":{"href":"https://api.github.com/repos/jhipster/generator-jhipster/statuses/340c8ad97216369420d98493610f836a7e7eef0b"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"jdubois","id":316835,"avatar_url":"https://avatars.githubusercontent.com/u/316835?v=3","gravatar_id":"","url":"https://api.github.com/users/jdubois","html_url":"https://github.com/jdubois","followers_url":"https://api.github.com/users/jdubois/followers","following_url":"https://api.github.com/users/jdubois/following{/other_user}","gists_url":"https://api.github.com/users/jdubois/gists{/gist_id}","starred_url":"https://api.github.com/users/jdubois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdubois/subscriptions","organizations_url":"https://api.github.com/users/jdubois/orgs","repos_url":"https://api.github.com/users/jdubois/repos","events_url":"https://api.github.com/users/jdubois/events{/privacy}","received_events_url":"https://api.github.com/users/jdubois/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":3,"deletions":2,"changed_files":1}}