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/taskdefs/condition And.java ConditionBase.java Contains.java Equals.java FilesMatch.java Http.java IsSet.java Not.java Or.java Os.java Socket.java
Date Thu, 11 Apr 2002 07:38:16 GMT
bodewig     02/04/11 00:38:15

  Modified:    src/main/org/apache/tools/ant/taskdefs Ant.java
                        AntStructure.java Available.java CallTarget.java
                        Chmod.java ConditionTask.java ExecuteOn.java
                        GUnzip.java GZip.java Transform.java UpToDate.java
               src/main/org/apache/tools/ant/taskdefs/condition And.java
                        ConditionBase.java Contains.java Equals.java
                        FilesMatch.java Http.java IsSet.java Not.java
                        Or.java Os.java Socket.java
  Log:
  Adding some @since tags.
  
  cleanups.
  
  Make sure <uptodate> honors property immutability rules.
  
  Remove redundant Enumeration class from ConditionBase
  (IntrospectionHelper will have taken care of it now).
  
  Revision  Changes    Path
  1.49      +2 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java
  
  Index: Ant.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- Ant.java	10 Apr 2002 09:44:37 -0000	1.48
  +++ Ant.java	11 Apr 2002 07:38:15 -0000	1.49
  @@ -90,6 +90,8 @@
    *
    * @author costin@dnt.ro
    *
  + * @since Ant 1.1
  + *
    * @ant.task category="control"
    */
   public class Ant extends Task {
  
  
  
  1.23      +3 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/AntStructure.java
  
  Index: AntStructure.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/AntStructure.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- AntStructure.java	10 Apr 2002 10:02:54 -0000	1.22
  +++ AntStructure.java	11 Apr 2002 07:38:15 -0000	1.23
  @@ -77,7 +77,9 @@
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    *
  - * @version $Revision: 1.22 $
  + * @version $Revision: 1.23 $
  + *
  + * @since Ant 1.1
    *
    * @ant.task category="xml"
    */
  
  
  
  1.40      +2 -0      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.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- Available.java	10 Apr 2002 11:15:37 -0000	1.39
  +++ Available.java	11 Apr 2002 07:38:15 -0000	1.40
  @@ -73,6 +73,8 @@
    * @author Stefano Mazzocchi <a href="mailto:stefano@apache.org">stefano@apache.org</a>
    * @author <a href="mailto:umagesh@apache.org">Magesh Umasankar</a>
    *
  + * @since Ant 1.1
  + *
    * @ant.task category="control"
    */
   public class Available extends Task implements Condition {
  
  
  
  1.19      +2 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/CallTarget.java
  
  Index: CallTarget.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/CallTarget.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- CallTarget.java	10 Apr 2002 09:44:37 -0000	1.18
  +++ CallTarget.java	11 Apr 2002 07:38:15 -0000	1.19
  @@ -79,6 +79,8 @@
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a> 
    *
  + * @since Ant 1.2
  + *
    * @ant.task name="antcall" category="control"
    */
   public class CallTarget extends Task {
  
  
  
  1.24      +2 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Chmod.java
  
  Index: Chmod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Chmod.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- Chmod.java	11 Apr 2002 07:03:11 -0000	1.23
  +++ Chmod.java	11 Apr 2002 07:38:15 -0000	1.24
  @@ -71,6 +71,8 @@
    * @author Mariusz Nowostawski (Marni) <a href="mailto:mnowostawski@infoscience.otago.ac.nz">mnowostawski@infoscience.otago.ac.nz</a>
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    *
  + * @since Ant 1.1
  + *
    * @ant.task category="filesystem"
    */
   public class Chmod extends ExecuteOn {
  
  
  
  1.8       +3 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ConditionTask.java
  
  Index: ConditionTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ConditionTask.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ConditionTask.java	3 Mar 2002 01:46:20 -0000	1.7
  +++ ConditionTask.java	11 Apr 2002 07:38:15 -0000	1.8
  @@ -69,7 +69,9 @@
    * ConditionBase.</p>
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  - * @version $Revision: 1.7 $
  + * @version $Revision: 1.8 $
  + *
  + * @since Ant 1.4
    *
    * @ant.task category="control"
    */
  
  
  
  1.24      +3 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
  
  Index: ExecuteOn.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- ExecuteOn.java	10 Apr 2002 10:27:52 -0000	1.23
  +++ ExecuteOn.java	11 Apr 2002 07:38:15 -0000	1.24
  @@ -75,7 +75,9 @@
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a> 
    * @author <a href="mailto:mariusz@rakiura.org">Mariusz Nowostawski</a>
    *
  - * @ant.task name="execon"
  + * @since Ant 1.2
  + *
  + * @ant.task name="apply" category="control"
    */
   public class ExecuteOn extends ExecTask {
   
  
  
  
  1.12      +2 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/GUnzip.java
  
  Index: GUnzip.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/GUnzip.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- GUnzip.java	3 Mar 2002 01:46:20 -0000	1.11
  +++ GUnzip.java	11 Apr 2002 07:38:15 -0000	1.12
  @@ -69,6 +69,8 @@
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    * @author <a href="mailto:umagesh@rediffmail.com">Magesh Umasankar</a>
    *
  + * @since Ant 1.1
  + *
    * @ant.task category="packaging"
    */
   
  
  
  
  1.19      +2 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/GZip.java
  
  Index: GZip.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/GZip.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- GZip.java	10 Apr 2002 00:19:54 -0000	1.18
  +++ GZip.java	11 Apr 2002 07:38:15 -0000	1.19
  @@ -68,6 +68,8 @@
    * @author Jon S. Stevens <a href="mailto:jon@clearink.com">jon@clearink.com</a>
    * @author <a href="mailto:umagesh@rediffmail.com">Magesh Umasankar</a>
    *
  + * @since Ant 1.1
  + *
    * @ant.task category="packaging"
    */
   
  
  
  
  1.8       +0 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Transform.java
  
  Index: Transform.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Transform.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Transform.java	3 Mar 2002 01:46:20 -0000	1.7
  +++ Transform.java	11 Apr 2002 07:38:15 -0000	1.8
  @@ -58,7 +58,5 @@
    * Has been merged into ExecuteOn, empty class for backwards compatibility.
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a> 
  - *
  - * @ant.task name="apply" category="control"
    */
   public class Transform extends ExecuteOn {}
  
  
  
  1.17      +15 -8     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
  
  Index: UpToDate.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/UpToDate.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- UpToDate.java	3 Apr 2002 12:08:42 -0000	1.16
  +++ UpToDate.java	11 Apr 2002 07:38:15 -0000	1.17
  @@ -77,6 +77,8 @@
    * @author Hiroaki Nakamura <a href="mailto:hnakamur@mc.neweb.ne.jp">hnakamur@mc.neweb.ne.jp</a>
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    *
  + * @since Ant 1.2
  + *
    * @ant.task category="control"
    */
   
  @@ -162,15 +164,19 @@
        */
       public boolean eval() {
           if (sourceFileSets.size() == 0 && _sourceFile == null) {
  -            throw new BuildException("At least one srcfile or a nested <srcfiles>
element must be set.");
  +            throw new BuildException("At least one srcfile or a nested "
  +                                     + "<srcfiles> element must be set.");
           }
   
           if (sourceFileSets.size() > 0 && _sourceFile != null) {
  -            throw new BuildException("Cannot specify both the srcfile attribute and a nested
<srcfiles> element.");
  +            throw new BuildException("Cannot specify both the srcfile "
  +                                     + "attribute and a nested <srcfiles> "
  +                                     + "element.");
           }
   
           if (_targetFile == null && mapperElement == null) {
  -            throw new BuildException("The targetfile attribute or a nested mapper element
must be set.");
  +            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
  @@ -180,8 +186,9 @@
   
           // if the source file isn't there, throw an exception
           if (_sourceFile != null && !_sourceFile.exists()) {
  -            throw new BuildException(_sourceFile.getAbsolutePath() + " not found.");
  -        } 
  +            throw new BuildException(_sourceFile.getAbsolutePath() 
  +                                     + " not found.");
  +        }
   
           Enumeration enum = sourceFileSets.elements();
           boolean upToDate = true;
  @@ -216,10 +223,10 @@
       public void execute() throws BuildException {
           boolean upToDate = eval();
           if (upToDate) {
  -            this.project.setProperty(_property, this.getValue());
  +            this.project.setNewProperty(_property, getValue());
               if (mapperElement == null) {
  -                log("File \"" + _targetFile.getAbsolutePath() + "\" is up-to-date.",
  -                    Project.MSG_VERBOSE);
  +                log("File \"" + _targetFile.getAbsolutePath() 
  +                    + "\" is up-to-date.", Project.MSG_VERBOSE);
               } else {
                   log("All target files are up-to-date.",
                       Project.MSG_VERBOSE);
  
  
  
  1.3       +3 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/And.java
  
  Index: And.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/And.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- And.java	22 Nov 2001 08:45:03 -0000	1.2
  +++ And.java	11 Apr 2002 07:38:15 -0000	1.3
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -65,7 +65,8 @@
    * evaluates to false.</p>
    * 
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  - * @version $Revision: 1.2 $
  + * @since Ant 1.4
  + * @version $Revision: 1.3 $
    */
   public class And extends ConditionBase implements Condition {
   
  
  
  
  1.11      +3 -29     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/ConditionBase.java
  
  Index: ConditionBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/ConditionBase.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ConditionBase.java	20 Feb 2002 08:36:27 -0000	1.10
  +++ ConditionBase.java	11 Apr 2002 07:38:15 -0000	1.11
  @@ -70,7 +70,8 @@
    * and the "container" conditions are in sync.
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  - * @version $Revision: 1.10 $
  + * @since Ant 1.4
  + * @version $Revision: 1.11 $
    */
   public abstract class ConditionBase extends ProjectComponent {
       private Vector conditions = new Vector();
  @@ -88,7 +89,7 @@
        * @since 1.1
        */
       protected final Enumeration getConditions() {
  -        return new ConditionEnumeration();
  +        return conditions.elements();
       }
   
       /**
  @@ -182,31 +183,4 @@
        */
       public void addContains(Contains test) {conditions.addElement(test);}
       
  -    /**
  -     * Inner class that configures those conditions with a project
  -     * instance that need it.
  -     *
  -     * @since 1.1
  -     */
  -    private class ConditionEnumeration implements Enumeration {
  -        private int currentElement = 0;
  -
  -        public boolean hasMoreElements() {
  -            return countConditions() > currentElement;
  -        }
  -
  -        public Object nextElement() throws NoSuchElementException {
  -            Object o = null;
  -            try {
  -                o = conditions.elementAt(currentElement++);
  -            } catch (ArrayIndexOutOfBoundsException e) {
  -                throw new NoSuchElementException();
  -            }
  -            
  -            if (o instanceof ProjectComponent) {
  -                ((ProjectComponent) o).setProject(getProject());
  -            }
  -            return o;
  -        }
  -    }
   }
  
  
  
  1.2       +3 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/Contains.java
  
  Index: Contains.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/Contains.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Contains.java	20 Feb 2002 08:36:27 -0000	1.1
  +++ Contains.java	11 Apr 2002 07:38:15 -0000	1.2
  @@ -60,7 +60,7 @@
    * Is one string part of another string?
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    *
    * @since Ant 1.5
    */
  @@ -101,7 +101,8 @@
        */
       public boolean eval() throws BuildException {
           if (string == null || subString == null) {
  -            throw new BuildException("both string and substring are required in contains");
  +            throw new BuildException("both string and substring are required "
  +                                     + "in contains");
           }
   
           return caseSensitive 
  
  
  
  1.5       +4 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/Equals.java
  
  Index: Equals.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/Equals.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Equals.java	10 Jan 2002 13:59:34 -0000	1.4
  +++ Equals.java	11 Apr 2002 07:38:15 -0000	1.5
  @@ -60,7 +60,8 @@
    * Simple String comparison condition.
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  - * @version $Revision: 1.4 $
  + * @since Ant 1.4
  + * @version $Revision: 1.5 $
    */
   public class Equals implements Condition {
   
  @@ -96,7 +97,8 @@
   
       public boolean eval() throws BuildException {
           if (arg1 == null || arg2 == null) {
  -            throw new BuildException("both arg1 and arg2 are required in equals");
  +            throw new BuildException("both arg1 and arg2 are required in "
  +                                     + "equals");
           }
   
           if (trim) {
  
  
  
  1.6       +7 -5      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/FilesMatch.java
  
  Index: FilesMatch.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/FilesMatch.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FilesMatch.java	25 Feb 2002 15:21:11 -0000	1.5
  +++ FilesMatch.java	11 Apr 2002 07:38:15 -0000	1.6
  @@ -59,11 +59,11 @@
   import java.io.IOException;
   
   /**
  - * Compares two files for bitwise equality based on size and content. Timestamps
  - * are not looked at at all.
  + * Compares two files for bitwise equality based on size and
  + * content. Timestamps are not looked at at all.
    *
    * @author Steve Loughran
  - * @version $Revision: 1.5 $
  + * @version $Revision: 1.6 $
    * @since Ant 1.5
    */
   
  @@ -109,7 +109,8 @@
   
           //validate
           if (file1 == null || file2 == null) {
  -            throw new BuildException("both file1 and file2 are required in filesmatch");
  +            throw new BuildException("both file1 and file2 are required in "
  +                                     + "filesmatch");
           }
   
           //#now match the files
  @@ -117,7 +118,8 @@
           try {
               matches=fu.contentEquals(file1, file2);
           } catch(IOException ioe) {
  -            throw new BuildException("when comparing files", ioe);
  +            throw new BuildException("when comparing files: "+ioe.getMessage(),
  +                                     ioe);
           }
           return matches;
       }
  
  
  
  1.3       +6 -4      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/Http.java
  
  Index: Http.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/Http.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Http.java	20 Jan 2002 20:45:57 -0000	1.2
  +++ Http.java	11 Apr 2002 07:38:15 -0000	1.3
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -69,9 +69,10 @@
    *   url - the URL of the request.
    *
    * @author <a href="mailto:denis@network365.com">Denis Hennessy</a>
  + * @since Ant 1.5
    */
   public class Http extends ProjectComponent implements Condition {
  -    String spec = null;
  +    private String spec = null;
   
       public void setUrl(String url) {
           spec = url;
  @@ -79,7 +80,7 @@
   
       public boolean eval() throws BuildException {
           if (spec == null) {
  -            throw new BuildException("No url specified in HTTP task");
  +            throw new BuildException("No url specified in http condition");
           }
           log("Checking for " + spec, Project.MSG_VERBOSE);
           try {
  @@ -89,7 +90,8 @@
                   if (conn instanceof HttpURLConnection) {
                       HttpURLConnection http = (HttpURLConnection) conn;
                       int code = http.getResponseCode();
  -                    log("Result code for " + spec + " was " + code, Project.MSG_VERBOSE);
  +                    log("Result code for " + spec + " was " + code, 
  +                        Project.MSG_VERBOSE);
                       if (code > 0 && code < 500) {
                           return true;
                       } else {
  
  
  
  1.3       +5 -3      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/IsSet.java
  
  Index: IsSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/IsSet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IsSet.java	22 Nov 2001 08:45:03 -0000	1.2
  +++ IsSet.java	11 Apr 2002 07:38:15 -0000	1.3
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -61,7 +61,8 @@
    * Condition that tests whether a given property has been set.
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  - * @version $Revision: 1.2 $
  + * @since Ant 1.5
  + * @version $Revision: 1.3 $
    */
   public class IsSet extends ProjectComponent implements Condition {
       private String property;
  @@ -70,7 +71,8 @@
   
       public boolean eval() throws BuildException {
           if (property == null) {
  -            throw new BuildException("No property specified for isset condition");
  +            throw new BuildException("No property specified for isset "
  +                                     + "condition");
           }
           
           return getProject().getProperty(property) != null;
  
  
  
  1.3       +3 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/Not.java
  
  Index: Not.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/Not.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Not.java	22 Nov 2001 08:45:03 -0000	1.2
  +++ Not.java	11 Apr 2002 07:38:15 -0000	1.3
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -63,7 +63,8 @@
    * and vice versa.
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  - * @version $Revision: 1.2 $
  + * @since Ant 1.4
  + * @version $Revision: 1.3 $
    */
   public class Not extends ConditionBase implements Condition {
   
  
  
  
  1.3       +3 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/Or.java
  
  Index: Or.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/Or.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Or.java	22 Nov 2001 08:45:03 -0000	1.2
  +++ Or.java	11 Apr 2002 07:38:15 -0000	1.3
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -65,7 +65,8 @@
    * evaluates to true.</p>
    * 
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  - * @version $Revision: 1.2 $
  + * @since Ant 1.4
  + * @version $Revision: 1.3 $
    */
   public class Or extends ConditionBase implements Condition {
   
  
  
  
  1.13      +2 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/Os.java
  
  Index: Os.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/Os.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Os.java	29 Jan 2002 17:22:56 -0000	1.12
  +++ Os.java	11 Apr 2002 07:38:15 -0000	1.13
  @@ -63,7 +63,8 @@
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    * @author <a href="mailto:umagesh@apache.org">Magesh Umasankar</a>
  - * @version $Revision: 1.12 $
  + * @since Ant 1.4
  + * @version $Revision: 1.13 $
    */
   public class Os implements Condition {
       private final static String osName =
  
  
  
  1.2       +9 -6      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/Socket.java
  
  Index: Socket.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/Socket.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Socket.java	30 Nov 2001 12:05:27 -0000	1.1
  +++ Socket.java	11 Apr 2002 07:38:15 -0000	1.2
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -66,10 +66,11 @@
    *   port - the port number of the socket.
    *
    * @author <a href="mailto:denis@network365.com">Denis Hennessy</a>
  + * @since Ant 1.5
    */
   public class Socket extends ProjectComponent implements Condition {
  -    String server = null;
  -    int port = 0;
  +    private String server = null;
  +    private int port = 0;
   
       public void setServer(String server) {
           this.server = server;
  @@ -81,12 +82,14 @@
   
       public boolean eval() throws BuildException {
           if (server == null) {
  -            throw new BuildException("No server specified in Socket task");
  +            throw new BuildException("No server specified in socket "
  +                                     + "condition");
           }
           if (port == 0) {
  -            throw new BuildException("No port specified in Socket task");
  +            throw new BuildException("No port specified in socket condition");
           }
  -        log("Checking for listener at " + server + ":" + port, Project.MSG_VERBOSE);
  +        log("Checking for listener at " + server + ":" + port, 
  +            Project.MSG_VERBOSE);
           try {
               java.net.Socket socket = new java.net.Socket(server, port);
           } catch (IOException e) {
  
  
  

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