{"action":"closed","number":17,"pull_request":{"url":"https://api.github.com/repos/c3pr/sample-project-java-maven/pulls/17","id":169806737,"html_url":"https://github.com/c3pr/sample-project-java-maven/pull/17","diff_url":"https://github.com/c3pr/sample-project-java-maven/pull/17.diff","patch_url":"https://github.com/c3pr/sample-project-java-maven/pull/17.patch","issue_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/issues/17","number":17,"state":"closed","locked":false,"title":"Strings literals should be placed on the left side when checking for equality","user":{"login":"c3pr-bot","id":36575346,"avatar_url":"https://avatars1.githubusercontent.com/u/36575346?v=4","gravatar_id":"","url":"https://api.github.com/users/c3pr-bot","html_url":"https://github.com/c3pr-bot","followers_url":"https://api.github.com/users/c3pr-bot/followers","following_url":"https://api.github.com/users/c3pr-bot/following{/other_user}","gists_url":"https://api.github.com/users/c3pr-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/c3pr-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c3pr-bot/subscriptions","organizations_url":"https://api.github.com/users/c3pr-bot/orgs","repos_url":"https://api.github.com/users/c3pr-bot/repos","events_url":"https://api.github.com/users/c3pr-bot/events{/privacy}","received_events_url":"https://api.github.com/users/c3pr-bot/received_events","type":"User","site_admin":false},"body":"\nIt is preferable to place string literals on the left-hand side of an `equals()` or `equalsIgnoreCase()` method call. This prevents null pointer exceptions from being raised, as a string literal can never be `null` by definition.\n\nThe following code:\n\n```java\nString myString = null;\n\nSystem.out.println(\"Equal? \" + myString.equals(\"foo\"));                        // Non-Compliant - will raise a NPE\nSystem.out.println(\"Equal? \" + (myString != null && myString.equals(\"foo\")));  // Non-Compliant - null check could be removed\n```\n\nshould be refactored into:\n\n```java\nSystem.out.println(\"Equal?\" + \"foo\".equals(myString));                         // Compliant - properly deals with the null case\n```\n","created_at":"2018-02-17T23:26:51Z","updated_at":"2018-03-03T02:06:54Z","closed_at":"2018-03-03T02:06:54Z","merged_at":null,"merge_commit_sha":"022debc583079913803a886dbff423996c759bbf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/pulls/17/commits","review_comments_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/pulls/17/comments","review_comment_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/pulls/comments{/number}","comments_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/issues/17/comments","statuses_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/statuses/53b40efde72d939c88fb0bf78fc895ea72be0823","head":{"label":"c3pr-bot:d117e0cdaf9bec32915ed24f63ea6db6bcd75a05_00ba9a03-7613-4d31-81af-4cb1246c7f0e","ref":"d117e0cdaf9bec32915ed24f63ea6db6bcd75a05_00ba9a03-7613-4d31-81af-4cb1246c7f0e","sha":"53b40efde72d939c88fb0bf78fc895ea72be0823","user":{"login":"c3pr-bot","id":36575346,"avatar_url":"https://avatars1.githubusercontent.com/u/36575346?v=4","gravatar_id":"","url":"https://api.github.com/users/c3pr-bot","html_url":"https://github.com/c3pr-bot","followers_url":"https://api.github.com/users/c3pr-bot/followers","following_url":"https://api.github.com/users/c3pr-bot/following{/other_user}","gists_url":"https://api.github.com/users/c3pr-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/c3pr-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c3pr-bot/subscriptions","organizations_url":"https://api.github.com/users/c3pr-bot/orgs","repos_url":"https://api.github.com/users/c3pr-bot/repos","events_url":"https://api.github.com/users/c3pr-bot/events{/privacy}","received_events_url":"https://api.github.com/users/c3pr-bot/received_events","type":"User","site_admin":false},"repo":{"id":121892248,"name":"sample-project-java-maven","full_name":"c3pr-bot/sample-project-java-maven","owner":{"login":"c3pr-bot","id":36575346,"avatar_url":"https://avatars1.githubusercontent.com/u/36575346?v=4","gravatar_id":"","url":"https://api.github.com/users/c3pr-bot","html_url":"https://github.com/c3pr-bot","followers_url":"https://api.github.com/users/c3pr-bot/followers","following_url":"https://api.github.com/users/c3pr-bot/following{/other_user}","gists_url":"https://api.github.com/users/c3pr-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/c3pr-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c3pr-bot/subscriptions","organizations_url":"https://api.github.com/users/c3pr-bot/orgs","repos_url":"https://api.github.com/users/c3pr-bot/repos","events_url":"https://api.github.com/users/c3pr-bot/events{/privacy}","received_events_url":"https://api.github.com/users/c3pr-bot/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/c3pr-bot/sample-project-java-maven","description":"Example Java+Maven Project","fork":true,"url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven","forks_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/forks","keys_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/keys{/key_id}","collaborators_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/teams","hooks_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/hooks","issue_events_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/issues/events{/number}","events_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/events","assignees_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/assignees{/user}","branches_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/branches{/branch}","tags_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/tags","blobs_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/git/refs{/sha}","trees_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/git/trees{/sha}","statuses_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/statuses/{sha}","languages_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/languages","stargazers_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/stargazers","contributors_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/contributors","subscribers_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/subscribers","subscription_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/subscription","commits_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/commits{/sha}","git_commits_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/git/commits{/sha}","comments_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/comments{/number}","issue_comment_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/issues/comments{/number}","contents_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/contents/{+path}","compare_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/compare/{base}...{head}","merges_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/merges","archive_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/downloads","issues_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/issues{/number}","pulls_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/pulls{/number}","milestones_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/milestones{/number}","notifications_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/labels{/name}","releases_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/releases{/id}","deployments_url":"https://api.github.com/repos/c3pr-bot/sample-project-java-maven/deployments","created_at":"2018-02-17T21:03:03Z","updated_at":"2018-02-17T21:03:05Z","pushed_at":"2018-02-17T23:26:51Z","git_url":"git://github.com/c3pr-bot/sample-project-java-maven.git","ssh_url":"git@github.com:c3pr-bot/sample-project-java-maven.git","clone_url":"https://github.com/c3pr-bot/sample-project-java-maven.git","svn_url":"https://github.com/c3pr-bot/sample-project-java-maven","homepage":null,"size":29,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"c3pr:master","ref":"master","sha":"d117e0cdaf9bec32915ed24f63ea6db6bcd75a05","user":{"login":"c3pr","id":31718198,"avatar_url":"https://avatars2.githubusercontent.com/u/31718198?v=4","gravatar_id":"","url":"https://api.github.com/users/c3pr","html_url":"https://github.com/c3pr","followers_url":"https://api.github.com/users/c3pr/followers","following_url":"https://api.github.com/users/c3pr/following{/other_user}","gists_url":"https://api.github.com/users/c3pr/gists{/gist_id}","starred_url":"https://api.github.com/users/c3pr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c3pr/subscriptions","organizations_url":"https://api.github.com/users/c3pr/orgs","repos_url":"https://api.github.com/users/c3pr/repos","events_url":"https://api.github.com/users/c3pr/events{/privacy}","received_events_url":"https://api.github.com/users/c3pr/received_events","type":"Organization","site_admin":false},"repo":{"id":115023553,"name":"sample-project-java-maven","full_name":"c3pr/sample-project-java-maven","owner":{"login":"c3pr","id":31718198,"avatar_url":"https://avatars2.githubusercontent.com/u/31718198?v=4","gravatar_id":"","url":"https://api.github.com/users/c3pr","html_url":"https://github.com/c3pr","followers_url":"https://api.github.com/users/c3pr/followers","following_url":"https://api.github.com/users/c3pr/following{/other_user}","gists_url":"https://api.github.com/users/c3pr/gists{/gist_id}","starred_url":"https://api.github.com/users/c3pr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c3pr/subscriptions","organizations_url":"https://api.github.com/users/c3pr/orgs","repos_url":"https://api.github.com/users/c3pr/repos","events_url":"https://api.github.com/users/c3pr/events{/privacy}","received_events_url":"https://api.github.com/users/c3pr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/c3pr/sample-project-java-maven","description":"Example Java+Maven Project","fork":false,"url":"https://api.github.com/repos/c3pr/sample-project-java-maven","forks_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/forks","keys_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/keys{/key_id}","collaborators_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/teams","hooks_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/hooks","issue_events_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/issues/events{/number}","events_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/events","assignees_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/assignees{/user}","branches_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/branches{/branch}","tags_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/tags","blobs_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/git/refs{/sha}","trees_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/git/trees{/sha}","statuses_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/statuses/{sha}","languages_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/languages","stargazers_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/stargazers","contributors_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/contributors","subscribers_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/subscribers","subscription_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/subscription","commits_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/commits{/sha}","git_commits_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/git/commits{/sha}","comments_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/comments{/number}","issue_comment_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/issues/comments{/number}","contents_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/contents/{+path}","compare_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/compare/{base}...{head}","merges_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/merges","archive_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/downloads","issues_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/issues{/number}","pulls_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/pulls{/number}","milestones_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/milestones{/number}","notifications_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/labels{/name}","releases_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/releases{/id}","deployments_url":"https://api.github.com/repos/c3pr/sample-project-java-maven/deployments","created_at":"2017-12-21T16:04:41Z","updated_at":"2017-12-21T16:11:56Z","pushed_at":"2018-02-17T23:26:52Z","git_url":"git://github.com/c3pr/sample-project-java-maven.git","ssh_url":"git@github.com:c3pr/sample-project-java-maven.git","clone_url":"https://github.com/c3pr/sample-project-java-maven.git","svn_url":"https://github.com/c3pr/sample-project-java-maven","homepage":null,"size":28,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":2,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/c3pr/sample-project-java-maven/pulls/17"},"html":{"href":"https://github.com/c3pr/sample-project-java-maven/pull/17"},"issue":{"href":"https://api.github.com/repos/c3pr/sample-project-java-maven/issues/17"},"comments":{"href":"https://api.github.com/repos/c3pr/sample-project-java-maven/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/c3pr/sample-project-java-maven/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/c3pr/sample-project-java-maven/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/c3pr/sample-project-java-maven/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/c3pr/sample-project-java-maven/statuses/53b40efde72d939c88fb0bf78fc895ea72be0823"}},"author_association":"NONE","merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"acdcjunior"}}