{"action":"created","comment":{"url":"https://api.github.com/repos/crate/crate/pulls/comments/41762473","id":41762473,"diff_hunk":"@@ -110,14 +120,24 @@ public CrateClient() {\n     public CrateClient(String... servers) {\n         this();\n         for (String server : servers) {\n-            String[] parts = server.split(\":\");\n-            String host = parts[0];\n-            Integer port = 4300;\n-            if (parts.length == 2) {\n-                port = Integer.parseInt(parts[1]);\n-            }\n-            internalClient.addTransportAddress(new InetSocketTransportAddress(host, port));\n+            internalClient.addTransportAddress(tryCreateTransportFor(server));\n+        }\n+    }\n+\n+    protected TransportAddress tryCreateTransportFor(String server) {\n+        URI uri = null;\n+\n+        try {\n+            uri = new URI(\"tcp://\" + server);","path":"client/src/main/java/io/crate/client/CrateClient.java","position":57,"original_position":57,"commit_id":"50d3138cfc49799e943dbca53d39229655a2430d","original_commit_id":"50d3138cfc49799e943dbca53d39229655a2430d","user":{"login":"chaudum","id":281260,"avatar_url":"https://avatars.githubusercontent.com/u/281260?v=3","gravatar_id":"","url":"https://api.github.com/users/chaudum","html_url":"https://github.com/chaudum","followers_url":"https://api.github.com/users/chaudum/followers","following_url":"https://api.github.com/users/chaudum/following{/other_user}","gists_url":"https://api.github.com/users/chaudum/gists{/gist_id}","starred_url":"https://api.github.com/users/chaudum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaudum/subscriptions","organizations_url":"https://api.github.com/users/chaudum/orgs","repos_url":"https://api.github.com/users/chaudum/repos","events_url":"https://api.github.com/users/chaudum/events{/privacy}","received_events_url":"https://api.github.com/users/chaudum/received_events","type":"User","site_admin":false},"body":"make sure protocol is stripped off beforehand!","created_at":"2015-10-12T14:35:42Z","updated_at":"2015-10-12T14:35:42Z","html_url":"https://github.com/crate/crate/pull/2711#discussion_r41762473","pull_request_url":"https://api.github.com/repos/crate/crate/pulls/2711","_links":{"self":{"href":"https://api.github.com/repos/crate/crate/pulls/comments/41762473"},"html":{"href":"https://github.com/crate/crate/pull/2711#discussion_r41762473"},"pull_request":{"href":"https://api.github.com/repos/crate/crate/pulls/2711"}}},"pull_request":{"url":"https://api.github.com/repos/crate/crate/pulls/2711","id":47425793,"html_url":"https://github.com/crate/crate/pull/2711","diff_url":"https://github.com/crate/crate/pull/2711.diff","patch_url":"https://github.com/crate/crate/pull/2711.patch","issue_url":"https://api.github.com/repos/crate/crate/issues/2711","number":2711,"state":"open","locked":false,"title":"IPv6 address compatibility for crate-client","user":{"login":"celaus","id":713346,"avatar_url":"https://avatars.githubusercontent.com/u/713346?v=3","gravatar_id":"","url":"https://api.github.com/users/celaus","html_url":"https://github.com/celaus","followers_url":"https://api.github.com/users/celaus/followers","following_url":"https://api.github.com/users/celaus/following{/other_user}","gists_url":"https://api.github.com/users/celaus/gists{/gist_id}","starred_url":"https://api.github.com/users/celaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/celaus/subscriptions","organizations_url":"https://api.github.com/users/celaus/orgs","repos_url":"https://api.github.com/users/celaus/repos","events_url":"https://api.github.com/users/celaus/events{/privacy}","received_events_url":"https://api.github.com/users/celaus/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-12T14:28:39Z","updated_at":"2015-10-12T14:35:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf0131748abaa957bd69a1c3018894868776af64","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crate/crate/pulls/2711/commits","review_comments_url":"https://api.github.com/repos/crate/crate/pulls/2711/comments","review_comment_url":"https://api.github.com/repos/crate/crate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crate/crate/issues/2711/comments","statuses_url":"https://api.github.com/repos/crate/crate/statuses/50d3138cfc49799e943dbca53d39229655a2430d","head":{"label":"crate:c/client-host-string-parsing","ref":"c/client-host-string-parsing","sha":"50d3138cfc49799e943dbca53d39229655a2430d","user":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"repo":{"id":9342529,"name":"crate","full_name":"crate/crate","owner":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crate/crate","description":"CRATE: Your Elastic Data Store","fork":false,"url":"https://api.github.com/repos/crate/crate","forks_url":"https://api.github.com/repos/crate/crate/forks","keys_url":"https://api.github.com/repos/crate/crate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crate/crate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crate/crate/teams","hooks_url":"https://api.github.com/repos/crate/crate/hooks","issue_events_url":"https://api.github.com/repos/crate/crate/issues/events{/number}","events_url":"https://api.github.com/repos/crate/crate/events","assignees_url":"https://api.github.com/repos/crate/crate/assignees{/user}","branches_url":"https://api.github.com/repos/crate/crate/branches{/branch}","tags_url":"https://api.github.com/repos/crate/crate/tags","blobs_url":"https://api.github.com/repos/crate/crate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crate/crate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crate/crate/git/refs{/sha}","trees_url":"https://api.github.com/repos/crate/crate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crate/crate/statuses/{sha}","languages_url":"https://api.github.com/repos/crate/crate/languages","stargazers_url":"https://api.github.com/repos/crate/crate/stargazers","contributors_url":"https://api.github.com/repos/crate/crate/contributors","subscribers_url":"https://api.github.com/repos/crate/crate/subscribers","subscription_url":"https://api.github.com/repos/crate/crate/subscription","commits_url":"https://api.github.com/repos/crate/crate/commits{/sha}","git_commits_url":"https://api.github.com/repos/crate/crate/git/commits{/sha}","comments_url":"https://api.github.com/repos/crate/crate/comments{/number}","issue_comment_url":"https://api.github.com/repos/crate/crate/issues/comments{/number}","contents_url":"https://api.github.com/repos/crate/crate/contents/{+path}","compare_url":"https://api.github.com/repos/crate/crate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crate/crate/merges","archive_url":"https://api.github.com/repos/crate/crate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crate/crate/downloads","issues_url":"https://api.github.com/repos/crate/crate/issues{/number}","pulls_url":"https://api.github.com/repos/crate/crate/pulls{/number}","milestones_url":"https://api.github.com/repos/crate/crate/milestones{/number}","notifications_url":"https://api.github.com/repos/crate/crate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crate/crate/labels{/name}","releases_url":"https://api.github.com/repos/crate/crate/releases{/id}","created_at":"2013-04-10T09:17:16Z","updated_at":"2015-10-10T04:47:42Z","pushed_at":"2015-10-12T14:28:39Z","git_url":"git://github.com/crate/crate.git","ssh_url":"git@github.com:crate/crate.git","clone_url":"https://github.com/crate/crate.git","svn_url":"https://github.com/crate/crate","homepage":"https://crate.io","size":110541,"stargazers_count":1034,"watchers_count":1034,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":111,"mirror_url":null,"open_issues_count":53,"forks":111,"open_issues":53,"watchers":1034,"default_branch":"master"}},"base":{"label":"crate:master","ref":"master","sha":"b966c9d856cf63a809ee5ce882c8feee0c683a6e","user":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"repo":{"id":9342529,"name":"crate","full_name":"crate/crate","owner":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crate/crate","description":"CRATE: Your Elastic Data Store","fork":false,"url":"https://api.github.com/repos/crate/crate","forks_url":"https://api.github.com/repos/crate/crate/forks","keys_url":"https://api.github.com/repos/crate/crate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crate/crate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crate/crate/teams","hooks_url":"https://api.github.com/repos/crate/crate/hooks","issue_events_url":"https://api.github.com/repos/crate/crate/issues/events{/number}","events_url":"https://api.github.com/repos/crate/crate/events","assignees_url":"https://api.github.com/repos/crate/crate/assignees{/user}","branches_url":"https://api.github.com/repos/crate/crate/branches{/branch}","tags_url":"https://api.github.com/repos/crate/crate/tags","blobs_url":"https://api.github.com/repos/crate/crate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crate/crate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crate/crate/git/refs{/sha}","trees_url":"https://api.github.com/repos/crate/crate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crate/crate/statuses/{sha}","languages_url":"https://api.github.com/repos/crate/crate/languages","stargazers_url":"https://api.github.com/repos/crate/crate/stargazers","contributors_url":"https://api.github.com/repos/crate/crate/contributors","subscribers_url":"https://api.github.com/repos/crate/crate/subscribers","subscription_url":"https://api.github.com/repos/crate/crate/subscription","commits_url":"https://api.github.com/repos/crate/crate/commits{/sha}","git_commits_url":"https://api.github.com/repos/crate/crate/git/commits{/sha}","comments_url":"https://api.github.com/repos/crate/crate/comments{/number}","issue_comment_url":"https://api.github.com/repos/crate/crate/issues/comments{/number}","contents_url":"https://api.github.com/repos/crate/crate/contents/{+path}","compare_url":"https://api.github.com/repos/crate/crate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crate/crate/merges","archive_url":"https://api.github.com/repos/crate/crate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crate/crate/downloads","issues_url":"https://api.github.com/repos/crate/crate/issues{/number}","pulls_url":"https://api.github.com/repos/crate/crate/pulls{/number}","milestones_url":"https://api.github.com/repos/crate/crate/milestones{/number}","notifications_url":"https://api.github.com/repos/crate/crate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crate/crate/labels{/name}","releases_url":"https://api.github.com/repos/crate/crate/releases{/id}","created_at":"2013-04-10T09:17:16Z","updated_at":"2015-10-10T04:47:42Z","pushed_at":"2015-10-12T14:28:39Z","git_url":"git://github.com/crate/crate.git","ssh_url":"git@github.com:crate/crate.git","clone_url":"https://github.com/crate/crate.git","svn_url":"https://github.com/crate/crate","homepage":"https://crate.io","size":110541,"stargazers_count":1034,"watchers_count":1034,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":111,"mirror_url":null,"open_issues_count":53,"forks":111,"open_issues":53,"watchers":1034,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crate/crate/pulls/2711"},"html":{"href":"https://github.com/crate/crate/pull/2711"},"issue":{"href":"https://api.github.com/repos/crate/crate/issues/2711"},"comments":{"href":"https://api.github.com/repos/crate/crate/issues/2711/comments"},"review_comments":{"href":"https://api.github.com/repos/crate/crate/pulls/2711/comments"},"review_comment":{"href":"https://api.github.com/repos/crate/crate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crate/crate/pulls/2711/commits"},"statuses":{"href":"https://api.github.com/repos/crate/crate/statuses/50d3138cfc49799e943dbca53d39229655a2430d"}}}}