Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#669 RegexpSinglelineJava module reports NullPointerException

release_5.0
closed
Oliver Burn
5
2013-10-26
2012-01-06
efe4itcc
No

Tests Environnements under JDK Sun-1.6.0_24:
1/ Eclipse Helios + Eclispe-cs 5.5.0.201111092104
2/ Ant 1.8.2 +IVY-2.2.0 +checkstyle-5.4

When I enable RegexpSinglelineJava module, checkstyle result (Eclipse or ANT) reports an error on every java file with message:
TreeWalker: Got an exception - java.lang.NullPointerException

I tested with real java code or the following class with same results:

package fr.efe4it.ant.samples;

public class HelloWorld {
public int returnUnAsInteger() {
return 1;
}
public String returnUnAsString() {
return "1";
}
public void sayHello(String who) {
System.out.println("Hello " + who);
}
}

I used a configuration derived from SunChecks, but the same result happen with only RegexpSinglelineJava i.e.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<module name="TreeWalker">
<module name="RegexpSinglelineJava">
<property name="ignoreComments" value="true"/>
</module>
</module>
</module>

Discussion

  • Roman Ivanov
    Roman Ivanov
    2013-10-26

    • status: open --> closed