cvs commit: ant/src/main/org/apache/tools/ant/taskdefs UpToDate.java

2004-12-10 Thread peterreilly
peterreilly2004/12/10 09:13:54

  Modified:src/main/org/apache/tools/ant/taskdefs UpToDate.java
  Log:
  Checkstyle changes for UptoDate.java
  Obtained from: Kevin Jackson
  
  Revision  ChangesPath
  1.38  +39 -28ant/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
  
  Index: UpToDate.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/UpToDate.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- UpToDate.java 6 Dec 2004 19:27:13 -   1.37
  +++ UpToDate.java 10 Dec 2004 17:13:54 -  1.38
  @@ -42,10 +42,10 @@
   
   public class UpToDate extends Task implements Condition {
   
  -private String _property;
  -private String _value;
  -private File _sourceFile;
  -private File _targetFile;
  +private String property;
  +private String value;
  +private File sourceFile;
  +private File targetFile;
   private Vector sourceFileSets = new Vector();
   
   protected Mapper mapperElement = null;
  @@ -56,8 +56,8 @@
*
* @param property the name of the property to set if Target is 
up-to-date.
*/
  -public void setProperty(String property) {
  -_property = property;
  +public void setProperty(final String property) {
  +this.property = property;
   }
   
   /**
  @@ -66,15 +66,15 @@
*
* @param value the value to set the property to if Target is up-to-date
*/
  -public void setValue(String value) {
  -_value = value;
  +public void setValue(final String value) {
  +this.value = value;
   }
   
   /**
* Returns the value, or true if a specific value wasn't provided.
*/
   private String getValue() {
  -return (_value != null) ? _value : true;
  +return (value != null) ? value : true;
   }
   
   /**
  @@ -83,8 +83,8 @@
*
* @param file the file we are checking against.
*/
  -public void setTargetFile(File file) {
  -_targetFile = file;
  +public void setTargetFile(final File file) {
  +this.targetFile = file;
   }
   
   /**
  @@ -93,19 +93,22 @@
*
* @param file the file we are checking against the target file.
*/
  -public void setSrcfile(File file) {
  -_sourceFile = file;
  +public void setSrcfile(final File file) {
  +this.sourceFile = file;
   }
   
   /**
* Nested lt;srcfilesgt; element.
  + * @param fs the source files
*/
  -public void addSrcfiles(FileSet fs) {
  +public void addSrcfiles(final FileSet fs) {
   sourceFileSets.addElement(fs);
   }
   
   /**
* Defines the FileNameMapper to use (nested mapper element).
  + * @return a mapper to be configured
  + * @throws BuildException if more than one mapper is defined
*/
   public Mapper createMapper() throws BuildException {
   if (mapperElement != null) {
  @@ -128,34 +131,35 @@
   /**
* Evaluate (all) target and source file(s) to
* see if the target(s) is/are up-to-date.
  + * @return true if the target(s) is/are up-to-date
*/
   public boolean eval() {
  -if (sourceFileSets.size() == 0  _sourceFile == null) {
  +if (sourceFileSets.size() == 0  sourceFile == null) {
   throw new BuildException(At least one srcfile or a nested 
+ srcfiles element must be set.);
   }
   
  -if (sourceFileSets.size()  0  _sourceFile != null) {
  +if (sourceFileSets.size()  0  sourceFile != null) {
   throw new BuildException(Cannot specify both the srcfile 
+ attribute and a nested srcfiles 
+ element.);
   }
   
  -if (_targetFile == null  mapperElement == null) {
  +if (targetFile == null  mapperElement == null) {
   throw new BuildException(The targetfile attribute or a nested 
+ mapper element must be set.);
   }
   
   // if the target file is not there, then it can't be up-to-date
  -if (_targetFile != null  !_targetFile.exists()) {
  -log(The targetfile \ + _targetFile.getAbsolutePath()
  +if (targetFile != null  !targetFile.exists()) {
  +log(The targetfile \ + targetFile.getAbsolutePath()
   + \ does not exist., Project.MSG_VERBOSE);
   return false;
   }
   
   // if the source file isn't there, throw an exception
  -if (_sourceFile != null  !_sourceFile.exists()) {
  -throw new BuildException(_sourceFile.getAbsolutePath()
  +if (sourceFile != null  !sourceFile.exists()) {
  +throw 

cvs commit: ant/src/main/org/apache/tools/ant/taskdefs UpToDate.java

2004-12-10 Thread peterreilly
peterreilly2004/12/10 09:14:09

  Modified:src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH
UpToDate.java
  Log:
  sync
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.32.2.6  +39 -28ant/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
  
  Index: UpToDate.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/UpToDate.java,v
  retrieving revision 1.32.2.5
  retrieving revision 1.32.2.6
  diff -u -r1.32.2.5 -r1.32.2.6
  --- UpToDate.java 10 Dec 2004 17:11:41 -  1.32.2.5
  +++ UpToDate.java 10 Dec 2004 17:14:09 -  1.32.2.6
  @@ -42,10 +42,10 @@
   
   public class UpToDate extends Task implements Condition {
   
  -private String _property;
  -private String _value;
  -private File _sourceFile;
  -private File _targetFile;
  +private String property;
  +private String value;
  +private File sourceFile;
  +private File targetFile;
   private Vector sourceFileSets = new Vector();
   
   protected Mapper mapperElement = null;
  @@ -56,8 +56,8 @@
*
* @param property the name of the property to set if Target is 
up-to-date.
*/
  -public void setProperty(String property) {
  -_property = property;
  +public void setProperty(final String property) {
  +this.property = property;
   }
   
   /**
  @@ -66,15 +66,15 @@
*
* @param value the value to set the property to if Target is up-to-date
*/
  -public void setValue(String value) {
  -_value = value;
  +public void setValue(final String value) {
  +this.value = value;
   }
   
   /**
* Returns the value, or true if a specific value wasn't provided.
*/
   private String getValue() {
  -return (_value != null) ? _value : true;
  +return (value != null) ? value : true;
   }
   
   /**
  @@ -83,8 +83,8 @@
*
* @param file the file we are checking against.
*/
  -public void setTargetFile(File file) {
  -_targetFile = file;
  +public void setTargetFile(final File file) {
  +this.targetFile = file;
   }
   
   /**
  @@ -93,19 +93,22 @@
*
* @param file the file we are checking against the target file.
*/
  -public void setSrcfile(File file) {
  -_sourceFile = file;
  +public void setSrcfile(final File file) {
  +this.sourceFile = file;
   }
   
   /**
* Nested lt;srcfilesgt; element.
  + * @param fs the source files
*/
  -public void addSrcfiles(FileSet fs) {
  +public void addSrcfiles(final FileSet fs) {
   sourceFileSets.addElement(fs);
   }
   
   /**
* Defines the FileNameMapper to use (nested mapper element).
  + * @return a mapper to be configured
  + * @throws BuildException if more than one mapper is defined
*/
   public Mapper createMapper() throws BuildException {
   if (mapperElement != null) {
  @@ -128,34 +131,35 @@
   /**
* Evaluate (all) target and source file(s) to
* see if the target(s) is/are up-to-date.
  + * @return true if the target(s) is/are up-to-date
*/
   public boolean eval() {
  -if (sourceFileSets.size() == 0  _sourceFile == null) {
  +if (sourceFileSets.size() == 0  sourceFile == null) {
   throw new BuildException(At least one srcfile or a nested 
+ srcfiles element must be set.);
   }
   
  -if (sourceFileSets.size()  0  _sourceFile != null) {
  +if (sourceFileSets.size()  0  sourceFile != null) {
   throw new BuildException(Cannot specify both the srcfile 
+ attribute and a nested srcfiles 
+ element.);
   }
   
  -if (_targetFile == null  mapperElement == null) {
  +if (targetFile == null  mapperElement == null) {
   throw new BuildException(The targetfile attribute or a nested 
+ mapper element must be set.);
   }
   
   // if the target file is not there, then it can't be up-to-date
  -if (_targetFile != null  !_targetFile.exists()) {
  -log(The targetfile \ + _targetFile.getAbsolutePath()
  +if (targetFile != null  !targetFile.exists()) {
  +log(The targetfile \ + targetFile.getAbsolutePath()
   + \ does not exist., Project.MSG_VERBOSE);
   return false;
   }
   
   // if the source file isn't there, throw an exception
  -if (_sourceFile != null  !_sourceFile.exists()) {
  -throw new BuildException(_sourceFile.getAbsolutePath()
  +

cvs commit: ant/src/main/org/apache/tools/ant/taskdefs UpToDate.java

2003-06-18 Thread peterreilly
peterreilly2003/06/18 00:44:55

  Modified:src/main/org/apache/tools/ant/taskdefs UpToDate.java
  Log:
  get UpToDate task to log at verbose level when the target file does not exist
  PR: 20848
  Obtained from: Eli Tucker
  
  Revision  ChangesPath
  1.29  +3 -0  ant/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
  
  Index: UpToDate.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/UpToDate.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- UpToDate.java 7 Mar 2003 11:23:02 -   1.28
  +++ UpToDate.java 18 Jun 2003 07:44:55 -  1.29
  @@ -77,6 +77,7 @@
* @author Hiroaki Nakamura 
* a href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/a
* @author Stefan Bodewig
  + * @author a href=http://nerdmonkey.com;Eli Tucker/a
*
* @since Ant 1.2
*
  @@ -182,6 +183,8 @@
   
   // if the target file is not there, then it can't be up-to-date
   if (_targetFile != null  !_targetFile.exists()) {
  +log(The targetfile \ + _targetFile.getAbsolutePath() 
  ++ \ does not exist., Project.MSG_VERBOSE);
   return false;
   } 
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]