{"action":"created","comment":{"url":"https://api.github.com/repos/macfol/Kamienica/pulls/comments/121460344","pull_request_review_id":43490463,"id":121460344,"diff_hunk":"@@ -21,31 +19,39 @@\n public class OwnerUserDataService implements IOwnerUserDataService {\n \n     private final IApartmentDao apartmentDao;\n-    private final IReadingDao readingDao;\n+    private final IReadingDetailsDao readingDetailsDao;\n \n     @Autowired\n-    public OwnerUserDataService(IApartmentDao apartmentDao, IReadingDao readingDao) {\n+    public OwnerUserDataService(final IApartmentDao apartmentDao, final IReadingDetailsDao readingDetailsDao) {\n         this.apartmentDao = apartmentDao;\n-        this.readingDao = readingDao;\n+        this.readingDetailsDao = readingDetailsDao;\n     }\n \n     @Override\n     public HashMap<String, Object> getMainData() {\n+        final OwnerData data = new OwnerData();\n         HashMap<String, Object> model = new HashMap<>();\n-        model.put(\"emptyApartments\", \"Brak danych\");\n+        model.put(\"emptyApartments\", countEmptyApartments());\n         addLatestReadings(model);\n         checkConfig(model);\n         return model;\n     }\n \n+    private int countEmptyApartments() {\n+    List<Residence> residences = SecurityDetails.getResidencesForOwner();\n+    apartmentDao.getBySQLQuery(\"from Apartment where resicence_id in (:res)\");\n+","path":"src/main/java/kamienica/feature/owner/OwnerUserDataService.java","position":42,"original_position":42,"commit_id":"eac8608ac1cc3f63c7abd395fa34f44a986f68f1","original_commit_id":"eac8608ac1cc3f63c7abd395fa34f44a986f68f1","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars2.githubusercontent.com/u/19940114?v=3","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Avoid unused local variables such as 'residences'.](https://www.codacy.com/app/macfol/Kamienica/pullRequest?prid=705763)","created_at":"2017-06-12T16:25:02Z","updated_at":"2017-06-12T16:25:02Z","html_url":"https://github.com/macfol/Kamienica/pull/164#discussion_r121460344","pull_request_url":"https://api.github.com/repos/macfol/Kamienica/pulls/164","_links":{"self":{"href":"https://api.github.com/repos/macfol/Kamienica/pulls/comments/121460344"},"html":{"href":"https://github.com/macfol/Kamienica/pull/164#discussion_r121460344"},"pull_request":{"href":"https://api.github.com/repos/macfol/Kamienica/pulls/164"}}},"pull_request":{"url":"https://api.github.com/repos/macfol/Kamienica/pulls/164","id":125171419,"html_url":"https://github.com/macfol/Kamienica/pull/164","diff_url":"https://github.com/macfol/Kamienica/pull/164.diff","patch_url":"https://github.com/macfol/Kamienica/pull/164.patch","issue_url":"https://api.github.com/repos/macfol/Kamienica/issues/164","number":164,"state":"open","locked":false,"title":"Admin data on main page restored","user":{"login":"macfol","id":12062146,"avatar_url":"https://avatars0.githubusercontent.com/u/12062146?v=3","gravatar_id":"","url":"https://api.github.com/users/macfol","html_url":"https://github.com/macfol","followers_url":"https://api.github.com/users/macfol/followers","following_url":"https://api.github.com/users/macfol/following{/other_user}","gists_url":"https://api.github.com/users/macfol/gists{/gist_id}","starred_url":"https://api.github.com/users/macfol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macfol/subscriptions","organizations_url":"https://api.github.com/users/macfol/orgs","repos_url":"https://api.github.com/users/macfol/repos","events_url":"https://api.github.com/users/macfol/events{/privacy}","received_events_url":"https://api.github.com/users/macfol/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-06-12T15:59:36Z","updated_at":"2017-06-12T16:25:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a721f748c0d0dfd165349ffcaa2cf63a5b097c7","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/macfol/Kamienica/pulls/164/commits","review_comments_url":"https://api.github.com/repos/macfol/Kamienica/pulls/164/comments","review_comment_url":"https://api.github.com/repos/macfol/Kamienica/pulls/comments{/number}","comments_url":"https://api.github.com/repos/macfol/Kamienica/issues/164/comments","statuses_url":"https://api.github.com/repos/macfol/Kamienica/statuses/eac8608ac1cc3f63c7abd395fa34f44a986f68f1","head":{"label":"macfol:feature/#162_adminData","ref":"feature/#162_adminData","sha":"eac8608ac1cc3f63c7abd395fa34f44a986f68f1","user":{"login":"macfol","id":12062146,"avatar_url":"https://avatars0.githubusercontent.com/u/12062146?v=3","gravatar_id":"","url":"https://api.github.com/users/macfol","html_url":"https://github.com/macfol","followers_url":"https://api.github.com/users/macfol/followers","following_url":"https://api.github.com/users/macfol/following{/other_user}","gists_url":"https://api.github.com/users/macfol/gists{/gist_id}","starred_url":"https://api.github.com/users/macfol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macfol/subscriptions","organizations_url":"https://api.github.com/users/macfol/orgs","repos_url":"https://api.github.com/users/macfol/repos","events_url":"https://api.github.com/users/macfol/events{/privacy}","received_events_url":"https://api.github.com/users/macfol/received_events","type":"User","site_admin":false},"repo":{"id":50240855,"name":"Kamienica","full_name":"macfol/Kamienica","owner":{"login":"macfol","id":12062146,"avatar_url":"https://avatars0.githubusercontent.com/u/12062146?v=3","gravatar_id":"","url":"https://api.github.com/users/macfol","html_url":"https://github.com/macfol","followers_url":"https://api.github.com/users/macfol/followers","following_url":"https://api.github.com/users/macfol/following{/other_user}","gists_url":"https://api.github.com/users/macfol/gists{/gist_id}","starred_url":"https://api.github.com/users/macfol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macfol/subscriptions","organizations_url":"https://api.github.com/users/macfol/orgs","repos_url":"https://api.github.com/users/macfol/repos","events_url":"https://api.github.com/users/macfol/events{/privacy}","received_events_url":"https://api.github.com/users/macfol/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/macfol/Kamienica","description":null,"fork":false,"url":"https://api.github.com/repos/macfol/Kamienica","forks_url":"https://api.github.com/repos/macfol/Kamienica/forks","keys_url":"https://api.github.com/repos/macfol/Kamienica/keys{/key_id}","collaborators_url":"https://api.github.com/repos/macfol/Kamienica/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/macfol/Kamienica/teams","hooks_url":"https://api.github.com/repos/macfol/Kamienica/hooks","issue_events_url":"https://api.github.com/repos/macfol/Kamienica/issues/events{/number}","events_url":"https://api.github.com/repos/macfol/Kamienica/events","assignees_url":"https://api.github.com/repos/macfol/Kamienica/assignees{/user}","branches_url":"https://api.github.com/repos/macfol/Kamienica/branches{/branch}","tags_url":"https://api.github.com/repos/macfol/Kamienica/tags","blobs_url":"https://api.github.com/repos/macfol/Kamienica/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/macfol/Kamienica/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/macfol/Kamienica/git/refs{/sha}","trees_url":"https://api.github.com/repos/macfol/Kamienica/git/trees{/sha}","statuses_url":"https://api.github.com/repos/macfol/Kamienica/statuses/{sha}","languages_url":"https://api.github.com/repos/macfol/Kamienica/languages","stargazers_url":"https://api.github.com/repos/macfol/Kamienica/stargazers","contributors_url":"https://api.github.com/repos/macfol/Kamienica/contributors","subscribers_url":"https://api.github.com/repos/macfol/Kamienica/subscribers","subscription_url":"https://api.github.com/repos/macfol/Kamienica/subscription","commits_url":"https://api.github.com/repos/macfol/Kamienica/commits{/sha}","git_commits_url":"https://api.github.com/repos/macfol/Kamienica/git/commits{/sha}","comments_url":"https://api.github.com/repos/macfol/Kamienica/comments{/number}","issue_comment_url":"https://api.github.com/repos/macfol/Kamienica/issues/comments{/number}","contents_url":"https://api.github.com/repos/macfol/Kamienica/contents/{+path}","compare_url":"https://api.github.com/repos/macfol/Kamienica/compare/{base}...{head}","merges_url":"https://api.github.com/repos/macfol/Kamienica/merges","archive_url":"https://api.github.com/repos/macfol/Kamienica/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/macfol/Kamienica/downloads","issues_url":"https://api.github.com/repos/macfol/Kamienica/issues{/number}","pulls_url":"https://api.github.com/repos/macfol/Kamienica/pulls{/number}","milestones_url":"https://api.github.com/repos/macfol/Kamienica/milestones{/number}","notifications_url":"https://api.github.com/repos/macfol/Kamienica/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/macfol/Kamienica/labels{/name}","releases_url":"https://api.github.com/repos/macfol/Kamienica/releases{/id}","deployments_url":"https://api.github.com/repos/macfol/Kamienica/deployments","created_at":"2016-01-23T14:04:59Z","updated_at":"2016-11-20T12:21:45Z","pushed_at":"2017-06-12T15:59:37Z","git_url":"git://github.com/macfol/Kamienica.git","ssh_url":"git@github.com:macfol/Kamienica.git","clone_url":"https://github.com/macfol/Kamienica.git","svn_url":"https://github.com/macfol/Kamienica","homepage":null,"size":3214,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":19,"forks":0,"open_issues":19,"watchers":1,"default_branch":"master"}},"base":{"label":"macfol:release/1.2","ref":"release/1.2","sha":"2e729f78cf70e9ac2767c4a453ae2193ff78f2d2","user":{"login":"macfol","id":12062146,"avatar_url":"https://avatars0.githubusercontent.com/u/12062146?v=3","gravatar_id":"","url":"https://api.github.com/users/macfol","html_url":"https://github.com/macfol","followers_url":"https://api.github.com/users/macfol/followers","following_url":"https://api.github.com/users/macfol/following{/other_user}","gists_url":"https://api.github.com/users/macfol/gists{/gist_id}","starred_url":"https://api.github.com/users/macfol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macfol/subscriptions","organizations_url":"https://api.github.com/users/macfol/orgs","repos_url":"https://api.github.com/users/macfol/repos","events_url":"https://api.github.com/users/macfol/events{/privacy}","received_events_url":"https://api.github.com/users/macfol/received_events","type":"User","site_admin":false},"repo":{"id":50240855,"name":"Kamienica","full_name":"macfol/Kamienica","owner":{"login":"macfol","id":12062146,"avatar_url":"https://avatars0.githubusercontent.com/u/12062146?v=3","gravatar_id":"","url":"https://api.github.com/users/macfol","html_url":"https://github.com/macfol","followers_url":"https://api.github.com/users/macfol/followers","following_url":"https://api.github.com/users/macfol/following{/other_user}","gists_url":"https://api.github.com/users/macfol/gists{/gist_id}","starred_url":"https://api.github.com/users/macfol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macfol/subscriptions","organizations_url":"https://api.github.com/users/macfol/orgs","repos_url":"https://api.github.com/users/macfol/repos","events_url":"https://api.github.com/users/macfol/events{/privacy}","received_events_url":"https://api.github.com/users/macfol/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/macfol/Kamienica","description":null,"fork":false,"url":"https://api.github.com/repos/macfol/Kamienica","forks_url":"https://api.github.com/repos/macfol/Kamienica/forks","keys_url":"https://api.github.com/repos/macfol/Kamienica/keys{/key_id}","collaborators_url":"https://api.github.com/repos/macfol/Kamienica/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/macfol/Kamienica/teams","hooks_url":"https://api.github.com/repos/macfol/Kamienica/hooks","issue_events_url":"https://api.github.com/repos/macfol/Kamienica/issues/events{/number}","events_url":"https://api.github.com/repos/macfol/Kamienica/events","assignees_url":"https://api.github.com/repos/macfol/Kamienica/assignees{/user}","branches_url":"https://api.github.com/repos/macfol/Kamienica/branches{/branch}","tags_url":"https://api.github.com/repos/macfol/Kamienica/tags","blobs_url":"https://api.github.com/repos/macfol/Kamienica/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/macfol/Kamienica/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/macfol/Kamienica/git/refs{/sha}","trees_url":"https://api.github.com/repos/macfol/Kamienica/git/trees{/sha}","statuses_url":"https://api.github.com/repos/macfol/Kamienica/statuses/{sha}","languages_url":"https://api.github.com/repos/macfol/Kamienica/languages","stargazers_url":"https://api.github.com/repos/macfol/Kamienica/stargazers","contributors_url":"https://api.github.com/repos/macfol/Kamienica/contributors","subscribers_url":"https://api.github.com/repos/macfol/Kamienica/subscribers","subscription_url":"https://api.github.com/repos/macfol/Kamienica/subscription","commits_url":"https://api.github.com/repos/macfol/Kamienica/commits{/sha}","git_commits_url":"https://api.github.com/repos/macfol/Kamienica/git/commits{/sha}","comments_url":"https://api.github.com/repos/macfol/Kamienica/comments{/number}","issue_comment_url":"https://api.github.com/repos/macfol/Kamienica/issues/comments{/number}","contents_url":"https://api.github.com/repos/macfol/Kamienica/contents/{+path}","compare_url":"https://api.github.com/repos/macfol/Kamienica/compare/{base}...{head}","merges_url":"https://api.github.com/repos/macfol/Kamienica/merges","archive_url":"https://api.github.com/repos/macfol/Kamienica/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/macfol/Kamienica/downloads","issues_url":"https://api.github.com/repos/macfol/Kamienica/issues{/number}","pulls_url":"https://api.github.com/repos/macfol/Kamienica/pulls{/number}","milestones_url":"https://api.github.com/repos/macfol/Kamienica/milestones{/number}","notifications_url":"https://api.github.com/repos/macfol/Kamienica/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/macfol/Kamienica/labels{/name}","releases_url":"https://api.github.com/repos/macfol/Kamienica/releases{/id}","deployments_url":"https://api.github.com/repos/macfol/Kamienica/deployments","created_at":"2016-01-23T14:04:59Z","updated_at":"2016-11-20T12:21:45Z","pushed_at":"2017-06-12T15:59:37Z","git_url":"git://github.com/macfol/Kamienica.git","ssh_url":"git@github.com:macfol/Kamienica.git","clone_url":"https://github.com/macfol/Kamienica.git","svn_url":"https://github.com/macfol/Kamienica","homepage":null,"size":3214,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":19,"forks":0,"open_issues":19,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/macfol/Kamienica/pulls/164"},"html":{"href":"https://github.com/macfol/Kamienica/pull/164"},"issue":{"href":"https://api.github.com/repos/macfol/Kamienica/issues/164"},"comments":{"href":"https://api.github.com/repos/macfol/Kamienica/issues/164/comments"},"review_comments":{"href":"https://api.github.com/repos/macfol/Kamienica/pulls/164/comments"},"review_comment":{"href":"https://api.github.com/repos/macfol/Kamienica/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/macfol/Kamienica/pulls/164/commits"},"statuses":{"href":"https://api.github.com/repos/macfol/Kamienica/statuses/eac8608ac1cc3f63c7abd395fa34f44a986f68f1"}}}}
{"actor":{"display_login":"codacy-bot"}}