{"action":"created","comment":{"url":"https://api.github.com/repos/clouway-incubator/servlets/pulls/comments/69513716","id":69513716,"diff_hunk":"@@ -0,0 +1,22 @@\n+package com.clouway.bank.adapter.jdbc;\n+\n+import com.clouway.bank.core.ConnectionException;\n+import com.clouway.bank.core.Provider;\n+\n+import java.sql.Connection;\n+import java.sql.DriverManager;\n+import java.sql.SQLException;\n+\n+/**\n+ * @author Stanislava Kaukova(sisiivanovva@gmail.com)\n+ */\n+public class ConnectionProvider implements Provider {\n+  @Override\n+  public Connection get() {\n+    try {\n+      return DriverManager.getConnection(\"jdbc:postgresql://localhost/bank\", \"postgres\", \"clouway.com\");\n+    } catch (SQLException e) {\n+    }\n+    throw new ConnectionException(\"Can not connect to database\");","path":"src/main/java/com/clouway/bank/adapter/jdbc/ConnectionProvider.java","position":20,"original_position":20,"commit_id":"94af2d6262aefa263489691f9f5b1b3fefa7e23e","original_commit_id":"94af2d6262aefa263489691f9f5b1b3fefa7e23e","user":{"login":"stefan-dimitrov","id":6047637,"avatar_url":"https://avatars.githubusercontent.com/u/6047637?v=3","gravatar_id":"","url":"https://api.github.com/users/stefan-dimitrov","html_url":"https://github.com/stefan-dimitrov","followers_url":"https://api.github.com/users/stefan-dimitrov/followers","following_url":"https://api.github.com/users/stefan-dimitrov/following{/other_user}","gists_url":"https://api.github.com/users/stefan-dimitrov/gists{/gist_id}","starred_url":"https://api.github.com/users/stefan-dimitrov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefan-dimitrov/subscriptions","organizations_url":"https://api.github.com/users/stefan-dimitrov/orgs","repos_url":"https://api.github.com/users/stefan-dimitrov/repos","events_url":"https://api.github.com/users/stefan-dimitrov/events{/privacy}","received_events_url":"https://api.github.com/users/stefan-dimitrov/received_events","type":"User","site_admin":false},"body":"It will make more sense to throw the exception in the `catch` block.","created_at":"2016-07-05T06:46:59Z","updated_at":"2016-07-05T06:46:59Z","html_url":"https://github.com/clouway-incubator/servlets/pull/33#discussion_r69513716","pull_request_url":"https://api.github.com/repos/clouway-incubator/servlets/pulls/33","_links":{"self":{"href":"https://api.github.com/repos/clouway-incubator/servlets/pulls/comments/69513716"},"html":{"href":"https://github.com/clouway-incubator/servlets/pull/33#discussion_r69513716"},"pull_request":{"href":"https://api.github.com/repos/clouway-incubator/servlets/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/clouway-incubator/servlets/pulls/33","id":76114787,"html_url":"https://github.com/clouway-incubator/servlets/pull/33","diff_url":"https://github.com/clouway-incubator/servlets/pull/33.diff","patch_url":"https://github.com/clouway-incubator/servlets/pull/33.patch","issue_url":"https://api.github.com/repos/clouway-incubator/servlets/issues/33","number":33,"state":"open","locked":false,"title":"Register","user":{"login":"Stanislava88","id":8342103,"avatar_url":"https://avatars.githubusercontent.com/u/8342103?v=3","gravatar_id":"","url":"https://api.github.com/users/Stanislava88","html_url":"https://github.com/Stanislava88","followers_url":"https://api.github.com/users/Stanislava88/followers","following_url":"https://api.github.com/users/Stanislava88/following{/other_user}","gists_url":"https://api.github.com/users/Stanislava88/gists{/gist_id}","starred_url":"https://api.github.com/users/Stanislava88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stanislava88/subscriptions","organizations_url":"https://api.github.com/users/Stanislava88/orgs","repos_url":"https://api.github.com/users/Stanislava88/repos","events_url":"https://api.github.com/users/Stanislava88/events{/privacy}","received_events_url":"https://api.github.com/users/Stanislava88/received_events","type":"User","site_admin":false},"body":"Here i have created register for the bank project. \r\n\r\n![registersuccess](https://cloud.githubusercontent.com/assets/8342103/16551564/94d7c424-41c2-11e6-8be6-7cc0afe18b3b.png)\r\n\r\n![registererror](https://cloud.githubusercontent.com/assets/8342103/16551567/9a72717c-41c2-11e6-8a5f-2eb0f149cbab.png)\r\n\r\n","created_at":"2016-07-04T05:42:09Z","updated_at":"2016-07-05T06:47:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9205b5af67507339fb7a53eb591768a1f87e953","assignee":{"login":"stefan-dimitrov","id":6047637,"avatar_url":"https://avatars.githubusercontent.com/u/6047637?v=3","gravatar_id":"","url":"https://api.github.com/users/stefan-dimitrov","html_url":"https://github.com/stefan-dimitrov","followers_url":"https://api.github.com/users/stefan-dimitrov/followers","following_url":"https://api.github.com/users/stefan-dimitrov/following{/other_user}","gists_url":"https://api.github.com/users/stefan-dimitrov/gists{/gist_id}","starred_url":"https://api.github.com/users/stefan-dimitrov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefan-dimitrov/subscriptions","organizations_url":"https://api.github.com/users/stefan-dimitrov/orgs","repos_url":"https://api.github.com/users/stefan-dimitrov/repos","events_url":"https://api.github.com/users/stefan-dimitrov/events{/privacy}","received_events_url":"https://api.github.com/users/stefan-dimitrov/received_events","type":"User","site_admin":false},"assignees":[{"login":"stefan-dimitrov","id":6047637,"avatar_url":"https://avatars.githubusercontent.com/u/6047637?v=3","gravatar_id":"","url":"https://api.github.com/users/stefan-dimitrov","html_url":"https://github.com/stefan-dimitrov","followers_url":"https://api.github.com/users/stefan-dimitrov/followers","following_url":"https://api.github.com/users/stefan-dimitrov/following{/other_user}","gists_url":"https://api.github.com/users/stefan-dimitrov/gists{/gist_id}","starred_url":"https://api.github.com/users/stefan-dimitrov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefan-dimitrov/subscriptions","organizations_url":"https://api.github.com/users/stefan-dimitrov/orgs","repos_url":"https://api.github.com/users/stefan-dimitrov/repos","events_url":"https://api.github.com/users/stefan-dimitrov/events{/privacy}","received_events_url":"https://api.github.com/users/stefan-dimitrov/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/clouway-incubator/servlets/pulls/33/commits","review_comments_url":"https://api.github.com/repos/clouway-incubator/servlets/pulls/33/comments","review_comment_url":"https://api.github.com/repos/clouway-incubator/servlets/pulls/comments{/number}","comments_url":"https://api.github.com/repos/clouway-incubator/servlets/issues/33/comments","statuses_url":"https://api.github.com/repos/clouway-incubator/servlets/statuses/94af2d6262aefa263489691f9f5b1b3fefa7e23e","head":{"label":"Stanislava88:register","ref":"register","sha":"94af2d6262aefa263489691f9f5b1b3fefa7e23e","user":{"login":"Stanislava88","id":8342103,"avatar_url":"https://avatars.githubusercontent.com/u/8342103?v=3","gravatar_id":"","url":"https://api.github.com/users/Stanislava88","html_url":"https://github.com/Stanislava88","followers_url":"https://api.github.com/users/Stanislava88/followers","following_url":"https://api.github.com/users/Stanislava88/following{/other_user}","gists_url":"https://api.github.com/users/Stanislava88/gists{/gist_id}","starred_url":"https://api.github.com/users/Stanislava88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stanislava88/subscriptions","organizations_url":"https://api.github.com/users/Stanislava88/orgs","repos_url":"https://api.github.com/users/Stanislava88/repos","events_url":"https://api.github.com/users/Stanislava88/events{/privacy}","received_events_url":"https://api.github.com/users/Stanislava88/received_events","type":"User","site_admin":false},"repo":{"id":60699177,"name":"servlets","full_name":"Stanislava88/servlets","owner":{"login":"Stanislava88","id":8342103,"avatar_url":"https://avatars.githubusercontent.com/u/8342103?v=3","gravatar_id":"","url":"https://api.github.com/users/Stanislava88","html_url":"https://github.com/Stanislava88","followers_url":"https://api.github.com/users/Stanislava88/followers","following_url":"https://api.github.com/users/Stanislava88/following{/other_user}","gists_url":"https://api.github.com/users/Stanislava88/gists{/gist_id}","starred_url":"https://api.github.com/users/Stanislava88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stanislava88/subscriptions","organizations_url":"https://api.github.com/users/Stanislava88/orgs","repos_url":"https://api.github.com/users/Stanislava88/repos","events_url":"https://api.github.com/users/Stanislava88/events{/privacy}","received_events_url":"https://api.github.com/users/Stanislava88/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Stanislava88/servlets","description":"Servlets ","fork":true,"url":"https://api.github.com/repos/Stanislava88/servlets","forks_url":"https://api.github.com/repos/Stanislava88/servlets/forks","keys_url":"https://api.github.com/repos/Stanislava88/servlets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Stanislava88/servlets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Stanislava88/servlets/teams","hooks_url":"https://api.github.com/repos/Stanislava88/servlets/hooks","issue_events_url":"https://api.github.com/repos/Stanislava88/servlets/issues/events{/number}","events_url":"https://api.github.com/repos/Stanislava88/servlets/events","assignees_url":"https://api.github.com/repos/Stanislava88/servlets/assignees{/user}","branches_url":"https://api.github.com/repos/Stanislava88/servlets/branches{/branch}","tags_url":"https://api.github.com/repos/Stanislava88/servlets/tags","blobs_url":"https://api.github.com/repos/Stanislava88/servlets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Stanislava88/servlets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Stanislava88/servlets/git/refs{/sha}","trees_url":"https://api.github.com/repos/Stanislava88/servlets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Stanislava88/servlets/statuses/{sha}","languages_url":"https://api.github.com/repos/Stanislava88/servlets/languages","stargazers_url":"https://api.github.com/repos/Stanislava88/servlets/stargazers","contributors_url":"https://api.github.com/repos/Stanislava88/servlets/contributors","subscribers_url":"https://api.github.com/repos/Stanislava88/servlets/subscribers","subscription_url":"https://api.github.com/repos/Stanislava88/servlets/subscription","commits_url":"https://api.github.com/repos/Stanislava88/servlets/commits{/sha}","git_commits_url":"https://api.github.com/repos/Stanislava88/servlets/git/commits{/sha}","comments_url":"https://api.github.com/repos/Stanislava88/servlets/comments{/number}","issue_comment_url":"https://api.github.com/repos/Stanislava88/servlets/issues/comments{/number}","contents_url":"https://api.github.com/repos/Stanislava88/servlets/contents/{+path}","compare_url":"https://api.github.com/repos/Stanislava88/servlets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Stanislava88/servlets/merges","archive_url":"https://api.github.com/repos/Stanislava88/servlets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Stanislava88/servlets/downloads","issues_url":"https://api.github.com/repos/Stanislava88/servlets/issues{/number}","pulls_url":"https://api.github.com/repos/Stanislava88/servlets/pulls{/number}","milestones_url":"https://api.github.com/repos/Stanislava88/servlets/milestones{/number}","notifications_url":"https://api.github.com/repos/Stanislava88/servlets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Stanislava88/servlets/labels{/name}","releases_url":"https://api.github.com/repos/Stanislava88/servlets/releases{/id}","deployments_url":"https://api.github.com/repos/Stanislava88/servlets/deployments","created_at":"2016-06-08T13:17:54Z","updated_at":"2015-10-15T06:53:35Z","pushed_at":"2016-07-04T11:36:36Z","git_url":"git://github.com/Stanislava88/servlets.git","ssh_url":"git@github.com:Stanislava88/servlets.git","clone_url":"https://github.com/Stanislava88/servlets.git","svn_url":"https://github.com/Stanislava88/servlets","homepage":null,"size":294,"stargazers_count":0,"watchers_count":0,"language":null,"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":"clouway-incubator:stanislava_bank","ref":"stanislava_bank","sha":"b9bc031ba479681f1424f89d4870b49d3a6d1fb4","user":{"login":"clouway-incubator","id":10173098,"avatar_url":"https://avatars.githubusercontent.com/u/10173098?v=3","gravatar_id":"","url":"https://api.github.com/users/clouway-incubator","html_url":"https://github.com/clouway-incubator","followers_url":"https://api.github.com/users/clouway-incubator/followers","following_url":"https://api.github.com/users/clouway-incubator/following{/other_user}","gists_url":"https://api.github.com/users/clouway-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/clouway-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clouway-incubator/subscriptions","organizations_url":"https://api.github.com/users/clouway-incubator/orgs","repos_url":"https://api.github.com/users/clouway-incubator/repos","events_url":"https://api.github.com/users/clouway-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/clouway-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":44299216,"name":"servlets","full_name":"clouway-incubator/servlets","owner":{"login":"clouway-incubator","id":10173098,"avatar_url":"https://avatars.githubusercontent.com/u/10173098?v=3","gravatar_id":"","url":"https://api.github.com/users/clouway-incubator","html_url":"https://github.com/clouway-incubator","followers_url":"https://api.github.com/users/clouway-incubator/followers","following_url":"https://api.github.com/users/clouway-incubator/following{/other_user}","gists_url":"https://api.github.com/users/clouway-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/clouway-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clouway-incubator/subscriptions","organizations_url":"https://api.github.com/users/clouway-incubator/orgs","repos_url":"https://api.github.com/users/clouway-incubator/repos","events_url":"https://api.github.com/users/clouway-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/clouway-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/clouway-incubator/servlets","description":"Servlets ","fork":false,"url":"https://api.github.com/repos/clouway-incubator/servlets","forks_url":"https://api.github.com/repos/clouway-incubator/servlets/forks","keys_url":"https://api.github.com/repos/clouway-incubator/servlets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clouway-incubator/servlets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clouway-incubator/servlets/teams","hooks_url":"https://api.github.com/repos/clouway-incubator/servlets/hooks","issue_events_url":"https://api.github.com/repos/clouway-incubator/servlets/issues/events{/number}","events_url":"https://api.github.com/repos/clouway-incubator/servlets/events","assignees_url":"https://api.github.com/repos/clouway-incubator/servlets/assignees{/user}","branches_url":"https://api.github.com/repos/clouway-incubator/servlets/branches{/branch}","tags_url":"https://api.github.com/repos/clouway-incubator/servlets/tags","blobs_url":"https://api.github.com/repos/clouway-incubator/servlets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clouway-incubator/servlets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clouway-incubator/servlets/git/refs{/sha}","trees_url":"https://api.github.com/repos/clouway-incubator/servlets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clouway-incubator/servlets/statuses/{sha}","languages_url":"https://api.github.com/repos/clouway-incubator/servlets/languages","stargazers_url":"https://api.github.com/repos/clouway-incubator/servlets/stargazers","contributors_url":"https://api.github.com/repos/clouway-incubator/servlets/contributors","subscribers_url":"https://api.github.com/repos/clouway-incubator/servlets/subscribers","subscription_url":"https://api.github.com/repos/clouway-incubator/servlets/subscription","commits_url":"https://api.github.com/repos/clouway-incubator/servlets/commits{/sha}","git_commits_url":"https://api.github.com/repos/clouway-incubator/servlets/git/commits{/sha}","comments_url":"https://api.github.com/repos/clouway-incubator/servlets/comments{/number}","issue_comment_url":"https://api.github.com/repos/clouway-incubator/servlets/issues/comments{/number}","contents_url":"https://api.github.com/repos/clouway-incubator/servlets/contents/{+path}","compare_url":"https://api.github.com/repos/clouway-incubator/servlets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clouway-incubator/servlets/merges","archive_url":"https://api.github.com/repos/clouway-incubator/servlets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clouway-incubator/servlets/downloads","issues_url":"https://api.github.com/repos/clouway-incubator/servlets/issues{/number}","pulls_url":"https://api.github.com/repos/clouway-incubator/servlets/pulls{/number}","milestones_url":"https://api.github.com/repos/clouway-incubator/servlets/milestones{/number}","notifications_url":"https://api.github.com/repos/clouway-incubator/servlets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clouway-incubator/servlets/labels{/name}","releases_url":"https://api.github.com/repos/clouway-incubator/servlets/releases{/id}","deployments_url":"https://api.github.com/repos/clouway-incubator/servlets/deployments","created_at":"2015-10-15T06:53:35Z","updated_at":"2015-10-15T06:53:35Z","pushed_at":"2016-07-04T12:45:40Z","git_url":"git://github.com/clouway-incubator/servlets.git","ssh_url":"git@github.com:clouway-incubator/servlets.git","clone_url":"https://github.com/clouway-incubator/servlets.git","svn_url":"https://github.com/clouway-incubator/servlets","homepage":null,"size":1099,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":2,"forks":5,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/clouway-incubator/servlets/pulls/33"},"html":{"href":"https://github.com/clouway-incubator/servlets/pull/33"},"issue":{"href":"https://api.github.com/repos/clouway-incubator/servlets/issues/33"},"comments":{"href":"https://api.github.com/repos/clouway-incubator/servlets/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/clouway-incubator/servlets/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/clouway-incubator/servlets/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/clouway-incubator/servlets/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/clouway-incubator/servlets/statuses/94af2d6262aefa263489691f9f5b1b3fefa7e23e"}}}}
{"actor":{"display_login":"stefan-dimitrov"}}