ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From umag...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/types DestDir.java DestFile.java SrcDir.java SrcFile.java
Date Fri, 28 Dec 2001 21:51:36 GMT
umagesh     01/12/28 13:51:36

  Modified:    src/main/org/apache/tools/ant/types DestDir.java
                        DestFile.java SrcDir.java SrcFile.java
  Log:
  Messages no longer prefix DestDir, DestFile, SrcFile, SrcDir to prevent
  providing possibly confusing error messages to user.
  
  Revision  Changes    Path
  1.4       +2 -2      jakarta-ant/src/main/org/apache/tools/ant/types/DestDir.java
  
  Index: DestDir.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/DestDir.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DestDir.java	27 Dec 2001 21:31:43 -0000	1.3
  +++ DestDir.java	28 Dec 2001 21:51:36 -0000	1.4
  @@ -95,7 +95,7 @@
               return false;
           }
           if (f.exists() && !f.isDirectory()) {
  -            message = "DestDir " + f + " is not a directory.";
  +            message = f + " is not a directory.";
               return false;
           }
           //If DestDir does not exist, make sure it is well formed.
  @@ -105,7 +105,7 @@
                   File parent = new File(tmp.getParent());
                   if (parent.exists()) {
                       if (!parent.isDirectory()) {
  -                        message = "DestDir " + f + " contains the path "
  +                        message = f + " contains the path "
                                     + parent + " that is not a directory.";
                           return false;
                       }
  
  
  
  1.4       +2 -2      jakarta-ant/src/main/org/apache/tools/ant/types/DestFile.java
  
  Index: DestFile.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/DestFile.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DestFile.java	27 Dec 2001 21:31:43 -0000	1.3
  +++ DestFile.java	28 Dec 2001 21:51:36 -0000	1.4
  @@ -95,7 +95,7 @@
               return false;
           }
           if (f.exists() && !f.isFile()) {
  -            message = "DestFile " + f + " is not a file.";
  +            message = f + " is not a file.";
               return false;
           }
           //If DestFile does not exist, make sure it is well formed.
  @@ -105,7 +105,7 @@
                   File parent = new File(tmp.getParent());
                   if (parent.exists()) {
                       if (!parent.isDirectory()) {
  -                        message = "DestFile " + f + " contains the path "
  +                        message = f + " contains the path "
                                     + parent + " that is not a directory.";
                           return false;
                       }
  
  
  
  1.3       +10 -10    jakarta-ant/src/main/org/apache/tools/ant/types/SrcDir.java
  
  Index: SrcDir.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/SrcDir.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SrcDir.java	27 Dec 2001 05:25:09 -0000	1.2
  +++ SrcDir.java	28 Dec 2001 21:51:36 -0000	1.3
  @@ -63,21 +63,21 @@
    * @author <a href="mailto:umagesh@apache.org">Magesh Umasankar</a>
    */
   public final class SrcDir extends ValidatedFileAttribute {
  -    
  -    /** 
  +
  +    /**
        * empty constructor
        */
       public SrcDir() {}
  -    
  -    
  -     /** 
  -     * file constructor; performs validation 
  +
  +
  +     /**
  +     * file constructor; performs validation
        * @param file the file to use
        */
       public SrcDir(File file) throws BuildException {
  -        setFile(file);    
  +        setFile(file);
       }
  -    
  +
       private String message;
   
       protected final String getMessage() {
  @@ -95,11 +95,11 @@
               return false;
           }
           if (!f.exists()) {
  -            message = "SrcDir " + f + " does not exist.";
  +            message = f + " does not exist.";
               return false;
           }
           if (!f.isDirectory()) {
  -            message = "SrcDir " + f + " is not a directory.";
  +            message = f + " is not a directory.";
               return false;
           }
           return true;
  
  
  
  1.3       +9 -9      jakarta-ant/src/main/org/apache/tools/ant/types/SrcFile.java
  
  Index: SrcFile.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/SrcFile.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SrcFile.java	27 Dec 2001 05:25:09 -0000	1.2
  +++ SrcFile.java	28 Dec 2001 21:51:36 -0000	1.3
  @@ -64,20 +64,20 @@
    */
   public final class SrcFile extends ValidatedFileAttribute {
   
  -    /** 
  +    /**
        * empty constructor
        */
       public SrcFile() {}
  -    
  -    
  -     /** 
  -     * file constructor; performs validation 
  +
  +
  +     /**
  +     * file constructor; performs validation
        * @param file the file to use
        */
       public SrcFile(File file) throws BuildException {
  -        setFile(file);    
  +        setFile(file);
       }
  -    
  +
       private String message;
   
       protected final String getMessage() {
  @@ -95,11 +95,11 @@
               return false;
           }
           if (!f.exists()) {
  -            message = "SrcFile " + f + " does not exist.";
  +            message = f + " does not exist.";
               return false;
           }
           if (!f.isFile()) {
  -            message = "SrcFile " + f + " is not a file.";
  +            message = f + " is not a file.";
               return false;
           }
           return true;
  
  
  

--
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