{"action":"created","comment":{"url":"https://api.github.com/repos/fediq/mipt-java-2016/pulls/comments/85838325","pull_request_review_id":6528417,"id":85838325,"diff_hunk":"@@ -0,0 +1,102 @@\n+package ru.mipt.java2016.homework.g595.iksanov.task2;\n+\n+import ru.mipt.java2016.homework.base.task2.KeyValueStorage;\n+\n+import java.io.*;\n+import java.util.HashMap;\n+import java.util.Map;\n+import java.util.Iterator;\n+\n+/**\n+ * KeyValueStorage.\n+ * Created by Эмиль Иксанов.\n+ */\n+public class MyStorage<K, V> implements KeyValueStorage<K, V> {\n+\n+    private HashMap<K, V> myMap = new HashMap<>();\n+    private File workfile;\n+    private SerializationStrategy<K> keySerializationStrategy;\n+    private SerializationStrategy<V> valueSerializationStrategy;\n+    private boolean isClosed;\n+\n+    public MyStorage(String path, SerializationStrategy<K> keySerializationStrategy,\n+                     SerializationStrategy<V> valueSerializationStrategy) {\n+        this.keySerializationStrategy = keySerializationStrategy;\n+        this.valueSerializationStrategy = valueSerializationStrategy;\n+\n+        File tryFile = new File(path);\n+        if (tryFile.exists() && tryFile.isDirectory()) {\n+            path += \"/storage.db\";","path":"homework-g595-iksanov/src/main/java/ru/mipt/java2016/homework/g595/iksanov/task2/MyStorage.java","position":29,"original_position":29,"commit_id":"68f4684a34d345a9395496c5b64a14efad74391f","original_commit_id":"68f4684a34d345a9395496c5b64a14efad74391f","user":{"login":"DanAnastasyev","id":5503582,"avatar_url":"https://avatars.githubusercontent.com/u/5503582?v=3","gravatar_id":"","url":"https://api.github.com/users/DanAnastasyev","html_url":"https://github.com/DanAnastasyev","followers_url":"https://api.github.com/users/DanAnastasyev/followers","following_url":"https://api.github.com/users/DanAnastasyev/following{/other_user}","gists_url":"https://api.github.com/users/DanAnastasyev/gists{/gist_id}","starred_url":"https://api.github.com/users/DanAnastasyev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanAnastasyev/subscriptions","organizations_url":"https://api.github.com/users/DanAnastasyev/orgs","repos_url":"https://api.github.com/users/DanAnastasyev/repos","events_url":"https://api.github.com/users/DanAnastasyev/events{/privacy}","received_events_url":"https://api.github.com/users/DanAnastasyev/received_events","type":"User","site_admin":false},"body":"Вместо `\"/\"` используем `File.separator`","created_at":"2016-10-31T21:35:09Z","updated_at":"2016-10-31T21:36:34Z","html_url":"https://github.com/fediq/mipt-java-2016/pull/189#discussion_r85838325","pull_request_url":"https://api.github.com/repos/fediq/mipt-java-2016/pulls/189","_links":{"self":{"href":"https://api.github.com/repos/fediq/mipt-java-2016/pulls/comments/85838325"},"html":{"href":"https://github.com/fediq/mipt-java-2016/pull/189#discussion_r85838325"},"pull_request":{"href":"https://api.github.com/repos/fediq/mipt-java-2016/pulls/189"}}},"pull_request":{"url":"https://api.github.com/repos/fediq/mipt-java-2016/pulls/189","id":91688298,"html_url":"https://github.com/fediq/mipt-java-2016/pull/189","diff_url":"https://github.com/fediq/mipt-java-2016/pull/189.diff","patch_url":"https://github.com/fediq/mipt-java-2016/pull/189.patch","issue_url":"https://api.github.com/repos/fediq/mipt-java-2016/issues/189","number":189,"state":"open","locked":false,"title":"g595-iksanov-task2","user":{"login":"iksanov","id":22777922,"avatar_url":"https://avatars.githubusercontent.com/u/22777922?v=3","gravatar_id":"","url":"https://api.github.com/users/iksanov","html_url":"https://github.com/iksanov","followers_url":"https://api.github.com/users/iksanov/followers","following_url":"https://api.github.com/users/iksanov/following{/other_user}","gists_url":"https://api.github.com/users/iksanov/gists{/gist_id}","starred_url":"https://api.github.com/users/iksanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iksanov/subscriptions","organizations_url":"https://api.github.com/users/iksanov/orgs","repos_url":"https://api.github.com/users/iksanov/repos","events_url":"https://api.github.com/users/iksanov/events{/privacy}","received_events_url":"https://api.github.com/users/iksanov/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-31T20:52:23Z","updated_at":"2016-10-31T21:36:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"474fd48c6429c398972686907a67dfb628a93551","assignee":{"login":"DanAnastasyev","id":5503582,"avatar_url":"https://avatars.githubusercontent.com/u/5503582?v=3","gravatar_id":"","url":"https://api.github.com/users/DanAnastasyev","html_url":"https://github.com/DanAnastasyev","followers_url":"https://api.github.com/users/DanAnastasyev/followers","following_url":"https://api.github.com/users/DanAnastasyev/following{/other_user}","gists_url":"https://api.github.com/users/DanAnastasyev/gists{/gist_id}","starred_url":"https://api.github.com/users/DanAnastasyev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanAnastasyev/subscriptions","organizations_url":"https://api.github.com/users/DanAnastasyev/orgs","repos_url":"https://api.github.com/users/DanAnastasyev/repos","events_url":"https://api.github.com/users/DanAnastasyev/events{/privacy}","received_events_url":"https://api.github.com/users/DanAnastasyev/received_events","type":"User","site_admin":false},"assignees":[{"login":"DanAnastasyev","id":5503582,"avatar_url":"https://avatars.githubusercontent.com/u/5503582?v=3","gravatar_id":"","url":"https://api.github.com/users/DanAnastasyev","html_url":"https://github.com/DanAnastasyev","followers_url":"https://api.github.com/users/DanAnastasyev/followers","following_url":"https://api.github.com/users/DanAnastasyev/following{/other_user}","gists_url":"https://api.github.com/users/DanAnastasyev/gists{/gist_id}","starred_url":"https://api.github.com/users/DanAnastasyev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanAnastasyev/subscriptions","organizations_url":"https://api.github.com/users/DanAnastasyev/orgs","repos_url":"https://api.github.com/users/DanAnastasyev/repos","events_url":"https://api.github.com/users/DanAnastasyev/events{/privacy}","received_events_url":"https://api.github.com/users/DanAnastasyev/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/fediq/mipt-java-2016/pulls/189/commits","review_comments_url":"https://api.github.com/repos/fediq/mipt-java-2016/pulls/189/comments","review_comment_url":"https://api.github.com/repos/fediq/mipt-java-2016/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fediq/mipt-java-2016/issues/189/comments","statuses_url":"https://api.github.com/repos/fediq/mipt-java-2016/statuses/68f4684a34d345a9395496c5b64a14efad74391f","head":{"label":"iksanov:master","ref":"master","sha":"68f4684a34d345a9395496c5b64a14efad74391f","user":{"login":"iksanov","id":22777922,"avatar_url":"https://avatars.githubusercontent.com/u/22777922?v=3","gravatar_id":"","url":"https://api.github.com/users/iksanov","html_url":"https://github.com/iksanov","followers_url":"https://api.github.com/users/iksanov/followers","following_url":"https://api.github.com/users/iksanov/following{/other_user}","gists_url":"https://api.github.com/users/iksanov/gists{/gist_id}","starred_url":"https://api.github.com/users/iksanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iksanov/subscriptions","organizations_url":"https://api.github.com/users/iksanov/orgs","repos_url":"https://api.github.com/users/iksanov/repos","events_url":"https://api.github.com/users/iksanov/events{/privacy}","received_events_url":"https://api.github.com/users/iksanov/received_events","type":"User","site_admin":false},"repo":{"id":70634807,"name":"mipt-java-2016","full_name":"iksanov/mipt-java-2016","owner":{"login":"iksanov","id":22777922,"avatar_url":"https://avatars.githubusercontent.com/u/22777922?v=3","gravatar_id":"","url":"https://api.github.com/users/iksanov","html_url":"https://github.com/iksanov","followers_url":"https://api.github.com/users/iksanov/followers","following_url":"https://api.github.com/users/iksanov/following{/other_user}","gists_url":"https://api.github.com/users/iksanov/gists{/gist_id}","starred_url":"https://api.github.com/users/iksanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iksanov/subscriptions","organizations_url":"https://api.github.com/users/iksanov/orgs","repos_url":"https://api.github.com/users/iksanov/repos","events_url":"https://api.github.com/users/iksanov/events{/privacy}","received_events_url":"https://api.github.com/users/iksanov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iksanov/mipt-java-2016","description":"Практическая часть курса \"Программирование на Java\", 2016 год","fork":true,"url":"https://api.github.com/repos/iksanov/mipt-java-2016","forks_url":"https://api.github.com/repos/iksanov/mipt-java-2016/forks","keys_url":"https://api.github.com/repos/iksanov/mipt-java-2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iksanov/mipt-java-2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iksanov/mipt-java-2016/teams","hooks_url":"https://api.github.com/repos/iksanov/mipt-java-2016/hooks","issue_events_url":"https://api.github.com/repos/iksanov/mipt-java-2016/issues/events{/number}","events_url":"https://api.github.com/repos/iksanov/mipt-java-2016/events","assignees_url":"https://api.github.com/repos/iksanov/mipt-java-2016/assignees{/user}","branches_url":"https://api.github.com/repos/iksanov/mipt-java-2016/branches{/branch}","tags_url":"https://api.github.com/repos/iksanov/mipt-java-2016/tags","blobs_url":"https://api.github.com/repos/iksanov/mipt-java-2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iksanov/mipt-java-2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iksanov/mipt-java-2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/iksanov/mipt-java-2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iksanov/mipt-java-2016/statuses/{sha}","languages_url":"https://api.github.com/repos/iksanov/mipt-java-2016/languages","stargazers_url":"https://api.github.com/repos/iksanov/mipt-java-2016/stargazers","contributors_url":"https://api.github.com/repos/iksanov/mipt-java-2016/contributors","subscribers_url":"https://api.github.com/repos/iksanov/mipt-java-2016/subscribers","subscription_url":"https://api.github.com/repos/iksanov/mipt-java-2016/subscription","commits_url":"https://api.github.com/repos/iksanov/mipt-java-2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/iksanov/mipt-java-2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/iksanov/mipt-java-2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/iksanov/mipt-java-2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/iksanov/mipt-java-2016/contents/{+path}","compare_url":"https://api.github.com/repos/iksanov/mipt-java-2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iksanov/mipt-java-2016/merges","archive_url":"https://api.github.com/repos/iksanov/mipt-java-2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iksanov/mipt-java-2016/downloads","issues_url":"https://api.github.com/repos/iksanov/mipt-java-2016/issues{/number}","pulls_url":"https://api.github.com/repos/iksanov/mipt-java-2016/pulls{/number}","milestones_url":"https://api.github.com/repos/iksanov/mipt-java-2016/milestones{/number}","notifications_url":"https://api.github.com/repos/iksanov/mipt-java-2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iksanov/mipt-java-2016/labels{/name}","releases_url":"https://api.github.com/repos/iksanov/mipt-java-2016/releases{/id}","deployments_url":"https://api.github.com/repos/iksanov/mipt-java-2016/deployments","created_at":"2016-10-11T20:57:46Z","updated_at":"2016-10-31T20:50:20Z","pushed_at":"2016-10-31T20:57:23Z","git_url":"git://github.com/iksanov/mipt-java-2016.git","ssh_url":"git@github.com:iksanov/mipt-java-2016.git","clone_url":"https://github.com/iksanov/mipt-java-2016.git","svn_url":"https://github.com/iksanov/mipt-java-2016","homepage":"","size":418,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fediq:master","ref":"master","sha":"ffdcbce8e91f1b7dc1ffe4ad9c2a911f1609341d","user":{"login":"fediq","id":1057798,"avatar_url":"https://avatars.githubusercontent.com/u/1057798?v=3","gravatar_id":"","url":"https://api.github.com/users/fediq","html_url":"https://github.com/fediq","followers_url":"https://api.github.com/users/fediq/followers","following_url":"https://api.github.com/users/fediq/following{/other_user}","gists_url":"https://api.github.com/users/fediq/gists{/gist_id}","starred_url":"https://api.github.com/users/fediq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fediq/subscriptions","organizations_url":"https://api.github.com/users/fediq/orgs","repos_url":"https://api.github.com/users/fediq/repos","events_url":"https://api.github.com/users/fediq/events{/privacy}","received_events_url":"https://api.github.com/users/fediq/received_events","type":"User","site_admin":false},"repo":{"id":69496783,"name":"mipt-java-2016","full_name":"fediq/mipt-java-2016","owner":{"login":"fediq","id":1057798,"avatar_url":"https://avatars.githubusercontent.com/u/1057798?v=3","gravatar_id":"","url":"https://api.github.com/users/fediq","html_url":"https://github.com/fediq","followers_url":"https://api.github.com/users/fediq/followers","following_url":"https://api.github.com/users/fediq/following{/other_user}","gists_url":"https://api.github.com/users/fediq/gists{/gist_id}","starred_url":"https://api.github.com/users/fediq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fediq/subscriptions","organizations_url":"https://api.github.com/users/fediq/orgs","repos_url":"https://api.github.com/users/fediq/repos","events_url":"https://api.github.com/users/fediq/events{/privacy}","received_events_url":"https://api.github.com/users/fediq/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fediq/mipt-java-2016","description":"Практическая часть курса \"Программирование на Java\", 2016 год","fork":false,"url":"https://api.github.com/repos/fediq/mipt-java-2016","forks_url":"https://api.github.com/repos/fediq/mipt-java-2016/forks","keys_url":"https://api.github.com/repos/fediq/mipt-java-2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fediq/mipt-java-2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fediq/mipt-java-2016/teams","hooks_url":"https://api.github.com/repos/fediq/mipt-java-2016/hooks","issue_events_url":"https://api.github.com/repos/fediq/mipt-java-2016/issues/events{/number}","events_url":"https://api.github.com/repos/fediq/mipt-java-2016/events","assignees_url":"https://api.github.com/repos/fediq/mipt-java-2016/assignees{/user}","branches_url":"https://api.github.com/repos/fediq/mipt-java-2016/branches{/branch}","tags_url":"https://api.github.com/repos/fediq/mipt-java-2016/tags","blobs_url":"https://api.github.com/repos/fediq/mipt-java-2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fediq/mipt-java-2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fediq/mipt-java-2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/fediq/mipt-java-2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fediq/mipt-java-2016/statuses/{sha}","languages_url":"https://api.github.com/repos/fediq/mipt-java-2016/languages","stargazers_url":"https://api.github.com/repos/fediq/mipt-java-2016/stargazers","contributors_url":"https://api.github.com/repos/fediq/mipt-java-2016/contributors","subscribers_url":"https://api.github.com/repos/fediq/mipt-java-2016/subscribers","subscription_url":"https://api.github.com/repos/fediq/mipt-java-2016/subscription","commits_url":"https://api.github.com/repos/fediq/mipt-java-2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/fediq/mipt-java-2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/fediq/mipt-java-2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/fediq/mipt-java-2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/fediq/mipt-java-2016/contents/{+path}","compare_url":"https://api.github.com/repos/fediq/mipt-java-2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fediq/mipt-java-2016/merges","archive_url":"https://api.github.com/repos/fediq/mipt-java-2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fediq/mipt-java-2016/downloads","issues_url":"https://api.github.com/repos/fediq/mipt-java-2016/issues{/number}","pulls_url":"https://api.github.com/repos/fediq/mipt-java-2016/pulls{/number}","milestones_url":"https://api.github.com/repos/fediq/mipt-java-2016/milestones{/number}","notifications_url":"https://api.github.com/repos/fediq/mipt-java-2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fediq/mipt-java-2016/labels{/name}","releases_url":"https://api.github.com/repos/fediq/mipt-java-2016/releases{/id}","deployments_url":"https://api.github.com/repos/fediq/mipt-java-2016/deployments","created_at":"2016-09-28T19:29:28Z","updated_at":"2016-10-22T20:34:58Z","pushed_at":"2016-10-31T21:34:30Z","git_url":"git://github.com/fediq/mipt-java-2016.git","ssh_url":"git@github.com:fediq/mipt-java-2016.git","clone_url":"https://github.com/fediq/mipt-java-2016.git","svn_url":"https://github.com/fediq/mipt-java-2016","homepage":null,"size":1853,"stargazers_count":13,"watchers_count":13,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":87,"mirror_url":null,"open_issues_count":54,"forks":87,"open_issues":54,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fediq/mipt-java-2016/pulls/189"},"html":{"href":"https://github.com/fediq/mipt-java-2016/pull/189"},"issue":{"href":"https://api.github.com/repos/fediq/mipt-java-2016/issues/189"},"comments":{"href":"https://api.github.com/repos/fediq/mipt-java-2016/issues/189/comments"},"review_comments":{"href":"https://api.github.com/repos/fediq/mipt-java-2016/pulls/189/comments"},"review_comment":{"href":"https://api.github.com/repos/fediq/mipt-java-2016/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fediq/mipt-java-2016/pulls/189/commits"},"statuses":{"href":"https://api.github.com/repos/fediq/mipt-java-2016/statuses/68f4684a34d345a9395496c5b64a14efad74391f"}}}}
{"actor":{"display_login":"DanAnastasyev"}}