{"action":"created","comment":{"url":"https://api.github.com/repos/netty/netty/pulls/comments/47442286","id":47442286,"diff_hunk":"@@ -0,0 +1,83 @@\n+/*\n+ * Copyright 2015 The Netty Project\n+ *\n+ * The Netty Project licenses this file to you under the Apache License,\n+ * version 2.0 (the \"License\"); you may not use this file except in compliance\n+ * with the License. You may obtain a copy of the License at:\n+ *\n+ *   http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n+ * License for the specific language governing permissions and limitations\n+ * under the License.\n+ */\n+package io.netty.resolver;\n+\n+import io.netty.util.concurrent.EventExecutor;\n+import io.netty.util.concurrent.Future;\n+import io.netty.util.concurrent.GenericFutureListener;\n+import io.netty.util.concurrent.Promise;\n+\n+import java.net.InetAddress;\n+import java.net.InetSocketAddress;\n+import java.util.ArrayList;\n+import java.util.List;\n+\n+public abstract class InetSocketAddressResolver extends SimpleAddressResolver<InetSocketAddress> {\n+\n+    private final NameResolver<InetAddress> nameResolver;\n+\n+    public InetSocketAddressResolver(EventExecutor executor, NameResolver<InetAddress> nameResolver) {","path":"resolver/src/main/java/io/netty/resolver/InetSocketAddressResolver.java","position":32,"original_position":32,"commit_id":"11d7f2529dd6bfa9572cfb18c74567fcb3e417b7","original_commit_id":"11d7f2529dd6bfa9572cfb18c74567fcb3e417b7","user":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=3","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"body":"javadocs and make constructor protected","created_at":"2015-12-13T09:29:43Z","updated_at":"2015-12-13T09:29:43Z","html_url":"https://github.com/netty/netty/pull/4566#discussion_r47442286","pull_request_url":"https://api.github.com/repos/netty/netty/pulls/4566","_links":{"self":{"href":"https://api.github.com/repos/netty/netty/pulls/comments/47442286"},"html":{"href":"https://github.com/netty/netty/pull/4566#discussion_r47442286"},"pull_request":{"href":"https://api.github.com/repos/netty/netty/pulls/4566"}}},"pull_request":{"url":"https://api.github.com/repos/netty/netty/pulls/4566","id":53488214,"html_url":"https://github.com/netty/netty/pull/4566","diff_url":"https://github.com/netty/netty/pull/4566.diff","patch_url":"https://github.com/netty/netty/pull/4566.patch","issue_url":"https://api.github.com/repos/netty/netty/issues/4566","number":4566,"state":"open","locked":false,"title":"Extract SocketAdress logic from NameResolver","user":{"login":"slandelle","id":849197,"avatar_url":"https://avatars.githubusercontent.com/u/849197?v=3","gravatar_id":"","url":"https://api.github.com/users/slandelle","html_url":"https://github.com/slandelle","followers_url":"https://api.github.com/users/slandelle/followers","following_url":"https://api.github.com/users/slandelle/following{/other_user}","gists_url":"https://api.github.com/users/slandelle/gists{/gist_id}","starred_url":"https://api.github.com/users/slandelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slandelle/subscriptions","organizations_url":"https://api.github.com/users/slandelle/orgs","repos_url":"https://api.github.com/users/slandelle/repos","events_url":"https://api.github.com/users/slandelle/events{/privacy}","received_events_url":"https://api.github.com/users/slandelle/received_events","type":"User","site_admin":false},"body":"Motivation:\r\n\r\nAs discussed in #4529, NameResolver design shouldn't be resolving SocketAddresses (or String name + port) and return InetSocketAddresses. It should resolve String names and return InetAddresses.\r\nThis SocketAddress to InetSocketAddresses resolution is actually a different concern, used by Bootstrap.   \r\n\r\nModifications:\r\n\r\nExtract SocketAddress to InetSocketAddresses resolution concern to a new class hierarchy named `AddressResolver`.\r\nThese `AddressResolver`s delegate to `NameResolver`s.\r\n\r\nResult:\r\n\r\nBetter separation of concerns.\r\n\r\nNote that new `AddressResolver`s generate a bit more allocations because of the intermediate `Promise` and `List<InetAddress>`.","created_at":"2015-12-12T23:15:36Z","updated_at":"2015-12-13T09:29:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2cab623bcc15b8d89040ee7dff0acc58fa62c07a","assignee":{"login":"trustin","id":173918,"avatar_url":"https://avatars.githubusercontent.com/u/173918?v=3","gravatar_id":"","url":"https://api.github.com/users/trustin","html_url":"https://github.com/trustin","followers_url":"https://api.github.com/users/trustin/followers","following_url":"https://api.github.com/users/trustin/following{/other_user}","gists_url":"https://api.github.com/users/trustin/gists{/gist_id}","starred_url":"https://api.github.com/users/trustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trustin/subscriptions","organizations_url":"https://api.github.com/users/trustin/orgs","repos_url":"https://api.github.com/users/trustin/repos","events_url":"https://api.github.com/users/trustin/events{/privacy}","received_events_url":"https://api.github.com/users/trustin/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/netty/netty/milestones/126","html_url":"https://github.com/netty/netty/milestones/4.1.0.CR1","labels_url":"https://api.github.com/repos/netty/netty/milestones/126/labels","id":1286123,"number":126,"title":"4.1.0.CR1","description":"","creator":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=3","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":27,"state":"open","created_at":"2015-09-02T12:42:53Z","updated_at":"2015-12-13T09:18:07Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/netty/netty/pulls/4566/commits","review_comments_url":"https://api.github.com/repos/netty/netty/pulls/4566/comments","review_comment_url":"https://api.github.com/repos/netty/netty/pulls/comments{/number}","comments_url":"https://api.github.com/repos/netty/netty/issues/4566/comments","statuses_url":"https://api.github.com/repos/netty/netty/statuses/11d7f2529dd6bfa9572cfb18c74567fcb3e417b7","head":{"label":"slandelle:name-resolver-split","ref":"name-resolver-split","sha":"11d7f2529dd6bfa9572cfb18c74567fcb3e417b7","user":{"login":"slandelle","id":849197,"avatar_url":"https://avatars.githubusercontent.com/u/849197?v=3","gravatar_id":"","url":"https://api.github.com/users/slandelle","html_url":"https://github.com/slandelle","followers_url":"https://api.github.com/users/slandelle/followers","following_url":"https://api.github.com/users/slandelle/following{/other_user}","gists_url":"https://api.github.com/users/slandelle/gists{/gist_id}","starred_url":"https://api.github.com/users/slandelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slandelle/subscriptions","organizations_url":"https://api.github.com/users/slandelle/orgs","repos_url":"https://api.github.com/users/slandelle/repos","events_url":"https://api.github.com/users/slandelle/events{/privacy}","received_events_url":"https://api.github.com/users/slandelle/received_events","type":"User","site_admin":false},"repo":{"id":33929023,"name":"netty","full_name":"slandelle/netty","owner":{"login":"slandelle","id":849197,"avatar_url":"https://avatars.githubusercontent.com/u/849197?v=3","gravatar_id":"","url":"https://api.github.com/users/slandelle","html_url":"https://github.com/slandelle","followers_url":"https://api.github.com/users/slandelle/followers","following_url":"https://api.github.com/users/slandelle/following{/other_user}","gists_url":"https://api.github.com/users/slandelle/gists{/gist_id}","starred_url":"https://api.github.com/users/slandelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slandelle/subscriptions","organizations_url":"https://api.github.com/users/slandelle/orgs","repos_url":"https://api.github.com/users/slandelle/repos","events_url":"https://api.github.com/users/slandelle/events{/privacy}","received_events_url":"https://api.github.com/users/slandelle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/slandelle/netty","description":"Netty project - an event-driven asynchronous network application framework","fork":true,"url":"https://api.github.com/repos/slandelle/netty","forks_url":"https://api.github.com/repos/slandelle/netty/forks","keys_url":"https://api.github.com/repos/slandelle/netty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slandelle/netty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slandelle/netty/teams","hooks_url":"https://api.github.com/repos/slandelle/netty/hooks","issue_events_url":"https://api.github.com/repos/slandelle/netty/issues/events{/number}","events_url":"https://api.github.com/repos/slandelle/netty/events","assignees_url":"https://api.github.com/repos/slandelle/netty/assignees{/user}","branches_url":"https://api.github.com/repos/slandelle/netty/branches{/branch}","tags_url":"https://api.github.com/repos/slandelle/netty/tags","blobs_url":"https://api.github.com/repos/slandelle/netty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slandelle/netty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slandelle/netty/git/refs{/sha}","trees_url":"https://api.github.com/repos/slandelle/netty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slandelle/netty/statuses/{sha}","languages_url":"https://api.github.com/repos/slandelle/netty/languages","stargazers_url":"https://api.github.com/repos/slandelle/netty/stargazers","contributors_url":"https://api.github.com/repos/slandelle/netty/contributors","subscribers_url":"https://api.github.com/repos/slandelle/netty/subscribers","subscription_url":"https://api.github.com/repos/slandelle/netty/subscription","commits_url":"https://api.github.com/repos/slandelle/netty/commits{/sha}","git_commits_url":"https://api.github.com/repos/slandelle/netty/git/commits{/sha}","comments_url":"https://api.github.com/repos/slandelle/netty/comments{/number}","issue_comment_url":"https://api.github.com/repos/slandelle/netty/issues/comments{/number}","contents_url":"https://api.github.com/repos/slandelle/netty/contents/{+path}","compare_url":"https://api.github.com/repos/slandelle/netty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slandelle/netty/merges","archive_url":"https://api.github.com/repos/slandelle/netty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slandelle/netty/downloads","issues_url":"https://api.github.com/repos/slandelle/netty/issues{/number}","pulls_url":"https://api.github.com/repos/slandelle/netty/pulls{/number}","milestones_url":"https://api.github.com/repos/slandelle/netty/milestones{/number}","notifications_url":"https://api.github.com/repos/slandelle/netty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slandelle/netty/labels{/name}","releases_url":"https://api.github.com/repos/slandelle/netty/releases{/id}","created_at":"2015-04-14T11:58:26Z","updated_at":"2015-04-14T11:58:34Z","pushed_at":"2015-12-13T08:26:18Z","git_url":"git://github.com/slandelle/netty.git","ssh_url":"git@github.com:slandelle/netty.git","clone_url":"https://github.com/slandelle/netty.git","svn_url":"https://github.com/slandelle/netty","homepage":"http://netty.io/","size":45008,"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":"netty:4.1","ref":"4.1","sha":"e8eda1b99fa0a1765e590357e2b0b4d859d4aebc","user":{"login":"netty","id":473791,"avatar_url":"https://avatars.githubusercontent.com/u/473791?v=3","gravatar_id":"","url":"https://api.github.com/users/netty","html_url":"https://github.com/netty","followers_url":"https://api.github.com/users/netty/followers","following_url":"https://api.github.com/users/netty/following{/other_user}","gists_url":"https://api.github.com/users/netty/gists{/gist_id}","starred_url":"https://api.github.com/users/netty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netty/subscriptions","organizations_url":"https://api.github.com/users/netty/orgs","repos_url":"https://api.github.com/users/netty/repos","events_url":"https://api.github.com/users/netty/events{/privacy}","received_events_url":"https://api.github.com/users/netty/received_events","type":"Organization","site_admin":false},"repo":{"id":1064563,"name":"netty","full_name":"netty/netty","owner":{"login":"netty","id":473791,"avatar_url":"https://avatars.githubusercontent.com/u/473791?v=3","gravatar_id":"","url":"https://api.github.com/users/netty","html_url":"https://github.com/netty","followers_url":"https://api.github.com/users/netty/followers","following_url":"https://api.github.com/users/netty/following{/other_user}","gists_url":"https://api.github.com/users/netty/gists{/gist_id}","starred_url":"https://api.github.com/users/netty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netty/subscriptions","organizations_url":"https://api.github.com/users/netty/orgs","repos_url":"https://api.github.com/users/netty/repos","events_url":"https://api.github.com/users/netty/events{/privacy}","received_events_url":"https://api.github.com/users/netty/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/netty/netty","description":"Netty project - an event-driven asynchronous network application framework","fork":false,"url":"https://api.github.com/repos/netty/netty","forks_url":"https://api.github.com/repos/netty/netty/forks","keys_url":"https://api.github.com/repos/netty/netty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/netty/netty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/netty/netty/teams","hooks_url":"https://api.github.com/repos/netty/netty/hooks","issue_events_url":"https://api.github.com/repos/netty/netty/issues/events{/number}","events_url":"https://api.github.com/repos/netty/netty/events","assignees_url":"https://api.github.com/repos/netty/netty/assignees{/user}","branches_url":"https://api.github.com/repos/netty/netty/branches{/branch}","tags_url":"https://api.github.com/repos/netty/netty/tags","blobs_url":"https://api.github.com/repos/netty/netty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/netty/netty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/netty/netty/git/refs{/sha}","trees_url":"https://api.github.com/repos/netty/netty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/netty/netty/statuses/{sha}","languages_url":"https://api.github.com/repos/netty/netty/languages","stargazers_url":"https://api.github.com/repos/netty/netty/stargazers","contributors_url":"https://api.github.com/repos/netty/netty/contributors","subscribers_url":"https://api.github.com/repos/netty/netty/subscribers","subscription_url":"https://api.github.com/repos/netty/netty/subscription","commits_url":"https://api.github.com/repos/netty/netty/commits{/sha}","git_commits_url":"https://api.github.com/repos/netty/netty/git/commits{/sha}","comments_url":"https://api.github.com/repos/netty/netty/comments{/number}","issue_comment_url":"https://api.github.com/repos/netty/netty/issues/comments{/number}","contents_url":"https://api.github.com/repos/netty/netty/contents/{+path}","compare_url":"https://api.github.com/repos/netty/netty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/netty/netty/merges","archive_url":"https://api.github.com/repos/netty/netty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/netty/netty/downloads","issues_url":"https://api.github.com/repos/netty/netty/issues{/number}","pulls_url":"https://api.github.com/repos/netty/netty/pulls{/number}","milestones_url":"https://api.github.com/repos/netty/netty/milestones{/number}","notifications_url":"https://api.github.com/repos/netty/netty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/netty/netty/labels{/name}","releases_url":"https://api.github.com/repos/netty/netty/releases{/id}","created_at":"2010-11-09T09:22:21Z","updated_at":"2015-12-13T03:29:17Z","pushed_at":"2015-12-13T09:15:35Z","git_url":"git://github.com/netty/netty.git","ssh_url":"git@github.com:netty/netty.git","clone_url":"https://github.com/netty/netty.git","svn_url":"https://github.com/netty/netty","homepage":"http://netty.io/","size":57798,"stargazers_count":5755,"watchers_count":5755,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2919,"mirror_url":null,"open_issues_count":342,"forks":2919,"open_issues":342,"watchers":5755,"default_branch":"4.1"}},"_links":{"self":{"href":"https://api.github.com/repos/netty/netty/pulls/4566"},"html":{"href":"https://github.com/netty/netty/pull/4566"},"issue":{"href":"https://api.github.com/repos/netty/netty/issues/4566"},"comments":{"href":"https://api.github.com/repos/netty/netty/issues/4566/comments"},"review_comments":{"href":"https://api.github.com/repos/netty/netty/pulls/4566/comments"},"review_comment":{"href":"https://api.github.com/repos/netty/netty/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/netty/netty/pulls/4566/commits"},"statuses":{"href":"https://api.github.com/repos/netty/netty/statuses/11d7f2529dd6bfa9572cfb18c74567fcb3e417b7"}}}}