Bug#723194: checkstyle: Some custom configs do not work: Unable to instantiate DoubleCheckedLocking

Antonio Ospite ospite at studenti.unina.it
Tue Sep 17 09:16:22 UTC 2013


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 03_remove_DoubleCheckedLocking_feature_removed_in_5.6.diff
Type: text/x-diff
Size: 2393 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-java-maintainers/attachments/20130917/a521008c/attachment.diff>


More information about the pkg-java-maintainers mailing list