{"action":"opened","issue":{"url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3920","repository_url":"https://api.github.com/repos/checkstyle/checkstyle","labels_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3920/labels{/name}","comments_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3920/comments","events_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3920/events","html_url":"https://github.com/checkstyle/checkstyle/issues/3920","id":211908566,"number":3920,"title":"RightCurlyCheck: False positive with SAME and METHOD_DEF token","user":{"login":"MEZk","id":7242568,"avatar_url":"https://avatars0.githubusercontent.com/u/7242568?v=3","gravatar_id":"","url":"https://api.github.com/users/MEZk","html_url":"https://github.com/MEZk","followers_url":"https://api.github.com/users/MEZk/followers","following_url":"https://api.github.com/users/MEZk/following{/other_user}","gists_url":"https://api.github.com/users/MEZk/gists{/gist_id}","starred_url":"https://api.github.com/users/MEZk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MEZk/subscriptions","organizations_url":"https://api.github.com/users/MEZk/orgs","repos_url":"https://api.github.com/users/MEZk/repos","events_url":"https://api.github.com/users/MEZk/events{/privacy}","received_events_url":"https://api.github.com/users/MEZk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-04T21:24:29Z","updated_at":"2017-03-04T21:24:29Z","closed_at":null,"body":"````\r\n$ cat TestClass.java\r\npublic class TestClass {\r\n    private void foo19() {int var1 = 5;\r\n        var1 = 6;}\r\n}\r\n\r\n$ cat TestConfig.xml\r\n<?xml version=\"1.0\"?>\r\n<!DOCTYPE module PUBLIC\r\n          \"-//Puppy Crawl//DTD Check Configuration 1.3//EN\"\r\n          \"http://www.puppycrawl.com/dtds/configuration_1_3.dtd\">\r\n\r\n<module name=\"Checker\">\r\n    <property name=\"charset\" value=\"UTF-8\"/>\r\n\r\n    <module name=\"TreeWalker\">\r\n            <module name=\"RightCurly\">\r\n            <property name=\"shouldStartLine\" value=\"true\"/>\r\n             <property name=\"tokens\" value=\"LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, \r\n                                       LITERAL_ELSE, CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, \r\n                                       STATIC_INIT, INSTANCE_INIT\"/>\r\n            <property name=\"option\" value=\"same\"/>\r\n    </module>\r\n    </module>\r\n</module>\r\n\r\n$ java -jar checkstyle-7.6-all.jar -c TestConfig.xml TestClass.java\r\nStarting audit...\r\n[ERROR] TestClass.java:3:18: '}' at column 18 should have line break before. [RightCurly]\r\n[ERROR] TestClass.java:4:1: '}' at column 1 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally). [RightCurly]\r\nAudit done.\r\nCheckstyle ends with 2 errors.\r\n````\r\n\r\nThe first violation message is incorrect. If I put line break before '}' on line 3 \r\n```java\r\npublic class TestClass {\r\n    private void foo19() {int var1 = 5;\r\n        var1 = 6;\r\n    }\r\n}\r\n```\r\n\r\nthere will be a violation:\r\n```\r\n[ERROR] TestClass.java:4:5: '}' at column 5 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally). [RightCurly]\r\n```"}}
{"actor":{"display_login":"MEZk"}}