{"action":"created","comment":{"url":"https://api.github.com/repos/jhalterman/typetools/pulls/comments/57830788","id":57830788,"diff_hunk":"@@ -42,7 +42,6 @@\n   /** Cache of type variable/argument pairs */\n   private static final Map<Class<?>, Reference<Map<TypeVariable<?>, Type>>> typeVariableCache = Collections\n       .synchronizedMap(new WeakHashMap<Class<?>, Reference<Map<TypeVariable<?>, Type>>>());\n-  private static volatile int METHOD_REF_OFFSET = -1;","path":"src/main/java/net/jodah/typetools/TypeResolver.java","position":4,"original_position":4,"commit_id":"3cb8f11b8d8ba0b28869322b595ec912709647ff","original_commit_id":"3cb8f11b8d8ba0b28869322b595ec912709647ff","user":{"login":"jhalterman","id":228804,"avatar_url":"https://avatars.githubusercontent.com/u/228804?v=3","gravatar_id":"","url":"https://api.github.com/users/jhalterman","html_url":"https://github.com/jhalterman","followers_url":"https://api.github.com/users/jhalterman/followers","following_url":"https://api.github.com/users/jhalterman/following{/other_user}","gists_url":"https://api.github.com/users/jhalterman/gists{/gist_id}","starred_url":"https://api.github.com/users/jhalterman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhalterman/subscriptions","organizations_url":"https://api.github.com/users/jhalterman/orgs","repos_url":"https://api.github.com/users/jhalterman/repos","events_url":"https://api.github.com/users/jhalterman/events{/privacy}","received_events_url":"https://api.github.com/users/jhalterman/received_events","type":"User","site_admin":false},"body":"That sounds fine to me.","created_at":"2016-03-30T02:47:03Z","updated_at":"2016-03-30T02:47:03Z","html_url":"https://github.com/jhalterman/typetools/pull/23#discussion_r57830788","pull_request_url":"https://api.github.com/repos/jhalterman/typetools/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/jhalterman/typetools/pulls/comments/57830788"},"html":{"href":"https://github.com/jhalterman/typetools/pull/23#discussion_r57830788"},"pull_request":{"href":"https://api.github.com/repos/jhalterman/typetools/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/jhalterman/typetools/pulls/23","id":64563870,"html_url":"https://github.com/jhalterman/typetools/pull/23","diff_url":"https://github.com/jhalterman/typetools/pull/23.diff","patch_url":"https://github.com/jhalterman/typetools/pull/23.patch","issue_url":"https://api.github.com/repos/jhalterman/typetools/issues/23","number":23,"state":"open","locked":false,"title":"Handle lambdas whose interfaces extend Serializable","user":{"login":"JoshRosen","id":50748,"avatar_url":"https://avatars.githubusercontent.com/u/50748?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshRosen","html_url":"https://github.com/JoshRosen","followers_url":"https://api.github.com/users/JoshRosen/followers","following_url":"https://api.github.com/users/JoshRosen/following{/other_user}","gists_url":"https://api.github.com/users/JoshRosen/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshRosen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshRosen/subscriptions","organizations_url":"https://api.github.com/users/JoshRosen/orgs","repos_url":"https://api.github.com/users/JoshRosen/repos","events_url":"https://api.github.com/users/JoshRosen/events{/privacy}","received_events_url":"https://api.github.com/users/JoshRosen/received_events","type":"User","site_admin":false},"body":"This patch addresses an issue which prevented the type parameters of lambdas from being resolved when the lambda's interface extends `Serializable` and lacks an explicit `@FunctionalInterface` annotation.\r\n\r\nTo illustrate this issue, 7f931c5 adds a failing regression test. In a nutshell, it seems that the problem stems from the fact that the lambda's constant pool contains multiple entries and the first entry that we inspected corresponded to an `<init>` method rather than the single abstract method.\r\n\r\nTo fix this issue, this patch refactors the method ref info code to always ignore `<init>` methods (previously, it only ignored `<init>` for lambdas which have auto-boxed return types). I also simplified the handling of `valueOf` in an attempt to make the code easier to understand and more linear.","created_at":"2016-03-30T02:39:49Z","updated_at":"2016-03-30T02:47:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jhalterman/typetools/pulls/23/commits","review_comments_url":"https://api.github.com/repos/jhalterman/typetools/pulls/23/comments","review_comment_url":"https://api.github.com/repos/jhalterman/typetools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jhalterman/typetools/issues/23/comments","statuses_url":"https://api.github.com/repos/jhalterman/typetools/statuses/3cb8f11b8d8ba0b28869322b595ec912709647ff","head":{"label":"JoshRosen:serializable-lambda-fixes","ref":"serializable-lambda-fixes","sha":"3cb8f11b8d8ba0b28869322b595ec912709647ff","user":{"login":"JoshRosen","id":50748,"avatar_url":"https://avatars.githubusercontent.com/u/50748?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshRosen","html_url":"https://github.com/JoshRosen","followers_url":"https://api.github.com/users/JoshRosen/followers","following_url":"https://api.github.com/users/JoshRosen/following{/other_user}","gists_url":"https://api.github.com/users/JoshRosen/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshRosen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshRosen/subscriptions","organizations_url":"https://api.github.com/users/JoshRosen/orgs","repos_url":"https://api.github.com/users/JoshRosen/repos","events_url":"https://api.github.com/users/JoshRosen/events{/privacy}","received_events_url":"https://api.github.com/users/JoshRosen/received_events","type":"User","site_admin":false},"repo":{"id":55009107,"name":"typetools","full_name":"JoshRosen/typetools","owner":{"login":"JoshRosen","id":50748,"avatar_url":"https://avatars.githubusercontent.com/u/50748?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshRosen","html_url":"https://github.com/JoshRosen","followers_url":"https://api.github.com/users/JoshRosen/followers","following_url":"https://api.github.com/users/JoshRosen/following{/other_user}","gists_url":"https://api.github.com/users/JoshRosen/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshRosen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshRosen/subscriptions","organizations_url":"https://api.github.com/users/JoshRosen/orgs","repos_url":"https://api.github.com/users/JoshRosen/repos","events_url":"https://api.github.com/users/JoshRosen/events{/privacy}","received_events_url":"https://api.github.com/users/JoshRosen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JoshRosen/typetools","description":"Tools for resolving generic types","fork":true,"url":"https://api.github.com/repos/JoshRosen/typetools","forks_url":"https://api.github.com/repos/JoshRosen/typetools/forks","keys_url":"https://api.github.com/repos/JoshRosen/typetools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JoshRosen/typetools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JoshRosen/typetools/teams","hooks_url":"https://api.github.com/repos/JoshRosen/typetools/hooks","issue_events_url":"https://api.github.com/repos/JoshRosen/typetools/issues/events{/number}","events_url":"https://api.github.com/repos/JoshRosen/typetools/events","assignees_url":"https://api.github.com/repos/JoshRosen/typetools/assignees{/user}","branches_url":"https://api.github.com/repos/JoshRosen/typetools/branches{/branch}","tags_url":"https://api.github.com/repos/JoshRosen/typetools/tags","blobs_url":"https://api.github.com/repos/JoshRosen/typetools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JoshRosen/typetools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JoshRosen/typetools/git/refs{/sha}","trees_url":"https://api.github.com/repos/JoshRosen/typetools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JoshRosen/typetools/statuses/{sha}","languages_url":"https://api.github.com/repos/JoshRosen/typetools/languages","stargazers_url":"https://api.github.com/repos/JoshRosen/typetools/stargazers","contributors_url":"https://api.github.com/repos/JoshRosen/typetools/contributors","subscribers_url":"https://api.github.com/repos/JoshRosen/typetools/subscribers","subscription_url":"https://api.github.com/repos/JoshRosen/typetools/subscription","commits_url":"https://api.github.com/repos/JoshRosen/typetools/commits{/sha}","git_commits_url":"https://api.github.com/repos/JoshRosen/typetools/git/commits{/sha}","comments_url":"https://api.github.com/repos/JoshRosen/typetools/comments{/number}","issue_comment_url":"https://api.github.com/repos/JoshRosen/typetools/issues/comments{/number}","contents_url":"https://api.github.com/repos/JoshRosen/typetools/contents/{+path}","compare_url":"https://api.github.com/repos/JoshRosen/typetools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JoshRosen/typetools/merges","archive_url":"https://api.github.com/repos/JoshRosen/typetools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JoshRosen/typetools/downloads","issues_url":"https://api.github.com/repos/JoshRosen/typetools/issues{/number}","pulls_url":"https://api.github.com/repos/JoshRosen/typetools/pulls{/number}","milestones_url":"https://api.github.com/repos/JoshRosen/typetools/milestones{/number}","notifications_url":"https://api.github.com/repos/JoshRosen/typetools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JoshRosen/typetools/labels{/name}","releases_url":"https://api.github.com/repos/JoshRosen/typetools/releases{/id}","deployments_url":"https://api.github.com/repos/JoshRosen/typetools/deployments","created_at":"2016-03-29T20:41:53Z","updated_at":"2016-03-29T20:41:53Z","pushed_at":"2016-03-30T02:21:58Z","git_url":"git://github.com/JoshRosen/typetools.git","ssh_url":"git@github.com:JoshRosen/typetools.git","clone_url":"https://github.com/JoshRosen/typetools.git","svn_url":"https://github.com/JoshRosen/typetools","homepage":"","size":216,"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":"jhalterman:master","ref":"master","sha":"6d5f375d6dae7daee4742ad5c97d1b8f50146c23","user":{"login":"jhalterman","id":228804,"avatar_url":"https://avatars.githubusercontent.com/u/228804?v=3","gravatar_id":"","url":"https://api.github.com/users/jhalterman","html_url":"https://github.com/jhalterman","followers_url":"https://api.github.com/users/jhalterman/followers","following_url":"https://api.github.com/users/jhalterman/following{/other_user}","gists_url":"https://api.github.com/users/jhalterman/gists{/gist_id}","starred_url":"https://api.github.com/users/jhalterman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhalterman/subscriptions","organizations_url":"https://api.github.com/users/jhalterman/orgs","repos_url":"https://api.github.com/users/jhalterman/repos","events_url":"https://api.github.com/users/jhalterman/events{/privacy}","received_events_url":"https://api.github.com/users/jhalterman/received_events","type":"User","site_admin":false},"repo":{"id":1019228,"name":"typetools","full_name":"jhalterman/typetools","owner":{"login":"jhalterman","id":228804,"avatar_url":"https://avatars.githubusercontent.com/u/228804?v=3","gravatar_id":"","url":"https://api.github.com/users/jhalterman","html_url":"https://github.com/jhalterman","followers_url":"https://api.github.com/users/jhalterman/followers","following_url":"https://api.github.com/users/jhalterman/following{/other_user}","gists_url":"https://api.github.com/users/jhalterman/gists{/gist_id}","starred_url":"https://api.github.com/users/jhalterman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhalterman/subscriptions","organizations_url":"https://api.github.com/users/jhalterman/orgs","repos_url":"https://api.github.com/users/jhalterman/repos","events_url":"https://api.github.com/users/jhalterman/events{/privacy}","received_events_url":"https://api.github.com/users/jhalterman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jhalterman/typetools","description":"Tools for resolving generic types","fork":false,"url":"https://api.github.com/repos/jhalterman/typetools","forks_url":"https://api.github.com/repos/jhalterman/typetools/forks","keys_url":"https://api.github.com/repos/jhalterman/typetools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jhalterman/typetools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jhalterman/typetools/teams","hooks_url":"https://api.github.com/repos/jhalterman/typetools/hooks","issue_events_url":"https://api.github.com/repos/jhalterman/typetools/issues/events{/number}","events_url":"https://api.github.com/repos/jhalterman/typetools/events","assignees_url":"https://api.github.com/repos/jhalterman/typetools/assignees{/user}","branches_url":"https://api.github.com/repos/jhalterman/typetools/branches{/branch}","tags_url":"https://api.github.com/repos/jhalterman/typetools/tags","blobs_url":"https://api.github.com/repos/jhalterman/typetools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jhalterman/typetools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jhalterman/typetools/git/refs{/sha}","trees_url":"https://api.github.com/repos/jhalterman/typetools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jhalterman/typetools/statuses/{sha}","languages_url":"https://api.github.com/repos/jhalterman/typetools/languages","stargazers_url":"https://api.github.com/repos/jhalterman/typetools/stargazers","contributors_url":"https://api.github.com/repos/jhalterman/typetools/contributors","subscribers_url":"https://api.github.com/repos/jhalterman/typetools/subscribers","subscription_url":"https://api.github.com/repos/jhalterman/typetools/subscription","commits_url":"https://api.github.com/repos/jhalterman/typetools/commits{/sha}","git_commits_url":"https://api.github.com/repos/jhalterman/typetools/git/commits{/sha}","comments_url":"https://api.github.com/repos/jhalterman/typetools/comments{/number}","issue_comment_url":"https://api.github.com/repos/jhalterman/typetools/issues/comments{/number}","contents_url":"https://api.github.com/repos/jhalterman/typetools/contents/{+path}","compare_url":"https://api.github.com/repos/jhalterman/typetools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jhalterman/typetools/merges","archive_url":"https://api.github.com/repos/jhalterman/typetools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jhalterman/typetools/downloads","issues_url":"https://api.github.com/repos/jhalterman/typetools/issues{/number}","pulls_url":"https://api.github.com/repos/jhalterman/typetools/pulls{/number}","milestones_url":"https://api.github.com/repos/jhalterman/typetools/milestones{/number}","notifications_url":"https://api.github.com/repos/jhalterman/typetools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jhalterman/typetools/labels{/name}","releases_url":"https://api.github.com/repos/jhalterman/typetools/releases{/id}","deployments_url":"https://api.github.com/repos/jhalterman/typetools/deployments","created_at":"2010-10-24T07:11:54Z","updated_at":"2016-03-30T01:14:02Z","pushed_at":"2016-03-30T02:41:25Z","git_url":"git://github.com/jhalterman/typetools.git","ssh_url":"git@github.com:jhalterman/typetools.git","clone_url":"https://github.com/jhalterman/typetools.git","svn_url":"https://github.com/jhalterman/typetools","homepage":"","size":239,"stargazers_count":173,"watchers_count":173,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":26,"mirror_url":null,"open_issues_count":9,"forks":26,"open_issues":9,"watchers":173,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jhalterman/typetools/pulls/23"},"html":{"href":"https://github.com/jhalterman/typetools/pull/23"},"issue":{"href":"https://api.github.com/repos/jhalterman/typetools/issues/23"},"comments":{"href":"https://api.github.com/repos/jhalterman/typetools/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/jhalterman/typetools/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/jhalterman/typetools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jhalterman/typetools/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/jhalterman/typetools/statuses/3cb8f11b8d8ba0b28869322b595ec912709647ff"}}}}