ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Available.java
Date Fri, 09 Aug 2002 00:52:54 GMT
stevel      2002/08/08 17:52:54

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
                        Available.java
  Log:
  this patch stops you getting a deprecation warning when you run available against something
without the intent to redefine it. The example is when a sub project pulls in the same property
setting XML fragment as the master build, and is very prevalent in axis, to name but one project.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.44.2.4  +2 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Available.java
  
  Index: Available.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Available.java,v
  retrieving revision 1.44.2.3
  retrieving revision 1.44.2.4
  diff -u -r1.44.2.3 -r1.44.2.4
  --- Available.java	18 Jun 2002 20:33:29 -0000	1.44.2.3
  +++ Available.java	9 Aug 2002 00:52:54 -0000	1.44.2.4
  @@ -246,7 +246,8 @@
           isTask = true;
           try {
               if (eval()) {
  -                if (null != getProject().getProperty(property)) {
  +                oldvalue=getProject().getProperty(property);
  +                if (null != oldvalue && !oldvalue.equals(value)) {
                       log("DEPRECATED - <available> used to override an existing"
                           + " property."
                           + StringUtils.LINE_SEP
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message