Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set property 'blockTypes' in module ChildBlockLength #351

Closed
rdiachenko opened this issue Jun 10, 2015 · 0 comments
Closed

Cannot set property 'blockTypes' in module ChildBlockLength #351

rdiachenko opened this issue Jun 10, 2015 · 0 comments
Milestone

Comments

@rdiachenko
Copy link
Member

@rdiachenko rdiachenko commented Jun 10, 2015

<module name="ChildBlockLength">
      <property name="severity" value="warning"/>
      <property name="blockTypes" value="LITERAL_IF,LITERAL_ELSE,LITERAL_WHILE,LITERAL_DO,LITERAL_FOR,LITERAL_SWITCH,LITERAL_TRY,LITERAL_CATCH"/>
</module>
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Cannot set property 'blockTypes' in module ChildBlockLength to 'LITERAL_IF,LITERAL_ELSE,LITERAL_WHILE,LITERAL_DO,LITERAL_FOR,LITERAL_SWITCH,LITERAL_TRY,LITERAL_CATCH': com.puppycrawl.tools.checkstyle.api.TokenTypes.getTokenId(Ljava/lang/String;)I
        at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:150)
        at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:170)
        at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:171)
        at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:160)
        ... 28 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:2170)
        at org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:2151)
        at org.apache.commons.beanutils.BeanUtilsBean.copyProperty(BeanUtilsBean.java:439)
        at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:147)

Reproduced on:
checkstyle 6.7
sevntu-checkstyle 1.13.3

oyarzun added a commit to oyarzun/sevntu.checkstyle that referenced this issue Jun 23, 2015
TokenTypes methods getTokenId() and getTokenName() moved to Utils in
checkstyle 6.7.

DefaultLogger now trows UnsupportedEncodingExpection in 6.7.
@romani romani closed this in 247addb Sep 7, 2015
@romani romani added this to the 1.13.6 milestone Sep 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants