From 354d01ab77c2aa9ced0ba6614ccd0fc78fc26ba6 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Sun, 16 Dec 2001 06:42:56 +0000 Subject: [PATCH] Remove unused code. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270220 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tools/ant/TaskAdapter.java | 39 ------------------- .../org/apache/tools/ant/TaskAdapter.java | 39 ------------------- 2 files changed, 78 deletions(-) diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/TaskAdapter.java b/proposal/myrmidon/src/main/org/apache/tools/ant/TaskAdapter.java index c1238e84a..d4a15e793 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/TaskAdapter.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/TaskAdapter.java @@ -18,46 +18,8 @@ import org.apache.myrmidon.api.TaskException; */ 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 * @@ -124,5 +86,4 @@ public class TaskAdapter extends Task } } - } diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/TaskAdapter.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/TaskAdapter.java index c1238e84a..d4a15e793 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/TaskAdapter.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/TaskAdapter.java @@ -18,46 +18,8 @@ import org.apache.myrmidon.api.TaskException; */ 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 * @@ -124,5 +86,4 @@ public class TaskAdapter extends Task } } - }