From 0d370d68a753173103b224e2dcedd9128d2ee372 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Fri, 9 Aug 2002 07:08:27 +0000 Subject: [PATCH] Make less noisy. Merged from the 1.5 branch. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273204 13f79535-47bb-0310-9956-ffa450edef68 --- WHATSNEW | 3 +++ src/main/org/apache/tools/ant/taskdefs/Available.java | 3 ++- src/script/antRun | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) 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