{"action":"created","comment":{"url":"https://api.github.com/repos/SberTechJavaSchool/Homework/pulls/comments/172628638","pull_request_review_id":101678115,"id":172628638,"diff_hunk":"@@ -0,0 +1,84 @@\n+package ru.sberbank.homework.bedarev.pin_processor;\n+\n+public class PinValidator {\n+    private final String pinCode = \"1234\";\n+    private int countInputPin =0;\n+    private boolean accountIsLocked = false;\n+    private int timer;\n+\n+\n+    public boolean validatePin(String userPinCode) {\n+        try {\n+            if (accountIsLocked && countInputPin == 2) {\n+                throw new AccountIsLockedException(\"Account is locked. Time left: \" + getTimer() + \" seconds\");\n+            }\n+\n+            if (userPinCode.equals(pinCode)) {\n+                System.out.println(\"Pin is valid\");\n+            }\n+\n+            if (!userPinCode.equals(pinCode)) {\n+                failedAttemptsCounter();\n+            }\n+\n+            return userPinCode.equals(pinCode);\n+\n+        } catch (AccountIsLockedException e) {\n+            System.out.println(e.getStackTrace());\n+        }\n+        return false;\n+    }\n+\n+    private int getCountInputPin() {\n+        return countInputPin;\n+    }\n+\n+    private void setCountInputPin(int countInputPin) {\n+        this.countInputPin = countInputPin;\n+    }\n+\n+    private int getTimer() {\n+        return timer;\n+    }\n+\n+\n+    private void setAccountIsLocked() {\n+        this.accountIsLocked = true;\n+\n+        new Thread(() ->{\n+\n+            try {\n+                for (this.timer=5;this.timer>0;this.timer--) {\n+                    Thread.sleep(1000);","path":"hw03/src/ru/sberbank/homework/bedarev/pin_processor/PinValidator.java","position":52,"original_position":52,"commit_id":"df563b3b4ca4ddd4f527b095c9f43d4443e14000","original_commit_id":"df563b3b4ca4ddd4f527b095c9f43d4443e14000","user":{"login":"roldevg","id":12239422,"avatar_url":"https://avatars1.githubusercontent.com/u/12239422?v=4","gravatar_id":"","url":"https://api.github.com/users/roldevg","html_url":"https://github.com/roldevg","followers_url":"https://api.github.com/users/roldevg/followers","following_url":"https://api.github.com/users/roldevg/following{/other_user}","gists_url":"https://api.github.com/users/roldevg/gists{/gist_id}","starred_url":"https://api.github.com/users/roldevg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roldevg/subscriptions","organizations_url":"https://api.github.com/users/roldevg/orgs","repos_url":"https://api.github.com/users/roldevg/repos","events_url":"https://api.github.com/users/roldevg/events{/privacy}","received_events_url":"https://api.github.com/users/roldevg/received_events","type":"User","site_admin":false},"body":"можно же просто сделать sleep на 5 секунд :)","created_at":"2018-03-06T19:16:21Z","updated_at":"2018-03-06T19:28:45Z","html_url":"https://github.com/SberTechJavaSchool/Homework/pull/112#discussion_r172628638","pull_request_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/pulls/112","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/SberTechJavaSchool/Homework/pulls/comments/172628638"},"html":{"href":"https://github.com/SberTechJavaSchool/Homework/pull/112#discussion_r172628638"},"pull_request":{"href":"https://api.github.com/repos/SberTechJavaSchool/Homework/pulls/112"}}},"pull_request":{"url":"https://api.github.com/repos/SberTechJavaSchool/Homework/pulls/112","id":173210530,"html_url":"https://github.com/SberTechJavaSchool/Homework/pull/112","diff_url":"https://github.com/SberTechJavaSchool/Homework/pull/112.diff","patch_url":"https://github.com/SberTechJavaSchool/Homework/pull/112.patch","issue_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/issues/112","number":112,"state":"open","locked":false,"title":"bedarev","user":{"login":"evbedarev","id":23324033,"avatar_url":"https://avatars3.githubusercontent.com/u/23324033?v=4","gravatar_id":"","url":"https://api.github.com/users/evbedarev","html_url":"https://github.com/evbedarev","followers_url":"https://api.github.com/users/evbedarev/followers","following_url":"https://api.github.com/users/evbedarev/following{/other_user}","gists_url":"https://api.github.com/users/evbedarev/gists{/gist_id}","starred_url":"https://api.github.com/users/evbedarev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evbedarev/subscriptions","organizations_url":"https://api.github.com/users/evbedarev/orgs","repos_url":"https://api.github.com/users/evbedarev/repos","events_url":"https://api.github.com/users/evbedarev/events{/privacy}","received_events_url":"https://api.github.com/users/evbedarev/received_events","type":"User","site_admin":false},"body":"homework 3","created_at":"2018-03-06T16:28:49Z","updated_at":"2018-03-06T19:28:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4f7a23d3b02ca7e2b113a84a5c5413d7d4a5f72c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/pulls/112/commits","review_comments_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/pulls/112/comments","review_comment_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/issues/112/comments","statuses_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/statuses/df563b3b4ca4ddd4f527b095c9f43d4443e14000","head":{"label":"evbedarev:bedarev","ref":"bedarev","sha":"df563b3b4ca4ddd4f527b095c9f43d4443e14000","user":{"login":"evbedarev","id":23324033,"avatar_url":"https://avatars3.githubusercontent.com/u/23324033?v=4","gravatar_id":"","url":"https://api.github.com/users/evbedarev","html_url":"https://github.com/evbedarev","followers_url":"https://api.github.com/users/evbedarev/followers","following_url":"https://api.github.com/users/evbedarev/following{/other_user}","gists_url":"https://api.github.com/users/evbedarev/gists{/gist_id}","starred_url":"https://api.github.com/users/evbedarev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evbedarev/subscriptions","organizations_url":"https://api.github.com/users/evbedarev/orgs","repos_url":"https://api.github.com/users/evbedarev/repos","events_url":"https://api.github.com/users/evbedarev/events{/privacy}","received_events_url":"https://api.github.com/users/evbedarev/received_events","type":"User","site_admin":false},"repo":{"id":124096521,"name":"Homework","full_name":"evbedarev/Homework","owner":{"login":"evbedarev","id":23324033,"avatar_url":"https://avatars3.githubusercontent.com/u/23324033?v=4","gravatar_id":"","url":"https://api.github.com/users/evbedarev","html_url":"https://github.com/evbedarev","followers_url":"https://api.github.com/users/evbedarev/followers","following_url":"https://api.github.com/users/evbedarev/following{/other_user}","gists_url":"https://api.github.com/users/evbedarev/gists{/gist_id}","starred_url":"https://api.github.com/users/evbedarev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evbedarev/subscriptions","organizations_url":"https://api.github.com/users/evbedarev/orgs","repos_url":"https://api.github.com/users/evbedarev/repos","events_url":"https://api.github.com/users/evbedarev/events{/privacy}","received_events_url":"https://api.github.com/users/evbedarev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/evbedarev/Homework","description":"Домашняя работа","fork":true,"url":"https://api.github.com/repos/evbedarev/Homework","forks_url":"https://api.github.com/repos/evbedarev/Homework/forks","keys_url":"https://api.github.com/repos/evbedarev/Homework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evbedarev/Homework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evbedarev/Homework/teams","hooks_url":"https://api.github.com/repos/evbedarev/Homework/hooks","issue_events_url":"https://api.github.com/repos/evbedarev/Homework/issues/events{/number}","events_url":"https://api.github.com/repos/evbedarev/Homework/events","assignees_url":"https://api.github.com/repos/evbedarev/Homework/assignees{/user}","branches_url":"https://api.github.com/repos/evbedarev/Homework/branches{/branch}","tags_url":"https://api.github.com/repos/evbedarev/Homework/tags","blobs_url":"https://api.github.com/repos/evbedarev/Homework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evbedarev/Homework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evbedarev/Homework/git/refs{/sha}","trees_url":"https://api.github.com/repos/evbedarev/Homework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evbedarev/Homework/statuses/{sha}","languages_url":"https://api.github.com/repos/evbedarev/Homework/languages","stargazers_url":"https://api.github.com/repos/evbedarev/Homework/stargazers","contributors_url":"https://api.github.com/repos/evbedarev/Homework/contributors","subscribers_url":"https://api.github.com/repos/evbedarev/Homework/subscribers","subscription_url":"https://api.github.com/repos/evbedarev/Homework/subscription","commits_url":"https://api.github.com/repos/evbedarev/Homework/commits{/sha}","git_commits_url":"https://api.github.com/repos/evbedarev/Homework/git/commits{/sha}","comments_url":"https://api.github.com/repos/evbedarev/Homework/comments{/number}","issue_comment_url":"https://api.github.com/repos/evbedarev/Homework/issues/comments{/number}","contents_url":"https://api.github.com/repos/evbedarev/Homework/contents/{+path}","compare_url":"https://api.github.com/repos/evbedarev/Homework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evbedarev/Homework/merges","archive_url":"https://api.github.com/repos/evbedarev/Homework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evbedarev/Homework/downloads","issues_url":"https://api.github.com/repos/evbedarev/Homework/issues{/number}","pulls_url":"https://api.github.com/repos/evbedarev/Homework/pulls{/number}","milestones_url":"https://api.github.com/repos/evbedarev/Homework/milestones{/number}","notifications_url":"https://api.github.com/repos/evbedarev/Homework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evbedarev/Homework/labels{/name}","releases_url":"https://api.github.com/repos/evbedarev/Homework/releases{/id}","deployments_url":"https://api.github.com/repos/evbedarev/Homework/deployments","created_at":"2018-03-06T15:14:41Z","updated_at":"2018-03-06T15:14:43Z","pushed_at":"2018-03-06T15:45:39Z","git_url":"git://github.com/evbedarev/Homework.git","ssh_url":"git@github.com:evbedarev/Homework.git","clone_url":"https://github.com/evbedarev/Homework.git","svn_url":"https://github.com/evbedarev/Homework","homepage":null,"size":532,"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":"tasks"}},"base":{"label":"SberTechJavaSchool:master","ref":"master","sha":"2a5b77bb1da859510b713253e6ea275f5a8018b5","user":{"login":"SberTechJavaSchool","id":36043895,"avatar_url":"https://avatars3.githubusercontent.com/u/36043895?v=4","gravatar_id":"","url":"https://api.github.com/users/SberTechJavaSchool","html_url":"https://github.com/SberTechJavaSchool","followers_url":"https://api.github.com/users/SberTechJavaSchool/followers","following_url":"https://api.github.com/users/SberTechJavaSchool/following{/other_user}","gists_url":"https://api.github.com/users/SberTechJavaSchool/gists{/gist_id}","starred_url":"https://api.github.com/users/SberTechJavaSchool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SberTechJavaSchool/subscriptions","organizations_url":"https://api.github.com/users/SberTechJavaSchool/orgs","repos_url":"https://api.github.com/users/SberTechJavaSchool/repos","events_url":"https://api.github.com/users/SberTechJavaSchool/events{/privacy}","received_events_url":"https://api.github.com/users/SberTechJavaSchool/received_events","type":"Organization","site_admin":false},"repo":{"id":120473051,"name":"Homework","full_name":"SberTechJavaSchool/Homework","owner":{"login":"SberTechJavaSchool","id":36043895,"avatar_url":"https://avatars3.githubusercontent.com/u/36043895?v=4","gravatar_id":"","url":"https://api.github.com/users/SberTechJavaSchool","html_url":"https://github.com/SberTechJavaSchool","followers_url":"https://api.github.com/users/SberTechJavaSchool/followers","following_url":"https://api.github.com/users/SberTechJavaSchool/following{/other_user}","gists_url":"https://api.github.com/users/SberTechJavaSchool/gists{/gist_id}","starred_url":"https://api.github.com/users/SberTechJavaSchool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SberTechJavaSchool/subscriptions","organizations_url":"https://api.github.com/users/SberTechJavaSchool/orgs","repos_url":"https://api.github.com/users/SberTechJavaSchool/repos","events_url":"https://api.github.com/users/SberTechJavaSchool/events{/privacy}","received_events_url":"https://api.github.com/users/SberTechJavaSchool/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SberTechJavaSchool/Homework","description":"Домашняя работа","fork":false,"url":"https://api.github.com/repos/SberTechJavaSchool/Homework","forks_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/forks","keys_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/teams","hooks_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/hooks","issue_events_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/issues/events{/number}","events_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/events","assignees_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/assignees{/user}","branches_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/branches{/branch}","tags_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/tags","blobs_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/git/refs{/sha}","trees_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/statuses/{sha}","languages_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/languages","stargazers_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/stargazers","contributors_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/contributors","subscribers_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/subscribers","subscription_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/subscription","commits_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/commits{/sha}","git_commits_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/git/commits{/sha}","comments_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/comments{/number}","issue_comment_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/issues/comments{/number}","contents_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/contents/{+path}","compare_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/merges","archive_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/downloads","issues_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/issues{/number}","pulls_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/pulls{/number}","milestones_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/milestones{/number}","notifications_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/labels{/name}","releases_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/releases{/id}","deployments_url":"https://api.github.com/repos/SberTechJavaSchool/Homework/deployments","created_at":"2018-02-06T14:49:25Z","updated_at":"2018-02-23T12:56:05Z","pushed_at":"2018-03-06T16:28:49Z","git_url":"git://github.com/SberTechJavaSchool/Homework.git","ssh_url":"git@github.com:SberTechJavaSchool/Homework.git","clone_url":"https://github.com/SberTechJavaSchool/Homework.git","svn_url":"https://github.com/SberTechJavaSchool/Homework","homepage":null,"size":535,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"archived":false,"open_issues_count":23,"license":null,"forks":22,"open_issues":23,"watchers":4,"default_branch":"tasks"}},"_links":{"self":{"href":"https://api.github.com/repos/SberTechJavaSchool/Homework/pulls/112"},"html":{"href":"https://github.com/SberTechJavaSchool/Homework/pull/112"},"issue":{"href":"https://api.github.com/repos/SberTechJavaSchool/Homework/issues/112"},"comments":{"href":"https://api.github.com/repos/SberTechJavaSchool/Homework/issues/112/comments"},"review_comments":{"href":"https://api.github.com/repos/SberTechJavaSchool/Homework/pulls/112/comments"},"review_comment":{"href":"https://api.github.com/repos/SberTechJavaSchool/Homework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SberTechJavaSchool/Homework/pulls/112/commits"},"statuses":{"href":"https://api.github.com/repos/SberTechJavaSchool/Homework/statuses/df563b3b4ca4ddd4f527b095c9f43d4443e14000"}},"author_association":"NONE"}}
{"actor":{"display_login":"roldevg"}}