{"action":"created","comment":{"url":"https://api.github.com/repos/square/javapoet/pulls/comments/23268824","id":23268824,"diff_hunk":"@@ -111,13 +106,22 @@ void emit(CodeWriter codeWriter, String enclosingName, Set<Modifier> implicitMod\n         firstException = false;\n       }\n     }\n-    codeWriter.emit(\" {\\n\");\n \n-    codeWriter.indent();\n-    codeWriter.emit(code);\n-    codeWriter.unindent();\n+    if (hasModifier(Modifier.ABSTRACT)) {\n+      codeWriter.emit(\";\\n\");\n+    } else if (hasModifier(Modifier.NATIVE)) {\n+      // code is allowed to support stuff like GWT JSNI","path":"src/main/java/com/squareup/javapoet/MethodSpec.java","position":24,"original_position":24,"commit_id":"1f60c836845fd9590c7552f1ead95ef4295be053","original_commit_id":"1f60c836845fd9590c7552f1ead95ef4295be053","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":"super nit: Capitalize + period. [Comments should be sentences][1].\r\n\r\n [1]: nedbatchelder.com/blog/201401/comments_should_be_sentences.html","created_at":"2015-01-21T00:12:09Z","updated_at":"2015-01-21T00:12:09Z","html_url":"https://github.com/square/javapoet/pull/192#discussion_r23268824","pull_request_url":"https://api.github.com/repos/square/javapoet/pulls/192","_links":{"self":{"href":"https://api.github.com/repos/square/javapoet/pulls/comments/23268824"},"html":{"href":"https://github.com/square/javapoet/pull/192#discussion_r23268824"},"pull_request":{"href":"https://api.github.com/repos/square/javapoet/pulls/192"}}},"pull_request":{"url":"https://api.github.com/repos/square/javapoet/pulls/192","id":27724764,"html_url":"https://github.com/square/javapoet/pull/192","diff_url":"https://github.com/square/javapoet/pull/192.diff","patch_url":"https://github.com/square/javapoet/pull/192.patch","issue_url":"https://api.github.com/repos/square/javapoet/issues/192","number":192,"state":"open","locked":false,"title":"Native methods and GWT JSNI","user":{"login":"nmorel","id":1496039,"avatar_url":"https://avatars.githubusercontent.com/u/1496039?v=3","gravatar_id":"","url":"https://api.github.com/users/nmorel","html_url":"https://github.com/nmorel","followers_url":"https://api.github.com/users/nmorel/followers","following_url":"https://api.github.com/users/nmorel/following{/other_user}","gists_url":"https://api.github.com/users/nmorel/gists{/gist_id}","starred_url":"https://api.github.com/users/nmorel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmorel/subscriptions","organizations_url":"https://api.github.com/users/nmorel/orgs","repos_url":"https://api.github.com/users/nmorel/repos","events_url":"https://api.github.com/users/nmorel/events{/privacy}","received_events_url":"https://api.github.com/users/nmorel/received_events","type":"User","site_admin":false},"body":"Stop generating curly braces for native methods and allow arbritary code before the semi-colon to support stuff like GWT JSNI.\r\n\r\nI also moved code for abstract method to support exceptions.\r\n\r\nIt fixes issue #190. ","created_at":"2015-01-21T00:09:42Z","updated_at":"2015-01-21T00:12:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc6b6421933a906b584df0fc9211dc995c913b08","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/square/javapoet/pulls/192/commits","review_comments_url":"https://api.github.com/repos/square/javapoet/pulls/192/comments","review_comment_url":"https://api.github.com/repos/square/javapoet/pulls/comments/{number}","comments_url":"https://api.github.com/repos/square/javapoet/issues/192/comments","statuses_url":"https://api.github.com/repos/square/javapoet/statuses/1f60c836845fd9590c7552f1ead95ef4295be053","head":{"label":"nmorel:native_and_jsni_methods","ref":"native_and_jsni_methods","sha":"1f60c836845fd9590c7552f1ead95ef4295be053","user":{"login":"nmorel","id":1496039,"avatar_url":"https://avatars.githubusercontent.com/u/1496039?v=3","gravatar_id":"","url":"https://api.github.com/users/nmorel","html_url":"https://github.com/nmorel","followers_url":"https://api.github.com/users/nmorel/followers","following_url":"https://api.github.com/users/nmorel/following{/other_user}","gists_url":"https://api.github.com/users/nmorel/gists{/gist_id}","starred_url":"https://api.github.com/users/nmorel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmorel/subscriptions","organizations_url":"https://api.github.com/users/nmorel/orgs","repos_url":"https://api.github.com/users/nmorel/repos","events_url":"https://api.github.com/users/nmorel/events{/privacy}","received_events_url":"https://api.github.com/users/nmorel/received_events","type":"User","site_admin":false},"repo":{"id":29560727,"name":"javapoet","full_name":"nmorel/javapoet","owner":{"login":"nmorel","id":1496039,"avatar_url":"https://avatars.githubusercontent.com/u/1496039?v=3","gravatar_id":"","url":"https://api.github.com/users/nmorel","html_url":"https://github.com/nmorel","followers_url":"https://api.github.com/users/nmorel/followers","following_url":"https://api.github.com/users/nmorel/following{/other_user}","gists_url":"https://api.github.com/users/nmorel/gists{/gist_id}","starred_url":"https://api.github.com/users/nmorel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmorel/subscriptions","organizations_url":"https://api.github.com/users/nmorel/orgs","repos_url":"https://api.github.com/users/nmorel/repos","events_url":"https://api.github.com/users/nmorel/events{/privacy}","received_events_url":"https://api.github.com/users/nmorel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nmorel/javapoet","description":"A Java API for generating .java source files.","fork":true,"url":"https://api.github.com/repos/nmorel/javapoet","forks_url":"https://api.github.com/repos/nmorel/javapoet/forks","keys_url":"https://api.github.com/repos/nmorel/javapoet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nmorel/javapoet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nmorel/javapoet/teams","hooks_url":"https://api.github.com/repos/nmorel/javapoet/hooks","issue_events_url":"https://api.github.com/repos/nmorel/javapoet/issues/events{/number}","events_url":"https://api.github.com/repos/nmorel/javapoet/events","assignees_url":"https://api.github.com/repos/nmorel/javapoet/assignees{/user}","branches_url":"https://api.github.com/repos/nmorel/javapoet/branches{/branch}","tags_url":"https://api.github.com/repos/nmorel/javapoet/tags","blobs_url":"https://api.github.com/repos/nmorel/javapoet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nmorel/javapoet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nmorel/javapoet/git/refs{/sha}","trees_url":"https://api.github.com/repos/nmorel/javapoet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nmorel/javapoet/statuses/{sha}","languages_url":"https://api.github.com/repos/nmorel/javapoet/languages","stargazers_url":"https://api.github.com/repos/nmorel/javapoet/stargazers","contributors_url":"https://api.github.com/repos/nmorel/javapoet/contributors","subscribers_url":"https://api.github.com/repos/nmorel/javapoet/subscribers","subscription_url":"https://api.github.com/repos/nmorel/javapoet/subscription","commits_url":"https://api.github.com/repos/nmorel/javapoet/commits{/sha}","git_commits_url":"https://api.github.com/repos/nmorel/javapoet/git/commits{/sha}","comments_url":"https://api.github.com/repos/nmorel/javapoet/comments{/number}","issue_comment_url":"https://api.github.com/repos/nmorel/javapoet/issues/comments/{number}","contents_url":"https://api.github.com/repos/nmorel/javapoet/contents/{+path}","compare_url":"https://api.github.com/repos/nmorel/javapoet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nmorel/javapoet/merges","archive_url":"https://api.github.com/repos/nmorel/javapoet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nmorel/javapoet/downloads","issues_url":"https://api.github.com/repos/nmorel/javapoet/issues{/number}","pulls_url":"https://api.github.com/repos/nmorel/javapoet/pulls{/number}","milestones_url":"https://api.github.com/repos/nmorel/javapoet/milestones{/number}","notifications_url":"https://api.github.com/repos/nmorel/javapoet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nmorel/javapoet/labels{/name}","releases_url":"https://api.github.com/repos/nmorel/javapoet/releases{/id}","created_at":"2015-01-20T23:26:55Z","updated_at":"2015-01-20T23:26:56Z","pushed_at":"2015-01-21T00:06:20Z","git_url":"git://github.com/nmorel/javapoet.git","ssh_url":"git@github.com:nmorel/javapoet.git","clone_url":"https://github.com/nmorel/javapoet.git","svn_url":"https://github.com/nmorel/javapoet","homepage":"","size":3027,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"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":"3eeaa642cfba19d7e123a235238aef3d2ecd7237","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}","created_at":"2013-02-01T16:56:30Z","updated_at":"2015-01-20T22:05:00Z","pushed_at":"2015-01-20T21:49:23Z","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":3027,"stargazers_count":490,"watchers_count":490,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":105,"mirror_url":null,"open_issues_count":10,"forks":105,"open_issues":10,"watchers":490,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/square/javapoet/pulls/192"},"html":{"href":"https://github.com/square/javapoet/pull/192"},"issue":{"href":"https://api.github.com/repos/square/javapoet/issues/192"},"comments":{"href":"https://api.github.com/repos/square/javapoet/issues/192/comments"},"review_comments":{"href":"https://api.github.com/repos/square/javapoet/pulls/192/comments"},"review_comment":{"href":"https://api.github.com/repos/square/javapoet/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/square/javapoet/pulls/192/commits"},"statuses":{"href":"https://api.github.com/repos/square/javapoet/statuses/1f60c836845fd9590c7552f1ead95ef4295be053"}}}}