{"action":"created","comment":{"url":"https://api.github.com/repos/square/javapoet/pulls/comments/87208482","pull_request_review_id":7828837,"id":87208482,"diff_hunk":"@@ -107,6 +107,12 @@ private void assertBestGuessThrows(String s) {\n         .isEqualTo(\"java.lang.Object\");\n     assertThat(ClassName.get(OuterClass.InnerClass.class).toString())\n         .isEqualTo(\"com.squareup.javapoet.ClassNameTest.OuterClass.InnerClass\");\n+    try {\n+      assertThat((ClassName.get(new Object() {}.getClass())).toString())\n+          .isEqualTo(\"com.squareup.javapoet.ClassNameTest$1\");\n+    } catch (IllegalArgumentException e) {\n+      fail();","path":"src/test/java/com/squareup/javapoet/ClassNameTest.java","position":8,"original_position":8,"commit_id":"f0d6383c058b0fb0a2631d63768d52edef28da4b","original_commit_id":"f0d6383c058b0fb0a2631d63768d52edef28da4b","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":"Just remove the try/catch. An exception will fail the test.","created_at":"2016-11-09T15:03:54Z","updated_at":"2016-11-09T15:07:31Z","html_url":"https://github.com/square/javapoet/pull/526#discussion_r87208482","pull_request_url":"https://api.github.com/repos/square/javapoet/pulls/526","_links":{"self":{"href":"https://api.github.com/repos/square/javapoet/pulls/comments/87208482"},"html":{"href":"https://github.com/square/javapoet/pull/526#discussion_r87208482"},"pull_request":{"href":"https://api.github.com/repos/square/javapoet/pulls/526"}}},"pull_request":{"url":"https://api.github.com/repos/square/javapoet/pulls/526","id":92950852,"html_url":"https://github.com/square/javapoet/pull/526","diff_url":"https://github.com/square/javapoet/pull/526.diff","patch_url":"https://github.com/square/javapoet/pull/526.patch","issue_url":"https://api.github.com/repos/square/javapoet/issues/526","number":526,"state":"open","locked":false,"title":"Support anonymous inner classes in ClassName#get","user":{"login":"kroepke","id":52014,"avatar_url":"https://avatars.githubusercontent.com/u/52014?v=3","gravatar_id":"","url":"https://api.github.com/users/kroepke","html_url":"https://github.com/kroepke","followers_url":"https://api.github.com/users/kroepke/followers","following_url":"https://api.github.com/users/kroepke/following{/other_user}","gists_url":"https://api.github.com/users/kroepke/gists{/gist_id}","starred_url":"https://api.github.com/users/kroepke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kroepke/subscriptions","organizations_url":"https://api.github.com/users/kroepke/orgs","repos_url":"https://api.github.com/users/kroepke/repos","events_url":"https://api.github.com/users/kroepke/events{/privacy}","received_events_url":"https://api.github.com/users/kroepke/received_events","type":"User","site_admin":false},"body":"ClassName#get incorrectly used Class#getSimpleName for anonymous inner classes, which is an empty string.\r\nWith this change it falls back to using Class#getName for anonymous classes and taking the compiler generated name for the class.\r\n\r\n`mvn clean verify` passed, signed the CLA.","created_at":"2016-11-09T11:58:29Z","updated_at":"2016-11-09T15:07:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f290cf1abcd4a19d140d7c797bbbb9f977a17a91","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/square/javapoet/pulls/526/commits","review_comments_url":"https://api.github.com/repos/square/javapoet/pulls/526/comments","review_comment_url":"https://api.github.com/repos/square/javapoet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/square/javapoet/issues/526/comments","statuses_url":"https://api.github.com/repos/square/javapoet/statuses/f0d6383c058b0fb0a2631d63768d52edef28da4b","head":{"label":"kroepke:anon-inner","ref":"anon-inner","sha":"f0d6383c058b0fb0a2631d63768d52edef28da4b","user":{"login":"kroepke","id":52014,"avatar_url":"https://avatars.githubusercontent.com/u/52014?v=3","gravatar_id":"","url":"https://api.github.com/users/kroepke","html_url":"https://github.com/kroepke","followers_url":"https://api.github.com/users/kroepke/followers","following_url":"https://api.github.com/users/kroepke/following{/other_user}","gists_url":"https://api.github.com/users/kroepke/gists{/gist_id}","starred_url":"https://api.github.com/users/kroepke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kroepke/subscriptions","organizations_url":"https://api.github.com/users/kroepke/orgs","repos_url":"https://api.github.com/users/kroepke/repos","events_url":"https://api.github.com/users/kroepke/events{/privacy}","received_events_url":"https://api.github.com/users/kroepke/received_events","type":"User","site_admin":false},"repo":{"id":73277907,"name":"javapoet","full_name":"kroepke/javapoet","owner":{"login":"kroepke","id":52014,"avatar_url":"https://avatars.githubusercontent.com/u/52014?v=3","gravatar_id":"","url":"https://api.github.com/users/kroepke","html_url":"https://github.com/kroepke","followers_url":"https://api.github.com/users/kroepke/followers","following_url":"https://api.github.com/users/kroepke/following{/other_user}","gists_url":"https://api.github.com/users/kroepke/gists{/gist_id}","starred_url":"https://api.github.com/users/kroepke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kroepke/subscriptions","organizations_url":"https://api.github.com/users/kroepke/orgs","repos_url":"https://api.github.com/users/kroepke/repos","events_url":"https://api.github.com/users/kroepke/events{/privacy}","received_events_url":"https://api.github.com/users/kroepke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kroepke/javapoet","description":"A Java API for generating .java source files.","fork":true,"url":"https://api.github.com/repos/kroepke/javapoet","forks_url":"https://api.github.com/repos/kroepke/javapoet/forks","keys_url":"https://api.github.com/repos/kroepke/javapoet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kroepke/javapoet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kroepke/javapoet/teams","hooks_url":"https://api.github.com/repos/kroepke/javapoet/hooks","issue_events_url":"https://api.github.com/repos/kroepke/javapoet/issues/events{/number}","events_url":"https://api.github.com/repos/kroepke/javapoet/events","assignees_url":"https://api.github.com/repos/kroepke/javapoet/assignees{/user}","branches_url":"https://api.github.com/repos/kroepke/javapoet/branches{/branch}","tags_url":"https://api.github.com/repos/kroepke/javapoet/tags","blobs_url":"https://api.github.com/repos/kroepke/javapoet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kroepke/javapoet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kroepke/javapoet/git/refs{/sha}","trees_url":"https://api.github.com/repos/kroepke/javapoet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kroepke/javapoet/statuses/{sha}","languages_url":"https://api.github.com/repos/kroepke/javapoet/languages","stargazers_url":"https://api.github.com/repos/kroepke/javapoet/stargazers","contributors_url":"https://api.github.com/repos/kroepke/javapoet/contributors","subscribers_url":"https://api.github.com/repos/kroepke/javapoet/subscribers","subscription_url":"https://api.github.com/repos/kroepke/javapoet/subscription","commits_url":"https://api.github.com/repos/kroepke/javapoet/commits{/sha}","git_commits_url":"https://api.github.com/repos/kroepke/javapoet/git/commits{/sha}","comments_url":"https://api.github.com/repos/kroepke/javapoet/comments{/number}","issue_comment_url":"https://api.github.com/repos/kroepke/javapoet/issues/comments{/number}","contents_url":"https://api.github.com/repos/kroepke/javapoet/contents/{+path}","compare_url":"https://api.github.com/repos/kroepke/javapoet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kroepke/javapoet/merges","archive_url":"https://api.github.com/repos/kroepke/javapoet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kroepke/javapoet/downloads","issues_url":"https://api.github.com/repos/kroepke/javapoet/issues{/number}","pulls_url":"https://api.github.com/repos/kroepke/javapoet/pulls{/number}","milestones_url":"https://api.github.com/repos/kroepke/javapoet/milestones{/number}","notifications_url":"https://api.github.com/repos/kroepke/javapoet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kroepke/javapoet/labels{/name}","releases_url":"https://api.github.com/repos/kroepke/javapoet/releases{/id}","deployments_url":"https://api.github.com/repos/kroepke/javapoet/deployments","created_at":"2016-11-09T11:24:15Z","updated_at":"2016-11-09T11:24:16Z","pushed_at":"2016-11-09T12:04:26Z","git_url":"git://github.com/kroepke/javapoet.git","ssh_url":"git@github.com:kroepke/javapoet.git","clone_url":"https://github.com/kroepke/javapoet.git","svn_url":"https://github.com/kroepke/javapoet","homepage":"","size":1504,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"square:master","ref":"master","sha":"4eda8d4a3639f7645e7125a45d183db4d22a50c4","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":7961991,"name":"javapoet","full_name":"square/javapoet","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/javapoet","description":"A Java API for generating .java source files.","fork":false,"url":"https://api.github.com/repos/square/javapoet","forks_url":"https://api.github.com/repos/square/javapoet/forks","keys_url":"https://api.github.com/repos/square/javapoet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/javapoet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/javapoet/teams","hooks_url":"https://api.github.com/repos/square/javapoet/hooks","issue_events_url":"https://api.github.com/repos/square/javapoet/issues/events{/number}","events_url":"https://api.github.com/repos/square/javapoet/events","assignees_url":"https://api.github.com/repos/square/javapoet/assignees{/user}","branches_url":"https://api.github.com/repos/square/javapoet/branches{/branch}","tags_url":"https://api.github.com/repos/square/javapoet/tags","blobs_url":"https://api.github.com/repos/square/javapoet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/javapoet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/javapoet/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/javapoet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/javapoet/statuses/{sha}","languages_url":"https://api.github.com/repos/square/javapoet/languages","stargazers_url":"https://api.github.com/repos/square/javapoet/stargazers","contributors_url":"https://api.github.com/repos/square/javapoet/contributors","subscribers_url":"https://api.github.com/repos/square/javapoet/subscribers","subscription_url":"https://api.github.com/repos/square/javapoet/subscription","commits_url":"https://api.github.com/repos/square/javapoet/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/javapoet/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/javapoet/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/javapoet/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/javapoet/contents/{+path}","compare_url":"https://api.github.com/repos/square/javapoet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/javapoet/merges","archive_url":"https://api.github.com/repos/square/javapoet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/javapoet/downloads","issues_url":"https://api.github.com/repos/square/javapoet/issues{/number}","pulls_url":"https://api.github.com/repos/square/javapoet/pulls{/number}","milestones_url":"https://api.github.com/repos/square/javapoet/milestones{/number}","notifications_url":"https://api.github.com/repos/square/javapoet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/javapoet/labels{/name}","releases_url":"https://api.github.com/repos/square/javapoet/releases{/id}","deployments_url":"https://api.github.com/repos/square/javapoet/deployments","created_at":"2013-02-01T16:56:30Z","updated_at":"2016-11-09T09:39:17Z","pushed_at":"2016-11-09T12:04:26Z","git_url":"git://github.com/square/javapoet.git","ssh_url":"git@github.com:square/javapoet.git","clone_url":"https://github.com/square/javapoet.git","svn_url":"https://github.com/square/javapoet","homepage":"","size":2229,"stargazers_count":2589,"watchers_count":2589,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":385,"mirror_url":null,"open_issues_count":41,"forks":385,"open_issues":41,"watchers":2589,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/square/javapoet/pulls/526"},"html":{"href":"https://github.com/square/javapoet/pull/526"},"issue":{"href":"https://api.github.com/repos/square/javapoet/issues/526"},"comments":{"href":"https://api.github.com/repos/square/javapoet/issues/526/comments"},"review_comments":{"href":"https://api.github.com/repos/square/javapoet/pulls/526/comments"},"review_comment":{"href":"https://api.github.com/repos/square/javapoet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/square/javapoet/pulls/526/commits"},"statuses":{"href":"https://api.github.com/repos/square/javapoet/statuses/f0d6383c058b0fb0a2631d63768d52edef28da4b"}}}}
{"actor":{"display_login":"JakeWharton"}}