{"action":"created","issue":{"url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3147","repository_url":"https://api.github.com/repos/checkstyle/checkstyle","labels_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3147/labels{/name}","comments_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3147/comments","events_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3147/events","html_url":"https://github.com/checkstyle/checkstyle/issues/3147","id":151896365,"number":3147,"title":"NonEmptyAtclauseDescription does not support tokens property correctly","user":{"login":"andrew-g-za","id":11553559,"avatar_url":"https://avatars.githubusercontent.com/u/11553559?v=3","gravatar_id":"","url":"https://api.github.com/users/andrew-g-za","html_url":"https://github.com/andrew-g-za","followers_url":"https://api.github.com/users/andrew-g-za/followers","following_url":"https://api.github.com/users/andrew-g-za/following{/other_user}","gists_url":"https://api.github.com/users/andrew-g-za/gists{/gist_id}","starred_url":"https://api.github.com/users/andrew-g-za/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrew-g-za/subscriptions","organizations_url":"https://api.github.com/users/andrew-g-za/orgs","repos_url":"https://api.github.com/users/andrew-g-za/repos","events_url":"https://api.github.com/users/andrew-g-za/events{/privacy}","received_events_url":"https://api.github.com/users/andrew-g-za/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-29T15:32:06Z","updated_at":"2016-04-29T17:58:40Z","closed_at":null,"body":"When I attempt to customize the NonEmptyAtclauseDescription and select only specific javadoc tokens, the check fails.\r\n\r\nNonEmptyAtClause.xml\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!DOCTYPE module PUBLIC \"-//Puppy Crawl//DTD Check Configuration 1.3//EN\" \"http://www.puppycrawl.com/dtds/configuration_1_3.dtd\">\r\n<module name=\"Checker\">\r\n  <property name=\"severity\" value=\"warning\"/>\r\n  <property name=\"charset\" value=\"UTF-8\"/>\r\n  <property name=\"fileExtensions\" value=\"java, properties, xml\"/>\r\n  <module name=\"TreeWalker\">\r\n    <module name=\"NonEmptyAtclauseDescription\">\r\n\t\t<property name=\"tokens\" value=\"PARAM_LITERAL,RETURN_LITERAL,DEPRECATED_LITERAL\" />\r\n\t</module>\r\n  </module>\r\n</module>\r\n```\r\n\r\nJavaDocTest.java:\r\n```Java\r\npublic class JavaDocTest\r\n{\r\n\t/**\r\n\t * sample javadoc.\r\n\t *\r\n\t * @param p1\r\n\t * \tSome param.\r\n\t * @throws Exception\r\n\t */\r\n\tpublic void javaDocFailsCheck(int p1) throws Exception\r\n\t{\r\n\t\t\r\n\t}\r\n}\r\n```\r\n\r\nCommand line:\r\n\r\n```java -jar checkstyle-6.17-all.jar -c NonEmptyAtClause.xml JavaDocTest.java```\r\n\r\nResult:\r\n\r\n```\r\nException in thread \"main\" java.lang.IllegalArgumentException: given name RETURN_LITERAL\r\n        at com.puppycrawl.tools.checkstyle.utils.TokenUtils.getTokenId(TokenUtils.java:136)\r\n        at com.puppycrawl.tools.checkstyle.TreeWalker.registerCheck(TreeWalker.java:219)\r\n        at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:162)\r\n        at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:138)\r\n        at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:176)\r\n        at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:138)\r\n        at com.puppycrawl.tools.checkstyle.Main.runCheckstyle(Main.java:326)\r\n        at com.puppycrawl.tools.checkstyle.Main.main(Main.java:159)\r\n```\r\n\r\nThe 'tokens' property is generated by the eclipse-cs plugin:\r\n \r\n![capture](https://cloud.githubusercontent.com/assets/11553559/14922029/93e5d576-0e35-11e6-969c-7cd79a68809e.JPG)\r\n\r\nTicking the 'Throws literal' option changes the configuration by removing the custom property (as all the default tokens are then selected) - at which point checkstyle runs without failing.\r\n"},"comment":{"url":"https://api.github.com/repos/checkstyle/checkstyle/issues/comments/215830776","html_url":"https://github.com/checkstyle/checkstyle/issues/3147#issuecomment-215830776","issue_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3147","id":215830776,"user":{"login":"romani","id":812984,"avatar_url":"https://avatars.githubusercontent.com/u/812984?v=3","gravatar_id":"","url":"https://api.github.com/users/romani","html_url":"https://github.com/romani","followers_url":"https://api.github.com/users/romani/followers","following_url":"https://api.github.com/users/romani/following{/other_user}","gists_url":"https://api.github.com/users/romani/gists{/gist_id}","starred_url":"https://api.github.com/users/romani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romani/subscriptions","organizations_url":"https://api.github.com/users/romani/orgs","repos_url":"https://api.github.com/users/romani/repos","events_url":"https://api.github.com/users/romani/events{/privacy}","received_events_url":"https://api.github.com/users/romani/received_events","type":"User","site_admin":false},"created_at":"2016-04-29T17:58:40Z","updated_at":"2016-04-29T17:58:40Z","body":"this is problem of Eclipse-cs project \r\n\r\nPARAM_LITERAL is from JavadocTokenTypes not a TokenTpes.\r\n\r\nhttp://checkstyle.sourceforge.net/apidocs/com/puppycrawl/tools/checkstyle/api/JavadocTokenTypes.html\r\nhttp://checkstyle.sourceforge.net/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html\r\n\r\ngenerated xml config is incorrect.\r\n\r\nBut there is no way for now to override tokens https://github.com/checkstyle/checkstyle/blob/master/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/AbstractJavadocCheck.java#L104\r\nin Javadoc Checks."}}