Pmd hangs with Gradle 1.1


(Chris Jones) #1

It worked fine with Gradle 1.0, but it hangs with 1.1. When I run gradle -d, I see these exceptions which don’t appear during a normal run:

11:37:07.478 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [an
t:pmd] Processing file C:\Users\chris\work\PAL-CPOF-SHELL\current\tasklearning\c
ommon\src\main\com\sri\pal\common\ICalDateTime.java
11:37:07.502 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [an
t:pmd] java.lang.NullPointerException: charsetName
        at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
        at net.sourceforge.pmd.PMD.processFile(PMD.java:210)
        at net.sourceforge.pmd.PMD$PmdRunnable.call(PMD.java:469)
        at net.sourceforge.pmd.PMD$PmdRunnable.call(PMD.java:427)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
11:37:07.497 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [an
t:pmd] java.lang.NullPointerException: charsetName
        at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
        at net.sourceforge.pmd.PMD.processFile(PMD.java:210)
        at net.sourceforge.pmd.PMD$PmdRunnable.call(PMD.java:469)
        at net.sourceforge.pmd.PMD$PmdRunnable.call(PMD.java:427)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
11:37:07.492 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [an
t:pmd] Processing file C:\Users\chris\work\PAL-CPOF-SHELL\current\tasklearning\c
ommon\src\main\com\sri\pal\common\CallbackHandler.java
11:37:07.506 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [an
t:pmd] RuntimeException during processing
11:37:07.527 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [an
t:pmd] RuntimeException during processing
11:37:07.531 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [an
t:pmd] java.lang.NullPointerException: charsetName
        at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
        at net.sourceforge.pmd.PMD.processFile(PMD.java:210)
        at net.sourceforge.pmd.PMD$PmdRunnable.call(PMD.java:469)
        at net.sourceforge.pmd.PMD$PmdRunnable.call(PMD.java:427)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
11:37:07.543 [DEBUG] [net.sourceforge.pmd.PMD] RuntimeException during processin
g
java.lang.NullPointerException: charsetName
        at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
        at net.sourceforge.pmd.PMD.processFile(PMD.java:210)
        at net.sourceforge.pmd.PMD$PmdRunnable.call(PMD.java:469)
        at net.sourceforge.pmd.PMD$PmdRunnable.call(PMD.java:427)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
11:37:07.543 [DEBUG] [net.sourceforge.pmd.PMD] RuntimeException during processin
g
java.lang.NullPointerException: charsetName
        at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
        at net.sourceforge.pmd.PMD.processFile(PMD.java:210)
        at net.sourceforge.pmd.PMD$PmdRunnable.call(PMD.java:469)
        at net.sourceforge.pmd.PMD$PmdRunnable.call(PMD.java:427)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
11:37:07.536 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [an
t:pmd] java.lang.NullPointerException: charsetName
        at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
        at net.sourceforge.pmd.PMD.processFile(PMD.java:210)
        at net.sourceforge.pmd.PMD$PmdRunnable.call(PMD.java:469)
        at net.sourceforge.pmd.PMD$PmdRunnable.call(PMD.java:427)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
11:37:07.543 [DEBUG] [net.sourceforge.pmd.PMD] RuntimeException during processin
g
java.lang.NullPointerException: charsetName
        at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
        at net.sourceforge.pmd.PMD.processFile(PMD.java:210)
        at net.sourceforge.pmd.PMD$PmdRunnable.call(PMD.java:469)
        at net.sourceforge.pmd.PMD$PmdRunnable.call(PMD.java:427)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
11:37:07.566 [DEBUG] [net.sourceforge.pmd.PMD] RuntimeException during processin
g
java.lang.NullPointerException: charsetName
        at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
        at net.sourceforge.pmd.PMD.processFile(PMD.java:210)
        at net.sourceforge.pmd.PMD$PmdRunnable.call(PMD.java:469)
        at net.sourceforge.pmd.PMD$PmdRunnable.call(PMD.java:427)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)

Here’s how I’m running PMD from Gradle:

proj.apply plugin: 'pmd'
    proj.tasks.withType(Pmd) {
        ignoreFailures true
        reports {
            xml.enabled true
            html.enabled false
        }
    }

(Chris Jones) #2

This seems to be fixed in Gradle 1.2.