{"action":"created","comment":{"url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/comments/151736243","pull_request_review_id":77497317,"id":151736243,"diff_hunk":"@@ -402,22 +403,34 @@ public static String escapeAllControlChars(String text) {\n      * Checks Javadoc comment it's in right place.\n      * From Javadoc util documentation:\n      * \"Placement of comments - Documentation comments are recognized only when placed\n-     * immediately before class, interface, constructor, method, or field\n+     * immediately before class, interface, constructor, method, field or annotation field\n      * declarations -- see the class example, method example, and field example.\n-     * Documentation comments placed in the body of a method are ignored. Only one\n+     * Documentation comments placed in the body of a method are ignored. Only [the last] one\n      * documentation comment per declaration statement is recognized by the Javadoc tool.\"\n      *\n      * @param blockComment Block comment AST\n      * @return true if Javadoc is in right place\n      */\n     private static boolean isCorrectJavadocPosition(DetailAST blockComment) {\n-        return BlockCommentPosition.isOnClass(blockComment)\n-                || BlockCommentPosition.isOnInterface(blockComment)\n-                || BlockCommentPosition.isOnEnum(blockComment)\n-                || BlockCommentPosition.isOnMethod(blockComment)\n-                || BlockCommentPosition.isOnField(blockComment)\n-                || BlockCommentPosition.isOnConstructor(blockComment)\n-                || BlockCommentPosition.isOnEnumConstant(blockComment)\n-                || BlockCommentPosition.isOnAnnotationDef(blockComment);\n+        // We must be sure that after this one there are no other documentation comments.\n+        DetailAST sibling = blockComment;\n+        do {","path":"src/main/java/com/puppycrawl/tools/checkstyle/utils/JavadocUtils.java","position":33,"original_position":33,"commit_id":"bf00e28b3a606370b1003b0d0074eb24f4b9fd20","original_commit_id":"bf00e28b3a606370b1003b0d0074eb24f4b9fd20","user":{"login":"rnveach","id":5427943,"avatar_url":"https://avatars1.githubusercontent.com/u/5427943?v=4","gravatar_id":"","url":"https://api.github.com/users/rnveach","html_url":"https://github.com/rnveach","followers_url":"https://api.github.com/users/rnveach/followers","following_url":"https://api.github.com/users/rnveach/following{/other_user}","gists_url":"https://api.github.com/users/rnveach/gists{/gist_id}","starred_url":"https://api.github.com/users/rnveach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnveach/subscriptions","organizations_url":"https://api.github.com/users/rnveach/orgs","repos_url":"https://api.github.com/users/rnveach/repos","events_url":"https://api.github.com/users/rnveach/events{/privacy}","received_events_url":"https://api.github.com/users/rnveach/received_events","type":"User","site_admin":false},"body":"does it make more sense to change this from `do {} while()` to `while () {}`?\r\nif seems weird to see `if (sibling != null) {` and `} while (sibling != null);`.","created_at":"2017-11-17T16:57:20Z","updated_at":"2017-11-17T16:59:49Z","html_url":"https://github.com/checkstyle/checkstyle/pull/5252#discussion_r151736243","pull_request_url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/5252","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/checkstyle/checkstyle/pulls/comments/151736243"},"html":{"href":"https://github.com/checkstyle/checkstyle/pull/5252#discussion_r151736243"},"pull_request":{"href":"https://api.github.com/repos/checkstyle/checkstyle/pulls/5252"}}},"pull_request":{"url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/5252","id":151315894,"html_url":"https://github.com/checkstyle/checkstyle/pull/5252","diff_url":"https://github.com/checkstyle/checkstyle/pull/5252.diff","patch_url":"https://github.com/checkstyle/checkstyle/pull/5252.patch","issue_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/5252","number":5252,"state":"open","locked":false,"title":"Issue #4169: Javadoc on annotation fields support","user":{"login":"pbludov","id":900805,"avatar_url":"https://avatars2.githubusercontent.com/u/900805?v=4","gravatar_id":"","url":"https://api.github.com/users/pbludov","html_url":"https://github.com/pbludov","followers_url":"https://api.github.com/users/pbludov/followers","following_url":"https://api.github.com/users/pbludov/following{/other_user}","gists_url":"https://api.github.com/users/pbludov/gists{/gist_id}","starred_url":"https://api.github.com/users/pbludov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbludov/subscriptions","organizations_url":"https://api.github.com/users/pbludov/orgs","repos_url":"https://api.github.com/users/pbludov/repos","events_url":"https://api.github.com/users/pbludov/events{/privacy}","received_events_url":"https://api.github.com/users/pbludov/received_events","type":"User","site_admin":false},"body":"Issue #4169\r\n\r\nJavadoc on annotation fields support\r\n\r\n\r\n","created_at":"2017-11-08T08:03:57Z","updated_at":"2017-11-17T16:59:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3efccdd14dd29bcaf9af0d36f16656115eb83683","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/5252/commits","review_comments_url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/5252/comments","review_comment_url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/5252/comments","statuses_url":"https://api.github.com/repos/checkstyle/checkstyle/statuses/bf00e28b3a606370b1003b0d0074eb24f4b9fd20","head":{"label":"Softus:issue-4169","ref":"issue-4169","sha":"bf00e28b3a606370b1003b0d0074eb24f4b9fd20","user":{"login":"Softus","id":20538760,"avatar_url":"https://avatars0.githubusercontent.com/u/20538760?v=4","gravatar_id":"","url":"https://api.github.com/users/Softus","html_url":"https://github.com/Softus","followers_url":"https://api.github.com/users/Softus/followers","following_url":"https://api.github.com/users/Softus/following{/other_user}","gists_url":"https://api.github.com/users/Softus/gists{/gist_id}","starred_url":"https://api.github.com/users/Softus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Softus/subscriptions","organizations_url":"https://api.github.com/users/Softus/orgs","repos_url":"https://api.github.com/users/Softus/repos","events_url":"https://api.github.com/users/Softus/events{/privacy}","received_events_url":"https://api.github.com/users/Softus/received_events","type":"Organization","site_admin":false},"repo":{"id":107936114,"name":"checkstyle","full_name":"Softus/checkstyle","owner":{"login":"Softus","id":20538760,"avatar_url":"https://avatars0.githubusercontent.com/u/20538760?v=4","gravatar_id":"","url":"https://api.github.com/users/Softus","html_url":"https://github.com/Softus","followers_url":"https://api.github.com/users/Softus/followers","following_url":"https://api.github.com/users/Softus/following{/other_user}","gists_url":"https://api.github.com/users/Softus/gists{/gist_id}","starred_url":"https://api.github.com/users/Softus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Softus/subscriptions","organizations_url":"https://api.github.com/users/Softus/orgs","repos_url":"https://api.github.com/users/Softus/repos","events_url":"https://api.github.com/users/Softus/events{/privacy}","received_events_url":"https://api.github.com/users/Softus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Softus/checkstyle","description":"Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. By default it supports the Google Java Style Guide and Sun Code Conventions, but is highly configurable. It can be invoked with an ANT task and a command line program.","fork":true,"url":"https://api.github.com/repos/Softus/checkstyle","forks_url":"https://api.github.com/repos/Softus/checkstyle/forks","keys_url":"https://api.github.com/repos/Softus/checkstyle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Softus/checkstyle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Softus/checkstyle/teams","hooks_url":"https://api.github.com/repos/Softus/checkstyle/hooks","issue_events_url":"https://api.github.com/repos/Softus/checkstyle/issues/events{/number}","events_url":"https://api.github.com/repos/Softus/checkstyle/events","assignees_url":"https://api.github.com/repos/Softus/checkstyle/assignees{/user}","branches_url":"https://api.github.com/repos/Softus/checkstyle/branches{/branch}","tags_url":"https://api.github.com/repos/Softus/checkstyle/tags","blobs_url":"https://api.github.com/repos/Softus/checkstyle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Softus/checkstyle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Softus/checkstyle/git/refs{/sha}","trees_url":"https://api.github.com/repos/Softus/checkstyle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Softus/checkstyle/statuses/{sha}","languages_url":"https://api.github.com/repos/Softus/checkstyle/languages","stargazers_url":"https://api.github.com/repos/Softus/checkstyle/stargazers","contributors_url":"https://api.github.com/repos/Softus/checkstyle/contributors","subscribers_url":"https://api.github.com/repos/Softus/checkstyle/subscribers","subscription_url":"https://api.github.com/repos/Softus/checkstyle/subscription","commits_url":"https://api.github.com/repos/Softus/checkstyle/commits{/sha}","git_commits_url":"https://api.github.com/repos/Softus/checkstyle/git/commits{/sha}","comments_url":"https://api.github.com/repos/Softus/checkstyle/comments{/number}","issue_comment_url":"https://api.github.com/repos/Softus/checkstyle/issues/comments{/number}","contents_url":"https://api.github.com/repos/Softus/checkstyle/contents/{+path}","compare_url":"https://api.github.com/repos/Softus/checkstyle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Softus/checkstyle/merges","archive_url":"https://api.github.com/repos/Softus/checkstyle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Softus/checkstyle/downloads","issues_url":"https://api.github.com/repos/Softus/checkstyle/issues{/number}","pulls_url":"https://api.github.com/repos/Softus/checkstyle/pulls{/number}","milestones_url":"https://api.github.com/repos/Softus/checkstyle/milestones{/number}","notifications_url":"https://api.github.com/repos/Softus/checkstyle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Softus/checkstyle/labels{/name}","releases_url":"https://api.github.com/repos/Softus/checkstyle/releases{/id}","deployments_url":"https://api.github.com/repos/Softus/checkstyle/deployments","created_at":"2017-10-23T05:31:34Z","updated_at":"2017-10-23T05:31:41Z","pushed_at":"2017-11-17T01:34:38Z","git_url":"git://github.com/Softus/checkstyle.git","ssh_url":"git@github.com:Softus/checkstyle.git","clone_url":"https://github.com/Softus/checkstyle.git","svn_url":"https://github.com/Softus/checkstyle","homepage":"http://checkstyle.sourceforge.net/","size":54450,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"checkstyle:master","ref":"master","sha":"32e2b7ba57e189074662d84a04535a87c3a19b0c","user":{"login":"checkstyle","id":5179750,"avatar_url":"https://avatars0.githubusercontent.com/u/5179750?v=4","gravatar_id":"","url":"https://api.github.com/users/checkstyle","html_url":"https://github.com/checkstyle","followers_url":"https://api.github.com/users/checkstyle/followers","following_url":"https://api.github.com/users/checkstyle/following{/other_user}","gists_url":"https://api.github.com/users/checkstyle/gists{/gist_id}","starred_url":"https://api.github.com/users/checkstyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/checkstyle/subscriptions","organizations_url":"https://api.github.com/users/checkstyle/orgs","repos_url":"https://api.github.com/users/checkstyle/repos","events_url":"https://api.github.com/users/checkstyle/events{/privacy}","received_events_url":"https://api.github.com/users/checkstyle/received_events","type":"Organization","site_admin":false},"repo":{"id":12499251,"name":"checkstyle","full_name":"checkstyle/checkstyle","owner":{"login":"checkstyle","id":5179750,"avatar_url":"https://avatars0.githubusercontent.com/u/5179750?v=4","gravatar_id":"","url":"https://api.github.com/users/checkstyle","html_url":"https://github.com/checkstyle","followers_url":"https://api.github.com/users/checkstyle/followers","following_url":"https://api.github.com/users/checkstyle/following{/other_user}","gists_url":"https://api.github.com/users/checkstyle/gists{/gist_id}","starred_url":"https://api.github.com/users/checkstyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/checkstyle/subscriptions","organizations_url":"https://api.github.com/users/checkstyle/orgs","repos_url":"https://api.github.com/users/checkstyle/repos","events_url":"https://api.github.com/users/checkstyle/events{/privacy}","received_events_url":"https://api.github.com/users/checkstyle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/checkstyle/checkstyle","description":"Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. By default it supports the Google Java Style Guide and Sun Code Conventions, but is highly configurable. It can be invoked with an ANT task and a command line program.","fork":false,"url":"https://api.github.com/repos/checkstyle/checkstyle","forks_url":"https://api.github.com/repos/checkstyle/checkstyle/forks","keys_url":"https://api.github.com/repos/checkstyle/checkstyle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/checkstyle/checkstyle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/checkstyle/checkstyle/teams","hooks_url":"https://api.github.com/repos/checkstyle/checkstyle/hooks","issue_events_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/events{/number}","events_url":"https://api.github.com/repos/checkstyle/checkstyle/events","assignees_url":"https://api.github.com/repos/checkstyle/checkstyle/assignees{/user}","branches_url":"https://api.github.com/repos/checkstyle/checkstyle/branches{/branch}","tags_url":"https://api.github.com/repos/checkstyle/checkstyle/tags","blobs_url":"https://api.github.com/repos/checkstyle/checkstyle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/checkstyle/checkstyle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/checkstyle/checkstyle/git/refs{/sha}","trees_url":"https://api.github.com/repos/checkstyle/checkstyle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/checkstyle/checkstyle/statuses/{sha}","languages_url":"https://api.github.com/repos/checkstyle/checkstyle/languages","stargazers_url":"https://api.github.com/repos/checkstyle/checkstyle/stargazers","contributors_url":"https://api.github.com/repos/checkstyle/checkstyle/contributors","subscribers_url":"https://api.github.com/repos/checkstyle/checkstyle/subscribers","subscription_url":"https://api.github.com/repos/checkstyle/checkstyle/subscription","commits_url":"https://api.github.com/repos/checkstyle/checkstyle/commits{/sha}","git_commits_url":"https://api.github.com/repos/checkstyle/checkstyle/git/commits{/sha}","comments_url":"https://api.github.com/repos/checkstyle/checkstyle/comments{/number}","issue_comment_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/comments{/number}","contents_url":"https://api.github.com/repos/checkstyle/checkstyle/contents/{+path}","compare_url":"https://api.github.com/repos/checkstyle/checkstyle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/checkstyle/checkstyle/merges","archive_url":"https://api.github.com/repos/checkstyle/checkstyle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/checkstyle/checkstyle/downloads","issues_url":"https://api.github.com/repos/checkstyle/checkstyle/issues{/number}","pulls_url":"https://api.github.com/repos/checkstyle/checkstyle/pulls{/number}","milestones_url":"https://api.github.com/repos/checkstyle/checkstyle/milestones{/number}","notifications_url":"https://api.github.com/repos/checkstyle/checkstyle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/checkstyle/checkstyle/labels{/name}","releases_url":"https://api.github.com/repos/checkstyle/checkstyle/releases{/id}","deployments_url":"https://api.github.com/repos/checkstyle/checkstyle/deployments","created_at":"2013-08-31T02:05:05Z","updated_at":"2017-11-17T14:15:57Z","pushed_at":"2017-11-17T01:34:42Z","git_url":"git://github.com/checkstyle/checkstyle.git","ssh_url":"git@github.com:checkstyle/checkstyle.git","clone_url":"https://github.com/checkstyle/checkstyle.git","svn_url":"https://github.com/checkstyle/checkstyle","homepage":"http://checkstyle.sourceforge.net/","size":54481,"stargazers_count":2498,"watchers_count":2498,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1186,"mirror_url":null,"archived":false,"open_issues_count":451,"forks":1186,"open_issues":451,"watchers":2498,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/checkstyle/checkstyle/pulls/5252"},"html":{"href":"https://github.com/checkstyle/checkstyle/pull/5252"},"issue":{"href":"https://api.github.com/repos/checkstyle/checkstyle/issues/5252"},"comments":{"href":"https://api.github.com/repos/checkstyle/checkstyle/issues/5252/comments"},"review_comments":{"href":"https://api.github.com/repos/checkstyle/checkstyle/pulls/5252/comments"},"review_comment":{"href":"https://api.github.com/repos/checkstyle/checkstyle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/checkstyle/checkstyle/pulls/5252/commits"},"statuses":{"href":"https://api.github.com/repos/checkstyle/checkstyle/statuses/bf00e28b3a606370b1003b0d0074eb24f4b9fd20"}},"author_association":"NONE"}}
{"actor":{"display_login":"rnveach"}}