You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by eh...@apache.org on 2002/03/02 23:23:10 UTC
cvs commit: jakarta-ant/proposal/sandbox/antlib/src/main/org/apache/tools/ant/types DataTypeAdapterTask.java
ehatcher 02/03/02 14:23:10
Modified: proposal/sandbox/antlib/src/main/org/apache/tools/ant/types
DataTypeAdapterTask.java
Log:
for Jose Alberto
sorry for the spam - get lock errors if i try too many files at once :(
Revision Changes Path
1.3 +3 -21 jakarta-ant/proposal/sandbox/antlib/src/main/org/apache/tools/ant/types/DataTypeAdapterTask.java
Index: DataTypeAdapterTask.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/sandbox/antlib/src/main/org/apache/tools/ant/types/DataTypeAdapterTask.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DataTypeAdapterTask.java 18 Feb 2002 08:55:16 -0000 1.2
+++ DataTypeAdapterTask.java 2 Mar 2002 22:23:10 -0000 1.3
@@ -66,7 +66,6 @@
public class DataTypeAdapterTask extends Task implements RoleAdapter {
Object proxy;
- String id = null;
/**
* Checks a class, whether it is suitable to be adapted.
@@ -84,27 +83,14 @@
* Do the execution.
*/
public void execute() throws BuildException {
- if (id != null) {
- // Need to re-register this reference
- // The container has register the Adapter instead
- project.addReference(id, proxy);
- }
- }
-
- /**
- * Propagate configuration of Project
- */
- public void setProject(Project p) {
- super.setProject(p);
-
// Check to see if the DataType has a setProject method to set
if (proxy instanceof ProjectComponent) {
- ((ProjectComponent)proxy).setProject(p);
+ ((ProjectComponent)proxy).setProject(project);
return;
}
// This may not be needed
- // We are trying to set project even if is was not declared
+ // We are trying to set project even it is was not declared
// just like TaskAdapter does for beans, this is not done
// by the original code
Method setProjectM = null;
@@ -113,7 +99,7 @@
setProjectM =
c.getMethod( "setProject", new Class[] {Project.class});
if(setProjectM != null) {
- setProjectM.invoke(proxy, new Object[] {p});
+ setProjectM.invoke(proxy, new Object[] {project});
}
} catch (NoSuchMethodException e) {
// ignore this if the class being used as a task does not have
@@ -136,8 +122,4 @@
return this.proxy ;
}
- public void setId(String id) {
- log("Setting adapter id to: " + id, Project.MSG_DEBUG);
- this.id = id;
- }
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>