ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant WHATSNEW
Date Tue, 24 Feb 2004 14:05:16 GMT
peterreilly    2004/02/24 06:05:16

  Modified:    src/main/org/apache/tools/ant/types PatternSet.java
               .        WHATSNEW
  Log:
  Throw build exception if name attribute is missing in a patternset
  PR: 25982
  Obtained from: Jose Alberto Fernandez
  
  Revision  Changes    Path
  1.38      +5 -1      ant/src/main/org/apache/tools/ant/types/PatternSet.java
  
  Index: PatternSet.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/PatternSet.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- PatternSet.java	24 Feb 2004 13:22:47 -0000	1.37
  +++ PatternSet.java	24 Feb 2004 14:05:15 -0000	1.38
  @@ -122,7 +122,11 @@
            * @return a printable form of this object.
            */
           public String toString() {
  -            StringBuffer buf = new StringBuffer(name != null ? name : "");
  +            if (name == null) {
  +                throw new BuildException(
  +                    "Missing attribute \"name\" for a pattern");
  +            }
  +            StringBuffer buf = new StringBuffer(name);
               if ((ifCond != null) || (unlessCond != null)) {
                   buf.append(":");
                   String connector = "";
  
  
  
  1.552     +2 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.551
  retrieving revision 1.552
  diff -u -r1.551 -r1.552
  --- WHATSNEW	24 Feb 2004 09:30:30 -0000	1.551
  +++ WHATSNEW	24 Feb 2004 14:05:16 -0000	1.552
  @@ -50,6 +50,8 @@
   
   * MacroDef did not allow attributes named 'description'. Bugzilla Report 27175.
   
  +* Throw build exception if name attribute missing from patternset. Bugzill Report 25982.
  +
   Other changes:
   --------------
   
  
  
  

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


Mime
View raw message