{"action":"created","comment":{"url":"https://api.github.com/repos/OSGP/Platform/pulls/comments/49458302","id":49458302,"diff_hunk":"@@ -41,8 +46,17 @@ public Device searchActiveDevice(@Identification final String deviceIdentificati\n             throws UnregisteredDeviceException, UnknownEntityException {\n \n         final Device device = this.searchDevice(deviceIdentification);\n+        final Ssld ssld = this.ssldRepository.findOne(device.getId());\n+\n+        // Note: since this code is still specific for SSLD / PSLD, this null\n+        // check is needed.\n+        if (ssld != null) {\n+            if (!device.isActivated() || !ssld.isPublicKeyPresent()) {","path":"osgp-domain-core/src/main/java/com/alliander/osgp/domain/core/services/DeviceDomainService.java","position":31,"original_position":31,"commit_id":"7e2c8ac35958d555a0f2b96783232c157f872aca","original_commit_id":"7e2c8ac35958d555a0f2b96783232c157f872aca","user":{"login":"jenkins-ip-10-4-24-184","id":12208121,"avatar_url":"https://avatars.githubusercontent.com/u/12208121?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkins-ip-10-4-24-184","html_url":"https://github.com/jenkins-ip-10-4-24-184","followers_url":"https://api.github.com/users/jenkins-ip-10-4-24-184/followers","following_url":"https://api.github.com/users/jenkins-ip-10-4-24-184/following{/other_user}","gists_url":"https://api.github.com/users/jenkins-ip-10-4-24-184/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkins-ip-10-4-24-184/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkins-ip-10-4-24-184/subscriptions","organizations_url":"https://api.github.com/users/jenkins-ip-10-4-24-184/orgs","repos_url":"https://api.github.com/users/jenkins-ip-10-4-24-184/repos","events_url":"https://api.github.com/users/jenkins-ip-10-4-24-184/events{/privacy}","received_events_url":"https://api.github.com/users/jenkins-ip-10-4-24-184/received_events","type":"User","site_admin":false},"body":"![MAJOR](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/severity-major.png) Merge this if statement with the enclosing one. [![rule](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/rule.png)](http://54.77.62.182/coding_rules#rule_key=squid%3AS1066)\n","created_at":"2016-01-12T14:17:39Z","updated_at":"2016-01-12T14:17:39Z","html_url":"https://github.com/OSGP/Platform/pull/313#discussion_r49458302","pull_request_url":"https://api.github.com/repos/OSGP/Platform/pulls/313","_links":{"self":{"href":"https://api.github.com/repos/OSGP/Platform/pulls/comments/49458302"},"html":{"href":"https://github.com/OSGP/Platform/pull/313#discussion_r49458302"},"pull_request":{"href":"https://api.github.com/repos/OSGP/Platform/pulls/313"}}},"pull_request":{"url":"https://api.github.com/repos/OSGP/Platform/pulls/313","id":55760856,"html_url":"https://github.com/OSGP/Platform/pull/313","diff_url":"https://github.com/OSGP/Platform/pull/313.diff","patch_url":"https://github.com/OSGP/Platform/pull/313.patch","issue_url":"https://api.github.com/repos/OSGP/Platform/issues/313","number":313,"state":"open","locked":false,"title":"Changes domain model to use inheritance.","user":{"login":"kevinsmeets","id":11557950,"avatar_url":"https://avatars.githubusercontent.com/u/11557950?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinsmeets","html_url":"https://github.com/kevinsmeets","followers_url":"https://api.github.com/users/kevinsmeets/followers","following_url":"https://api.github.com/users/kevinsmeets/following{/other_user}","gists_url":"https://api.github.com/users/kevinsmeets/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinsmeets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinsmeets/subscriptions","organizations_url":"https://api.github.com/users/kevinsmeets/orgs","repos_url":"https://api.github.com/users/kevinsmeets/repos","events_url":"https://api.github.com/users/kevinsmeets/events{/privacy}","received_events_url":"https://api.github.com/users/kevinsmeets/received_events","type":"User","site_admin":false},"body":"- Device is a generic base class\r\n- Ssld is a specific class for SSLD's and PSLD's\r\n- SmartMeter is a specific class for Smart Meters","created_at":"2016-01-12T13:59:07Z","updated_at":"2016-01-12T14:17:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a7f8424987027c3b4378178b325a371d74e8446","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OSGP/Platform/pulls/313/commits","review_comments_url":"https://api.github.com/repos/OSGP/Platform/pulls/313/comments","review_comment_url":"https://api.github.com/repos/OSGP/Platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OSGP/Platform/issues/313/comments","statuses_url":"https://api.github.com/repos/OSGP/Platform/statuses/7e2c8ac35958d555a0f2b96783232c157f872aca","head":{"label":"OSGP:feat-domain-entities","ref":"feat-domain-entities","sha":"7e2c8ac35958d555a0f2b96783232c157f872aca","user":{"login":"OSGP","id":11352045,"avatar_url":"https://avatars.githubusercontent.com/u/11352045?v=3","gravatar_id":"","url":"https://api.github.com/users/OSGP","html_url":"https://github.com/OSGP","followers_url":"https://api.github.com/users/OSGP/followers","following_url":"https://api.github.com/users/OSGP/following{/other_user}","gists_url":"https://api.github.com/users/OSGP/gists{/gist_id}","starred_url":"https://api.github.com/users/OSGP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSGP/subscriptions","organizations_url":"https://api.github.com/users/OSGP/orgs","repos_url":"https://api.github.com/users/OSGP/repos","events_url":"https://api.github.com/users/OSGP/events{/privacy}","received_events_url":"https://api.github.com/users/OSGP/received_events","type":"Organization","site_admin":false},"repo":{"id":32739388,"name":"Platform","full_name":"OSGP/Platform","owner":{"login":"OSGP","id":11352045,"avatar_url":"https://avatars.githubusercontent.com/u/11352045?v=3","gravatar_id":"","url":"https://api.github.com/users/OSGP","html_url":"https://github.com/OSGP","followers_url":"https://api.github.com/users/OSGP/followers","following_url":"https://api.github.com/users/OSGP/following{/other_user}","gists_url":"https://api.github.com/users/OSGP/gists{/gist_id}","starred_url":"https://api.github.com/users/OSGP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSGP/subscriptions","organizations_url":"https://api.github.com/users/OSGP/orgs","repos_url":"https://api.github.com/users/OSGP/repos","events_url":"https://api.github.com/users/OSGP/events{/privacy}","received_events_url":"https://api.github.com/users/OSGP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OSGP/Platform","description":"The main components of OSGP.","fork":false,"url":"https://api.github.com/repos/OSGP/Platform","forks_url":"https://api.github.com/repos/OSGP/Platform/forks","keys_url":"https://api.github.com/repos/OSGP/Platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OSGP/Platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OSGP/Platform/teams","hooks_url":"https://api.github.com/repos/OSGP/Platform/hooks","issue_events_url":"https://api.github.com/repos/OSGP/Platform/issues/events{/number}","events_url":"https://api.github.com/repos/OSGP/Platform/events","assignees_url":"https://api.github.com/repos/OSGP/Platform/assignees{/user}","branches_url":"https://api.github.com/repos/OSGP/Platform/branches{/branch}","tags_url":"https://api.github.com/repos/OSGP/Platform/tags","blobs_url":"https://api.github.com/repos/OSGP/Platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OSGP/Platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OSGP/Platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/OSGP/Platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OSGP/Platform/statuses/{sha}","languages_url":"https://api.github.com/repos/OSGP/Platform/languages","stargazers_url":"https://api.github.com/repos/OSGP/Platform/stargazers","contributors_url":"https://api.github.com/repos/OSGP/Platform/contributors","subscribers_url":"https://api.github.com/repos/OSGP/Platform/subscribers","subscription_url":"https://api.github.com/repos/OSGP/Platform/subscription","commits_url":"https://api.github.com/repos/OSGP/Platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/OSGP/Platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/OSGP/Platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/OSGP/Platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/OSGP/Platform/contents/{+path}","compare_url":"https://api.github.com/repos/OSGP/Platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OSGP/Platform/merges","archive_url":"https://api.github.com/repos/OSGP/Platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OSGP/Platform/downloads","issues_url":"https://api.github.com/repos/OSGP/Platform/issues{/number}","pulls_url":"https://api.github.com/repos/OSGP/Platform/pulls{/number}","milestones_url":"https://api.github.com/repos/OSGP/Platform/milestones{/number}","notifications_url":"https://api.github.com/repos/OSGP/Platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OSGP/Platform/labels{/name}","releases_url":"https://api.github.com/repos/OSGP/Platform/releases{/id}","created_at":"2015-03-23T15:05:40Z","updated_at":"2015-12-09T15:31:36Z","pushed_at":"2016-01-12T13:59:08Z","git_url":"git://github.com/OSGP/Platform.git","ssh_url":"git@github.com:OSGP/Platform.git","clone_url":"https://github.com/OSGP/Platform.git","svn_url":"https://github.com/OSGP/Platform","homepage":null,"size":24817,"stargazers_count":7,"watchers_count":7,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":92,"forks":3,"open_issues":92,"watchers":7,"default_branch":"development"}},"base":{"label":"OSGP:development","ref":"development","sha":"156e7628792bef790577cbb770e33239afd52983","user":{"login":"OSGP","id":11352045,"avatar_url":"https://avatars.githubusercontent.com/u/11352045?v=3","gravatar_id":"","url":"https://api.github.com/users/OSGP","html_url":"https://github.com/OSGP","followers_url":"https://api.github.com/users/OSGP/followers","following_url":"https://api.github.com/users/OSGP/following{/other_user}","gists_url":"https://api.github.com/users/OSGP/gists{/gist_id}","starred_url":"https://api.github.com/users/OSGP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSGP/subscriptions","organizations_url":"https://api.github.com/users/OSGP/orgs","repos_url":"https://api.github.com/users/OSGP/repos","events_url":"https://api.github.com/users/OSGP/events{/privacy}","received_events_url":"https://api.github.com/users/OSGP/received_events","type":"Organization","site_admin":false},"repo":{"id":32739388,"name":"Platform","full_name":"OSGP/Platform","owner":{"login":"OSGP","id":11352045,"avatar_url":"https://avatars.githubusercontent.com/u/11352045?v=3","gravatar_id":"","url":"https://api.github.com/users/OSGP","html_url":"https://github.com/OSGP","followers_url":"https://api.github.com/users/OSGP/followers","following_url":"https://api.github.com/users/OSGP/following{/other_user}","gists_url":"https://api.github.com/users/OSGP/gists{/gist_id}","starred_url":"https://api.github.com/users/OSGP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSGP/subscriptions","organizations_url":"https://api.github.com/users/OSGP/orgs","repos_url":"https://api.github.com/users/OSGP/repos","events_url":"https://api.github.com/users/OSGP/events{/privacy}","received_events_url":"https://api.github.com/users/OSGP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OSGP/Platform","description":"The main components of OSGP.","fork":false,"url":"https://api.github.com/repos/OSGP/Platform","forks_url":"https://api.github.com/repos/OSGP/Platform/forks","keys_url":"https://api.github.com/repos/OSGP/Platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OSGP/Platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OSGP/Platform/teams","hooks_url":"https://api.github.com/repos/OSGP/Platform/hooks","issue_events_url":"https://api.github.com/repos/OSGP/Platform/issues/events{/number}","events_url":"https://api.github.com/repos/OSGP/Platform/events","assignees_url":"https://api.github.com/repos/OSGP/Platform/assignees{/user}","branches_url":"https://api.github.com/repos/OSGP/Platform/branches{/branch}","tags_url":"https://api.github.com/repos/OSGP/Platform/tags","blobs_url":"https://api.github.com/repos/OSGP/Platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OSGP/Platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OSGP/Platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/OSGP/Platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OSGP/Platform/statuses/{sha}","languages_url":"https://api.github.com/repos/OSGP/Platform/languages","stargazers_url":"https://api.github.com/repos/OSGP/Platform/stargazers","contributors_url":"https://api.github.com/repos/OSGP/Platform/contributors","subscribers_url":"https://api.github.com/repos/OSGP/Platform/subscribers","subscription_url":"https://api.github.com/repos/OSGP/Platform/subscription","commits_url":"https://api.github.com/repos/OSGP/Platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/OSGP/Platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/OSGP/Platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/OSGP/Platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/OSGP/Platform/contents/{+path}","compare_url":"https://api.github.com/repos/OSGP/Platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OSGP/Platform/merges","archive_url":"https://api.github.com/repos/OSGP/Platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OSGP/Platform/downloads","issues_url":"https://api.github.com/repos/OSGP/Platform/issues{/number}","pulls_url":"https://api.github.com/repos/OSGP/Platform/pulls{/number}","milestones_url":"https://api.github.com/repos/OSGP/Platform/milestones{/number}","notifications_url":"https://api.github.com/repos/OSGP/Platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OSGP/Platform/labels{/name}","releases_url":"https://api.github.com/repos/OSGP/Platform/releases{/id}","created_at":"2015-03-23T15:05:40Z","updated_at":"2015-12-09T15:31:36Z","pushed_at":"2016-01-12T13:59:08Z","git_url":"git://github.com/OSGP/Platform.git","ssh_url":"git@github.com:OSGP/Platform.git","clone_url":"https://github.com/OSGP/Platform.git","svn_url":"https://github.com/OSGP/Platform","homepage":null,"size":24817,"stargazers_count":7,"watchers_count":7,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":92,"forks":3,"open_issues":92,"watchers":7,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/OSGP/Platform/pulls/313"},"html":{"href":"https://github.com/OSGP/Platform/pull/313"},"issue":{"href":"https://api.github.com/repos/OSGP/Platform/issues/313"},"comments":{"href":"https://api.github.com/repos/OSGP/Platform/issues/313/comments"},"review_comments":{"href":"https://api.github.com/repos/OSGP/Platform/pulls/313/comments"},"review_comment":{"href":"https://api.github.com/repos/OSGP/Platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OSGP/Platform/pulls/313/commits"},"statuses":{"href":"https://api.github.com/repos/OSGP/Platform/statuses/7e2c8ac35958d555a0f2b96783232c157f872aca"}}}}