{"action":"created","issue":{"url":"https://api.github.com/repos/jhipster/jhipster-registry/issues/250","repository_url":"https://api.github.com/repos/jhipster/jhipster-registry","labels_url":"https://api.github.com/repos/jhipster/jhipster-registry/issues/250/labels{/name}","comments_url":"https://api.github.com/repos/jhipster/jhipster-registry/issues/250/comments","events_url":"https://api.github.com/repos/jhipster/jhipster-registry/issues/250/events","html_url":"https://github.com/jhipster/jhipster-registry/issues/250","id":303622936,"number":250,"title":"Strings literals should be placed on the left side when checking for equality","user":{"login":"Zalimben","id":6633933,"avatar_url":"https://avatars0.githubusercontent.com/u/6633933?v=4","gravatar_id":"","url":"https://api.github.com/users/Zalimben","html_url":"https://github.com/Zalimben","followers_url":"https://api.github.com/users/Zalimben/followers","following_url":"https://api.github.com/users/Zalimben/following{/other_user}","gists_url":"https://api.github.com/users/Zalimben/gists{/gist_id}","starred_url":"https://api.github.com/users/Zalimben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zalimben/subscriptions","organizations_url":"https://api.github.com/users/Zalimben/orgs","repos_url":"https://api.github.com/users/Zalimben/repos","events_url":"https://api.github.com/users/Zalimben/events{/privacy}","received_events_url":"https://api.github.com/users/Zalimben/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-08T20:37:00Z","updated_at":"2018-03-09T07:43:52Z","closed_at":null,"author_association":"NONE","body":"<!--\r\n- Please follow the issue template below for bug reports and feature requests.\r\n- If you have a support request rather than a bug, please use [Stack Overflow](http://stackoverflow.com/questions/tagged/jhipster) with the JHipster tag.\r\n- For bug reports it is mandatory to run the command `jhipster info` in your project's root folder, and paste the result here.\r\n- Tickets opened without any of these pieces of information will be **closed** without any explanation.\r\n-->\r\n\r\n##### **Overview of the issue**\r\nIt is preferable to place string literals on the left-hand side of an equals() or equalsIgnoreCase() method call.\r\n\r\n##### **Motivation for or Use Case**\r\nThis prevents null pointer exceptions from being raised, as a string literal can never be null by definition.\r\n\r\n<!-- Explain why this is a bug or a new feature for you -->\r\n\r\n##### **Suggest a Fix**\r\nPlace string literals on the left-hand side\r\nJHipsterRegistryApp.java#L:99\r\n<!-- For bug reports, if you can't fix the bug yourself, perhaps you can point to what might be\r\n  causing the problem (line of code or commit) -->\r\n\r\n- [x] Checking this box is mandatory (this is just to show you read everything)\r\n"},"comment":{"url":"https://api.github.com/repos/jhipster/jhipster-registry/issues/comments/371737777","html_url":"https://github.com/jhipster/jhipster-registry/issues/250#issuecomment-371737777","issue_url":"https://api.github.com/repos/jhipster/jhipster-registry/issues/250","id":371737777,"user":{"login":"jdubois","id":316835,"avatar_url":"https://avatars1.githubusercontent.com/u/316835?v=4","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},"created_at":"2018-03-09T07:43:52Z","updated_at":"2018-03-09T07:43:52Z","author_association":"OWNER","body":"I'm not such a big fan of this, I find the code less readable.\nAnd if code/test correctly that type of bug never happens.\n\nLe 9 mars 2018 7:56 AM, \"Pascal Grimaud\" <notifications@github.com> a\nécrit :\n\n> @Zalimben <https://github.com/zalimben> : would you like to contribute to\n> fix this ?\n>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/jhipster/jhipster-registry/issues/250#issuecomment-371729681>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AATVo4gNEJ236UB7N3bOcF0y39JTOi75ks5tcieHgaJpZM4SjTsO>\n> .\n>\n"}}
{"actor":{"display_login":"jdubois"}}