I'm using STS and installed checkstyle plugin. Using install new software with this URL http://eclipse-cs.sourceforge.net/update.
I have my own checkstyle rule for my Java project. Whenever I change any code and save it shows the following error for me.
Errors occurred during the build.
Errors running builder 'Checkstyle Builder' on project 'myproject'.
cannot initialize module TreeWalker - Unable to instantiate RedundantThrows
cannot initialize module TreeWalker - Unable to instantiate RedundantThrows
cannot initialize module TreeWalker - Unable to instantiate RedundantThrows
cannot initialize module TreeWalker - Unable to instantiate RedundantThrows
This is my checkstyle rule for RedundantThrows
<module name="RedundantThrows">
<property name="logLoadErrors" value="true" />
<property name="suppressLoadErrors" value="true" />
</module>
How to fix the problem?
Thanks.
RedundantThrows was removed with version 6.2 (see https://github.com/checkstyle/checkstyle/issues/473)
I experienced the same with IntelliJ IDEA What I did is I have switched to older version of the checkstyle plugin that can be found here: https://plugins.jetbrains.com/plugin/1065
来源:https://stackoverflow.com/questions/27919444/java-checkstyle-redundant-throws