diff --git a/WHATSNEW b/WHATSNEW index a9f544edc..f579ffb56 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -44,6 +44,9 @@ Other changes: * Appendix E of Java Development with Ant (Loughran/Hatcher) contributed to the docs +* will only print deprecration warnings if it is actually + used to change the value of a property. + Changes from Ant 1.5beta3 to Ant 1.5 ==================================== diff --git a/src/main/org/apache/tools/ant/taskdefs/Available.java b/src/main/org/apache/tools/ant/taskdefs/Available.java index 96da3cbf1..0776ea475 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Available.java +++ b/src/main/org/apache/tools/ant/taskdefs/Available.java @@ -245,7 +245,8 @@ public class Available extends Task implements Condition { isTask = true; try { if (eval()) { - if (null != getProject().getProperty(property)) { + String oldvalue = getProject().getProperty(property); + if (null != oldvalue && !oldvalue.equals(value)) { log("DEPRECATED - used to override an existing" + " property." + StringUtils.LINE_SEP diff --git a/src/script/antRun b/src/script/antRun index 98c5ef5c1..6d79e4329 100644 --- a/src/script/antRun +++ b/src/script/antRun @@ -1,6 +1,6 @@ #! /bin/sh -# Copyright (c) 2001 The Apache Software Foundation. All rights +# Copyright (c) 2001-2002 The Apache Software Foundation. All rights # reserved. # Args: DIR command