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>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267611 13f79535-47bb-0310-9956-ffa450edef68
master
| @@ -76,6 +76,13 @@ public class Available extends Task { | |||||
| } | } | ||||
| public void setClass(String classname) { | 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; | this.classname = classname; | ||||
| } | } | ||||
| @@ -118,9 +118,19 @@ public class Java extends Exec { | |||||
| } | } | ||||
| /** | /** | ||||
| * Set the source file. | |||||
| * Set the source file (deprecated). | |||||
| */ | */ | ||||
| public void setClass(String s) { | 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; | this.classname = s; | ||||
| } | } | ||||
| @@ -89,6 +89,13 @@ public class Rmic extends Task { | |||||
| } | } | ||||
| public void setClass(String classname) { | 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; | this.classname = classname; | ||||
| } | } | ||||
| @@ -90,6 +90,13 @@ public class Taskdef extends Task { | |||||
| } | } | ||||
| public void setClass(String v) { | 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; | value = v; | ||||
| } | } | ||||
| } | } | ||||