{"action":"created","comment":{"url":"https://api.github.com/repos/square/wire/pulls/comments/38720145","id":38720145,"diff_hunk":"@@ -55,19 +55,25 @@ public static UnknownFieldType of(String name) {\n \n   private final Gson gson;\n   private final RuntimeMessageAdapter<M, B> messageAdapter;\n-  private final Map<String, TagBinding<M, Message.Builder<M, B>>> tagMap;\n+  private final Map<String, FieldBinding<M, B>> fieldBindings;\n+  private final Map<String, RegisteredExtension> extensions;\n \n   @SuppressWarnings(\"unchecked\")\n   public MessageTypeAdapter(Wire wire, Gson gson, TypeToken<M> type) {\n     this.gson = gson;\n     this.messageAdapter = wire.messageAdapter((Class<M>) type.getRawType());\n \n-    Map<String, TagBinding<M, Message.Builder<M, B>>> tagMap\n-        = new LinkedHashMap<String, TagBinding<M, Message.Builder<M, B>>>();\n-    for (TagBinding<M, Message.Builder<M, B>> tagBinding : messageAdapter.tagBindings().values()) {\n-      tagMap.put(tagBinding.name, tagBinding);\n+    Map<String, FieldBinding<M, B>> fieldBindings = new LinkedHashMap<String, FieldBinding<M, B>>();","path":"wire-gson-support/src/main/java/com/squareup/wire/MessageTypeAdapter.java","position":17,"original_position":17,"commit_id":"84058945451dedab0d986487603a705c4bbe5063","original_commit_id":"84058945451dedab0d986487603a705c4bbe5063","user":{"login":"JakeWharton","id":66577,"avatar_url":"https://avatars.githubusercontent.com/u/66577?v=3","gravatar_id":"","url":"https://api.github.com/users/JakeWharton","html_url":"https://github.com/JakeWharton","followers_url":"https://api.github.com/users/JakeWharton/followers","following_url":"https://api.github.com/users/JakeWharton/following{/other_user}","gists_url":"https://api.github.com/users/JakeWharton/gists{/gist_id}","starred_url":"https://api.github.com/users/JakeWharton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakeWharton/subscriptions","organizations_url":"https://api.github.com/users/JakeWharton/orgs","repos_url":"https://api.github.com/users/JakeWharton/repos","events_url":"https://api.github.com/users/JakeWharton/events{/privacy}","received_events_url":"https://api.github.com/users/JakeWharton/received_events","type":"User","site_admin":false},"body":"Next PR: switch language level to Java 7 for the diamond operator already!","created_at":"2015-09-04T04:04:34Z","updated_at":"2015-09-04T04:04:34Z","html_url":"https://github.com/square/wire/pull/354#discussion_r38720145","pull_request_url":"https://api.github.com/repos/square/wire/pulls/354","_links":{"self":{"href":"https://api.github.com/repos/square/wire/pulls/comments/38720145"},"html":{"href":"https://github.com/square/wire/pull/354#discussion_r38720145"},"pull_request":{"href":"https://api.github.com/repos/square/wire/pulls/354"}}},"pull_request":{"url":"https://api.github.com/repos/square/wire/pulls/354","id":44181058,"html_url":"https://github.com/square/wire/pull/354","diff_url":"https://github.com/square/wire/pull/354.diff","patch_url":"https://github.com/square/wire/pull/354.patch","issue_url":"https://api.github.com/repos/square/wire/issues/354","number":354,"state":"open","locked":false,"title":"Change how extensions are bound in RuntimeMessageAdapter.","user":{"login":"swankjesse","id":133019,"avatar_url":"https://avatars.githubusercontent.com/u/133019?v=3","gravatar_id":"","url":"https://api.github.com/users/swankjesse","html_url":"https://github.com/swankjesse","followers_url":"https://api.github.com/users/swankjesse/followers","following_url":"https://api.github.com/users/swankjesse/following{/other_user}","gists_url":"https://api.github.com/users/swankjesse/gists{/gist_id}","starred_url":"https://api.github.com/users/swankjesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swankjesse/subscriptions","organizations_url":"https://api.github.com/users/swankjesse/orgs","repos_url":"https://api.github.com/users/swankjesse/repos","events_url":"https://api.github.com/users/swankjesse/events{/privacy}","received_events_url":"https://api.github.com/users/swankjesse/received_events","type":"User","site_admin":false},"body":"For a while we were using TagBinding which made extensions work just like\r\nknown fields.\r\n\r\nWith this change extensions get closer to unknown fields. This fits better\r\nas currently we're manually filtering out extensions wherever we iterate\r\nthe tags map.","created_at":"2015-09-04T03:49:56Z","updated_at":"2015-09-04T04:04:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7035bb5f2cbe2bd7476dbc910d864958802d2f1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/square/wire/pulls/354/commits","review_comments_url":"https://api.github.com/repos/square/wire/pulls/354/comments","review_comment_url":"https://api.github.com/repos/square/wire/pulls/comments{/number}","comments_url":"https://api.github.com/repos/square/wire/issues/354/comments","statuses_url":"https://api.github.com/repos/square/wire/statuses/84058945451dedab0d986487603a705c4bbe5063","head":{"label":"square:jwilson_0903_field_binding","ref":"jwilson_0903_field_binding","sha":"84058945451dedab0d986487603a705c4bbe5063","user":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":12274147,"name":"wire","full_name":"square/wire","owner":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/wire","description":"Clean, lightweight protocol buffers for Android and Java.","fork":false,"url":"https://api.github.com/repos/square/wire","forks_url":"https://api.github.com/repos/square/wire/forks","keys_url":"https://api.github.com/repos/square/wire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/wire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/wire/teams","hooks_url":"https://api.github.com/repos/square/wire/hooks","issue_events_url":"https://api.github.com/repos/square/wire/issues/events{/number}","events_url":"https://api.github.com/repos/square/wire/events","assignees_url":"https://api.github.com/repos/square/wire/assignees{/user}","branches_url":"https://api.github.com/repos/square/wire/branches{/branch}","tags_url":"https://api.github.com/repos/square/wire/tags","blobs_url":"https://api.github.com/repos/square/wire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/wire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/wire/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/wire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/wire/statuses/{sha}","languages_url":"https://api.github.com/repos/square/wire/languages","stargazers_url":"https://api.github.com/repos/square/wire/stargazers","contributors_url":"https://api.github.com/repos/square/wire/contributors","subscribers_url":"https://api.github.com/repos/square/wire/subscribers","subscription_url":"https://api.github.com/repos/square/wire/subscription","commits_url":"https://api.github.com/repos/square/wire/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/wire/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/wire/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/wire/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/wire/contents/{+path}","compare_url":"https://api.github.com/repos/square/wire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/wire/merges","archive_url":"https://api.github.com/repos/square/wire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/wire/downloads","issues_url":"https://api.github.com/repos/square/wire/issues{/number}","pulls_url":"https://api.github.com/repos/square/wire/pulls{/number}","milestones_url":"https://api.github.com/repos/square/wire/milestones{/number}","notifications_url":"https://api.github.com/repos/square/wire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/wire/labels{/name}","releases_url":"https://api.github.com/repos/square/wire/releases{/id}","created_at":"2013-08-21T15:45:47Z","updated_at":"2015-09-03T17:41:10Z","pushed_at":"2015-09-04T03:51:33Z","git_url":"git://github.com/square/wire.git","ssh_url":"git@github.com:square/wire.git","clone_url":"https://github.com/square/wire.git","svn_url":"https://github.com/square/wire","homepage":"","size":6718,"stargazers_count":892,"watchers_count":892,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":137,"mirror_url":null,"open_issues_count":19,"forks":137,"open_issues":19,"watchers":892,"default_branch":"master"}},"base":{"label":"square:master","ref":"master","sha":"f11253b3c242d1bf74061c24331cfa2fe62bc98b","user":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":12274147,"name":"wire","full_name":"square/wire","owner":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/wire","description":"Clean, lightweight protocol buffers for Android and Java.","fork":false,"url":"https://api.github.com/repos/square/wire","forks_url":"https://api.github.com/repos/square/wire/forks","keys_url":"https://api.github.com/repos/square/wire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/wire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/wire/teams","hooks_url":"https://api.github.com/repos/square/wire/hooks","issue_events_url":"https://api.github.com/repos/square/wire/issues/events{/number}","events_url":"https://api.github.com/repos/square/wire/events","assignees_url":"https://api.github.com/repos/square/wire/assignees{/user}","branches_url":"https://api.github.com/repos/square/wire/branches{/branch}","tags_url":"https://api.github.com/repos/square/wire/tags","blobs_url":"https://api.github.com/repos/square/wire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/wire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/wire/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/wire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/wire/statuses/{sha}","languages_url":"https://api.github.com/repos/square/wire/languages","stargazers_url":"https://api.github.com/repos/square/wire/stargazers","contributors_url":"https://api.github.com/repos/square/wire/contributors","subscribers_url":"https://api.github.com/repos/square/wire/subscribers","subscription_url":"https://api.github.com/repos/square/wire/subscription","commits_url":"https://api.github.com/repos/square/wire/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/wire/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/wire/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/wire/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/wire/contents/{+path}","compare_url":"https://api.github.com/repos/square/wire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/wire/merges","archive_url":"https://api.github.com/repos/square/wire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/wire/downloads","issues_url":"https://api.github.com/repos/square/wire/issues{/number}","pulls_url":"https://api.github.com/repos/square/wire/pulls{/number}","milestones_url":"https://api.github.com/repos/square/wire/milestones{/number}","notifications_url":"https://api.github.com/repos/square/wire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/wire/labels{/name}","releases_url":"https://api.github.com/repos/square/wire/releases{/id}","created_at":"2013-08-21T15:45:47Z","updated_at":"2015-09-03T17:41:10Z","pushed_at":"2015-09-04T03:51:33Z","git_url":"git://github.com/square/wire.git","ssh_url":"git@github.com:square/wire.git","clone_url":"https://github.com/square/wire.git","svn_url":"https://github.com/square/wire","homepage":"","size":6718,"stargazers_count":892,"watchers_count":892,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":137,"mirror_url":null,"open_issues_count":19,"forks":137,"open_issues":19,"watchers":892,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/square/wire/pulls/354"},"html":{"href":"https://github.com/square/wire/pull/354"},"issue":{"href":"https://api.github.com/repos/square/wire/issues/354"},"comments":{"href":"https://api.github.com/repos/square/wire/issues/354/comments"},"review_comments":{"href":"https://api.github.com/repos/square/wire/pulls/354/comments"},"review_comment":{"href":"https://api.github.com/repos/square/wire/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/square/wire/pulls/354/commits"},"statuses":{"href":"https://api.github.com/repos/square/wire/statuses/84058945451dedab0d986487603a705c4bbe5063"}}}}