diff --git a/pmd/etc/changelog.txt b/pmd/etc/changelog.txt index 8c00028599..c0c11af3f0 100644 --- a/pmd/etc/changelog.txt +++ b/pmd/etc/changelog.txt @@ -1,6 +1,7 @@ ???? - 4.2.4: Fixed bug 1481051 - false + UnusedNullCheckInEquals (and other false positives too) +Fixed bug 1943204 - Ant task: path should be relative to Ant basedir August 31, 2008 - 4.2.3: diff --git a/pmd/src/net/sourceforge/pmd/ant/PMDTask.java b/pmd/src/net/sourceforge/pmd/ant/PMDTask.java index e6c145bc47..2cdc748a16 100644 --- a/pmd/src/net/sourceforge/pmd/ant/PMDTask.java +++ b/pmd/src/net/sourceforge/pmd/ant/PMDTask.java @@ -340,6 +340,18 @@ public class PMDTask extends Task { ruleSetFiles = getNestedRuleSetFiles(); } + // convert relative paths and substitute env variables/properties + final StringBuffer sb = new StringBuffer(); + for(String s: ruleSetFiles.split(",")) { + Path p = new Path(getProject()); + p.setPath(getProject().replaceProperties(s)); + if (sb.length() > 0) { + sb.append(','); + } + sb.append(p); + } + ruleSetFiles = sb.toString(); + if (!targetJDK.equals("1.3") && !targetJDK.equals("1.4") && !targetJDK.equals("1.5") && !targetJDK.equals("1.6") && !targetJDK.equals("1.7") && !targetJDK.equals("jsp")) { throw new BuildException("The targetjdk attribute, if used, must be set to either '1.3', '1.4', '1.5', '1.6', '1.7' or 'jsp'"); }