ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Available.java Java.java Rmic.java Taskdef.java
Date Wed, 16 Feb 2000 14:31:47 GMT
rubys       00/02/16 06:31:47

  Modified:    src/main/org/apache/tools/ant/taskdefs Available.java
                        Java.java Rmic.java Taskdef.java
  Log:
  This is a simple patch which adds an attribute "classname" as an alias for
  the "class" attribute in various taskdefs. This is required for use under
  JDK 1.3 (RC1) due to changes in the way introspection works. Don't know
  about the final version of 1.3 but changing to "classname" is probably a
  good idea in any case. By leaving the setClass method in place, current
  build files can continue to be used under JDKs prior to 1.3. It also allows
  time for build files to be migrated. Eventually setClass should be removed.
  
  Note: I added a deprecation warning to the output whenever the class
        attribute is used.
  
  Submitted by: Conor MacNeill <conor@m64.com>
  
  Revision  Changes    Path
  1.2       +7 -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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Available.java	2000/02/11 01:31:24	1.1
  +++ Available.java	2000/02/16 14:31:45	1.2
  @@ -76,6 +76,13 @@
       }
   
       public void setClass(String classname) {
  +        project.log("The class attribute is deprecated. " +
  +                    "Please use the classname attribute.",
  +                    Project.MSG_WARN);
  +        this.classname = classname;
  +    }
  +
  +    public void setClassname(String classname) {
           this.classname = classname;
       }
   
  
  
  
  1.5       +11 -1     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Java.java
  
  Index: Java.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Java.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Java.java	2000/02/13 18:20:00	1.4
  +++ Java.java	2000/02/16 14:31:45	1.5
  @@ -118,9 +118,19 @@
       }
       
       /**
  -     * Set the source file.
  +     * Set the source file (deprecated).
        */
       public void setClass(String s) {
  +        project.log("The class attribute is deprecated. " +
  +                    "Please use the classname attribute.",
  +                    Project.MSG_WARN);
  +        this.classname = s;
  +    }
  +
  +    /**
  +     * Set the source file.
  +     */
  +    public void setClassname(String s) {
           this.classname = s;
       }
   
  
  
  
  1.5       +7 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Rmic.java
  
  Index: Rmic.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Rmic.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Rmic.java	2000/02/14 12:19:27	1.4
  +++ Rmic.java	2000/02/16 14:31:45	1.5
  @@ -89,6 +89,13 @@
       }
   
       public void setClass(String classname) {
  +        project.log("The class attribute is deprecated. " +
  +                    "Please use the classname attribute.",
  +                    Project.MSG_WARN);
  +        this.classname = classname;
  +    }
  +
  +    public void setClassname(String classname) {
           this.classname = classname;
       }
   
  
  
  
  1.3       +7 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Taskdef.java
  
  Index: Taskdef.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Taskdef.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Taskdef.java	2000/01/14 02:13:19	1.2
  +++ Taskdef.java	2000/02/16 14:31:45	1.3
  @@ -90,6 +90,13 @@
       }
   
       public void setClass(String v) {
  +        project.log("The class attribute is deprecated. " +
  +                    "Please use the classname attribute.",
  +                    Project.MSG_WARN);
  +        value = v;
  +    }
  +
  +    public void setClassname(String v) {
   	value = v;
       }
   }
  
  
  

Mime
View raw message