Added some checks for null

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@2153 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2003-08-04 17:46:20 +00:00
parent 98c4dfcb02
commit 7f2ef14ca6

View File

@ -129,7 +129,9 @@ public class PMDTask extends Task {
}
} catch (PMDException pmde) {
log(pmde.toString(), Project.MSG_VERBOSE);
log(pmde.getReason().getMessage(), Project.MSG_VERBOSE);
if (pmde.getReason() != null && pmde.getReason().getMessage() != null) {
log(pmde.getReason().getMessage(), Project.MSG_VERBOSE);
}
if (failOnError) {
throw new BuildException(pmde);
}