ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/types PatternSet.java
Date Wed, 01 Aug 2001 09:29:50 GMT
bodewig     01/08/01 02:29:50

  Modified:    src/main/org/apache/tools/ant/types PatternSet.java
  Log:
  didn't mean to remove the toString method with my last commit.
  
  Revision  Changes    Path
  1.9       +33 -27    jakarta-ant/src/main/org/apache/tools/ant/types/PatternSet.java
  
  Index: PatternSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/PatternSet.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- PatternSet.java	2001/08/01 09:08:55	1.8
  +++ PatternSet.java	2001/08/01 09:29:50	1.9
  @@ -121,26 +121,26 @@
               return true;
           }
   
  -	public String toString() {
  -	    StringBuffer buf = new StringBuffer(name);
  -	    if ((ifCond != null) || (unlessCond != null)) {
  -		buf.append(":");
  -		String connector = "";
  -		
  -		if (ifCond != null) {
  -		    buf.append("if->");
  -		    buf.append(ifCond);
  -		    connector = ";";
  -		}
  -		if (unlessCond != null) {
  -		    buf.append(connector);
  -		    buf.append("unless->");
  -		    buf.append(unlessCond);
  -		}
  -	    }
  +        public String toString() {
  +            StringBuffer buf = new StringBuffer(name);
  +            if ((ifCond != null) || (unlessCond != null)) {
  +                buf.append(":");
  +                String connector = "";
  +                
  +                if (ifCond != null) {
  +                    buf.append("if->");
  +                    buf.append(ifCond);
  +                    connector = ";";
  +                }
  +                if (unlessCond != null) {
  +                    buf.append(connector);
  +                    buf.append("unless->");
  +                    buf.append(unlessCond);
  +                }
  +            }
   
  -	    return buf.toString();
  -	}
  +            return buf.toString();
  +        }
       }
   
       public PatternSet() {
  @@ -402,16 +402,16 @@
           if (includesFileList.size() > 0) {
               Enumeration e = includesFileList.elements();
               while (e.hasMoreElements()) {
  -            	NameEntry ne = (NameEntry)e.nextElement();
  -            	String fileName = ne.evalName(p);
  -            	if (fileName != null) {
  +                NameEntry ne = (NameEntry)e.nextElement();
  +                String fileName = ne.evalName(p);
  +                if (fileName != null) {
                       File inclFile = p.resolveFile(fileName);
                       if (!inclFile.exists())
                           throw new BuildException("Includesfile "
                                                    + inclFile.getAbsolutePath()
                                                    + " not found.");
                       readPatterns(inclFile, includeList, p);
  -            	}
  +                }
               }
               includesFileList.clear();
           }
  @@ -419,19 +419,25 @@
           if (excludesFileList.size() > 0) {
               Enumeration e = includesFileList.elements();
               while (e.hasMoreElements()) {
  -            	NameEntry ne = (NameEntry)e.nextElement();
  -            	String fileName = ne.evalName(p);
  -            	if (fileName != null) {
  +                NameEntry ne = (NameEntry)e.nextElement();
  +                String fileName = ne.evalName(p);
  +                if (fileName != null) {
                       File exclFile = p.resolveFile(fileName);
                       if (!exclFile.exists())
                           throw new BuildException("Excludesfile "
                                                    + exclFile.getAbsolutePath()
                                                    + " not found.");
                       readPatterns(exclFile, excludeList, p);
  -            	}
  +                }
               }
               excludesFileList.clear();
           }
  +    }
  +
  +    public String toString()
  +    {
  +        return "patternSet{ includes: " + includeList + 
  +            " excludes: " + excludeList + " }";
       }
   
   }
  
  
  

Mime
View raw message