From a89ffe281a56c3c51e376d8927fe300423b43bc7 Mon Sep 17 00:00:00 2001 From: Conor MacNeill Date: Tue, 5 Mar 2002 23:31:36 +0000 Subject: [PATCH] Minor style fixes for Task class git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271758 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/Task.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/org/apache/tools/ant/Task.java b/src/main/org/apache/tools/ant/Task.java index 135d35f0b..f3d7ee805 100644 --- a/src/main/org/apache/tools/ant/Task.java +++ b/src/main/org/apache/tools/ant/Task.java @@ -62,12 +62,11 @@ package org.apache.tools.ant; * * @see Project#createTask */ - public abstract class Task extends ProjectComponent { /** Target this task belongs to, if any. */ protected Target target = null; /** Description of this task, if any. */ - protected String description=null; + protected String description = null; /** Location within the build file of this task definition. */ protected Location location = Location.UNKNOWN_LOCATION; /** @@ -153,7 +152,7 @@ public abstract class Task extends ProjectComponent { * */ public void setDescription( String desc ) { - description=desc; + description = desc; } /** @@ -176,7 +175,8 @@ public abstract class Task extends ProjectComponent { /** * Called by the project to let the task do its work. This method may be - * called more than once, if the task is invoked more than once. For example, + * called more than once, if the task is invoked more than once. + * For example, * if target1 and target2 both depend on target3, then running * "ant target1 target2" will run all tasks in target3 twice. * @@ -244,6 +244,8 @@ public abstract class Task extends ProjectComponent { * Configures this task - if it hasn't been done already. * If the task has been invalidated, it is replaced with an * UnknownElement task which uses the new definition in the project. + * + * @exception BuildException if the task cannot be configured. */ public void maybeConfigure() throws BuildException { if (!invalid) { @@ -311,7 +313,7 @@ public abstract class Task extends ProjectComponent { execute(); project.fireTaskFinished(this, null); } - catch(RuntimeException exc) { + catch (RuntimeException exc) { if (exc instanceof BuildException) { BuildException be = (BuildException) exc; if (be.getLocation() == Location.UNKNOWN_LOCATION) { @@ -345,6 +347,8 @@ public abstract class Task extends ProjectComponent { * Creates an UnknownElement that can be used to replace this task. * Once this has been created once, it is cached and returned by * future calls. + * + * @return the UnknownElement instance for the new definition of this task. */ private UnknownElement getReplacement() { if (replacement == null) {