You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by do...@apache.org on 2001/12/16 07:42:56 UTC
cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant TaskAdapter.java
donaldp 01/12/15 22:42:56
Modified: proposal/myrmidon/src/main/org/apache/tools/ant
TaskAdapter.java
Log:
Remove unused code.
Revision Changes Path
1.5 +0 -39 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/TaskAdapter.java
Index: TaskAdapter.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/TaskAdapter.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TaskAdapter.java 2001/12/16 04:43:51 1.4
+++ TaskAdapter.java 2001/12/16 06:42:56 1.5
@@ -18,47 +18,9 @@
*/
public class TaskAdapter extends Task
{
-
Object proxy;
/**
- * Checks a class, whether it is suitable to be adapted by TaskAdapter.
- * Checks conditions only, which are additionally required for a tasks
- * adapted by TaskAdapter. Thus, this method should be called by {@link
- * Project#checkTaskClass}. Throws a TaskException and logs as
- * Project.MSG_ERR for conditions, that will cause the task execution to
- * fail. Logs other suspicious conditions with Project.MSG_WARN.
- *
- * @param taskClass Description of Parameter
- * @param project Description of Parameter
- */
- public static void checkTaskClass( final Class taskClass, final Project project )
- throws TaskException
- {
- // don't have to check for interface, since then
- // taskClass would be abstract too.
- try
- {
- final Method executeM = taskClass.getMethod( "execute", null );
- // don't have to check for public, since
- // getMethod finds public method only.
- // don't have to check for abstract, since then
- // taskClass would be abstract too.
- if( !Void.TYPE.equals( executeM.getReturnType() ) )
- {
- final String message = "return type of execute() should be void but was \"" + executeM.getReturnType() + "\" in " + taskClass;
- project.log( message, Project.MSG_WARN );
- }
- }
- catch( NoSuchMethodException e )
- {
- final String message = "No public execute() in " + taskClass;
- project.log( message, Project.MSG_ERR );
- throw new TaskException( message );
- }
- }
-
- /**
* Set the target object class
*
* @param o The new Proxy value
@@ -124,5 +86,4 @@
}
}
-
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>