Package: checkstyle Version: 5.6-2 Severity: normal Tags: patch upstream Dear Maintainer,
when using checkstyle with some custom configs it fails: $ checkstyle -c /usr/share/checkstyle/sun_checks.xml File.java log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Unable to create Checker: cannot initialize module TreeWalker - Unable to instantiate DoubleCheckedLocking com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module TreeWalker - Unable to instantiate DoubleCheckedLocking at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:178) at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184) at com.puppycrawl.tools.checkstyle.Main.createChecker(Main.java:143) at com.puppycrawl.tools.checkstyle.Main.main(Main.java:120) Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate DoubleCheckedLocking at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:155) at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:161) at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184) at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:157) ... 3 more Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate DoubleCheckedLockingCheck at com.puppycrawl.tools.checkstyle.PackageObjectFactory.doMakeObject(PackageObjectFactory.java:98) at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:152) ... 6 more This is because the custom config file contains a reference to the DoubleCheckedLocking module, but this feature has been removed in 5.6: http://checkstyle.sourceforge.net/releasenotes.html This is the upstream report, to which I already forwarded the patch: https://sourceforge.net/p/checkstyle/bugs/705/ Regards, Antonio Ospite http://ao2.it -- System Information: Debian Release: jessie/sid APT prefers unstable APT policy: (900, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.11.0-ao2 (SMP w/1 CPU core) Locale: LANG=it_IT.utf8, LC_CTYPE=it_IT.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages checkstyle depends on: ii antlr 2.7.7+dfsg-5 ii default-jre-headless [java7-runtime-headless] 1:1.7-49 ii java-wrappers 0.1.26 ii libcommons-beanutils-java 1.8.3-4 ii libcommons-cli-java 1.2-3 ii libcommons-logging-java 1.1.3-1 ii libguava-java 15.0-1 ii openjdk-7-jre-headless [java7-runtime-headless] 7u25-2.3.12-4 checkstyle recommends no packages. Versions of packages checkstyle suggests: ii ant-optional 1.9.2-1 ii junit4 4.11-2 -- no debconf information
# HG changeset patch # User Antonio Ospite <[email protected]> # Date 1379407878 -7200 # Tue Sep 17 10:51:18 2013 +0200 # Node ID 7d291436f3ab835b059363afa117cc58cd5ff52f # Parent e4b66ee974eac4b1e31ad6010b350d8f2c2d511f Remove references to DoubleCheckedLocking, the module has been removed in 5.6 diff -r e4b66ee974ea -r 7d291436f3ab contrib/examples/checks/all-checkstyle-checks.xml --- a/contrib/examples/checks/all-checkstyle-checks.xml Fri Aug 30 16:32:31 2013 +1000 +++ b/contrib/examples/checks/all-checkstyle-checks.xml Tue Sep 17 10:51:18 2013 +0200 @@ -333,10 +333,6 @@ <!-- See http://checkstyle.sf.net/config_coding.html !--> <module name="DefaultComesLast"/> - <!-- The "double-checked locking" idiom (DCL) tries to avoid the runtime cost of synchronization. !--> - <!-- See http://checkstyle.sf.net/config_coding.html !--> - <module name="DoubleCheckedLocking"/> - <!-- Detects empty statements (standalone ;). !--> <!-- See http://checkstyle.sf.net/config_coding.html !--> <module name="EmptyStatement"/> diff -r e4b66ee974ea -r 7d291436f3ab contrib/examples/conf/template_config.xml --- a/contrib/examples/conf/template_config.xml Fri Aug 30 16:32:31 2013 +1000 +++ b/contrib/examples/conf/template_config.xml Tue Sep 17 10:51:18 2013 +0200 @@ -390,12 +390,6 @@ </module> <!-- See http://checkstyle.sf.net/config_coding.html --> - <!-- The "double-checked locking" idiom (DCL) tries to avoid the runtime - cost of synchronization. --> - <module name="DoubleCheckedLocking"> - </module> - - <!-- See http://checkstyle.sf.net/config_coding.html --> <!-- Detects empty statements (standalone ;). --> <module name="EmptyStatement"> </module> diff -r e4b66ee974ea -r 7d291436f3ab sun_checks.xml --- a/sun_checks.xml Fri Aug 30 16:32:31 2013 +1000 +++ b/sun_checks.xml Tue Sep 17 10:51:18 2013 +0200 @@ -145,7 +145,6 @@ <!-- Checks for common coding problems --> <!-- See http://checkstyle.sf.net/config_coding.html --> <module name="AvoidInlineConditionals"/> - <module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE --> <module name="EmptyStatement"/> <module name="EqualsHashCode"/> <module name="HiddenField"/>
__ This is the maintainer address of Debian's Java team <http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers>. Please use [email protected] for discussions and questions.

