Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Checkstyle Eclipse plugin doesn't work

I'm using eclipse checkstyle plugin with Juno Eclipse distribution. Anytime the code is checked for checkstyle error I get the following error:

cannot initialize module TreeWalker - Unable to instantiate DoubleCheckedLocking 

Does anybody know how to fix this problem? Is it a plugin compatibility issue or something else?

like image 314
Alex Objelean Avatar asked Oct 09 '12 08:10

Alex Objelean


People also ask

How do I turn on Checkstyle in eclipse?

Enabling the Checkstyle PluginRight-click on the project. Click on Checkstyle and Activate Checkstyle . (Or, if there is no Checkstyle entry, click on Properties and then select “Checkstyle”, check “Checkstyle active…” and click on OK .)

How do I fix Checkstyle warnings in eclipse?

Right click on the java file in Package Explorer or whatever, and select 'Apply Checkstyle Corrections'. Click on the error in the problems view, and select 'Quick fix'. This corrects the problem.

How do I install Checkstyle plugins?

3.1. To import our configuration, go to Window -> Preferences -> Checkstyle. At the Global Check Configurations section, click on New. This will open up a dialogue which will provide us options to specify our custom configuration file.


1 Answers

The DoubleCheckedLocking check has been removed in Checkstyle 5.6 and must be manually removed from your Checkstyle configuration.

See also: http://sourceforge.net/tracker/index.php?func=detail&aid=3571442&group_id=29721&atid=397078

like image 195
Torsten Avatar answered Sep 28 '22 09:09

Torsten