With the latest checkstyle fixes committed, I have the following exception: {code} Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Exception was thrown while processing /data/home/gsmet/git/gsmet/hibernate-search/engine/src/main/java/org/hibernate/search/annotations/TermVector.java at com.puppycrawl.tools.checkstyle.Checker.processFiles(Checker.java:319) at com.puppycrawl.tools.checkstyle.Checker.process(Checker.java:275) at org.apache.maven.plugin.checkstyle.exec.DefaultCheckstyleExecutor.executeCheckstyle(DefaultCheckstyleExecutor.java:252) at org.apache.maven.plugin.checkstyle.CheckstyleViolationCheckMojo.execute(CheckstyleViolationCheckMojo.java:538) ... 22 more Caused by: java.lang.NullPointerException at org.hibernate.checkstyle.checks.regexp.IllegalImport.visitToken(IllegalImport.java:56) at com.puppycrawl.tools.checkstyle.TreeWalker.notifyVisit(TreeWalker.java:363) at com.puppycrawl.tools.checkstyle.TreeWalker.processIter(TreeWalker.java:478) at com.puppycrawl.tools.checkstyle.TreeWalker.walk(TreeWalker.java:305) at com.puppycrawl.tools.checkstyle.TreeWalker.processFiltered(TreeWalker.java:181) at com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck.process(AbstractFileSetCheck.java:80) at com.puppycrawl.tools.checkstyle.Checker.processFile(Checker.java:339) at com.puppycrawl.tools.checkstyle.Checker.processFiles(Checker.java:309) {code}
Token of the wrong types (152) are analyzed.
I took a look at { { IllegalImportCheck} } and they also implement { { getAcceptableTokens} } and { { getRequiredTokens} } .
Implementing them in our own {{ IllegalImport }} fixes the issue. |
|