From 7f2ef14ca651673f92e34ec4c005aa4f1d7ef7db Mon Sep 17 00:00:00 2001 From: Tom Copeland Date: Mon, 4 Aug 2003 17:46:20 +0000 Subject: [PATCH] Added some checks for null git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@2153 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd/src/net/sourceforge/pmd/ant/PMDTask.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pmd/src/net/sourceforge/pmd/ant/PMDTask.java b/pmd/src/net/sourceforge/pmd/ant/PMDTask.java index d07dd9dec9..75498b2dc0 100644 --- a/pmd/src/net/sourceforge/pmd/ant/PMDTask.java +++ b/pmd/src/net/sourceforge/pmd/ant/PMDTask.java @@ -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); }