Browse Source

Make <available> 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
master
Stefan Bodewig 23 years ago
parent
commit
0d370d68a7
3 changed files with 6 additions and 2 deletions
  1. +3
    -0
      WHATSNEW
  2. +2
    -1
      src/main/org/apache/tools/ant/taskdefs/Available.java
  3. +1
    -1
      src/script/antRun

+ 3
- 0
WHATSNEW View File

@@ -44,6 +44,9 @@ Other changes:
* Appendix E of Java Development with Ant (Loughran/Hatcher) * Appendix E of Java Development with Ant (Loughran/Hatcher)
contributed to the docs contributed to the docs


* <available> 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 Changes from Ant 1.5beta3 to Ant 1.5
==================================== ====================================




+ 2
- 1
src/main/org/apache/tools/ant/taskdefs/Available.java View File

@@ -245,7 +245,8 @@ public class Available extends Task implements Condition {
isTask = true; isTask = true;
try { try {
if (eval()) { if (eval()) {
if (null != getProject().getProperty(property)) {
String oldvalue = getProject().getProperty(property);
if (null != oldvalue && !oldvalue.equals(value)) {
log("DEPRECATED - <available> used to override an existing" log("DEPRECATED - <available> used to override an existing"
+ " property." + " property."
+ StringUtils.LINE_SEP + StringUtils.LINE_SEP


+ 1
- 1
src/script/antRun View File

@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh


# Copyright (c) 2001 The Apache Software Foundation. All rights
# Copyright (c) 2001-2002 The Apache Software Foundation. All rights
# reserved. # reserved.


# Args: DIR command # Args: DIR command


Loading…
Cancel
Save