From 43de00cae96bf00ca9df4c5fd4deb700b68d9550 Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Thu, 6 Jan 2005 17:22:44 +0000 Subject: [PATCH] checkstyle git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277299 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tools/ant/taskdefs/Recorder.java | 36 ++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Recorder.java b/src/main/org/apache/tools/ant/taskdefs/Recorder.java index 60c3866e8..cfde6cc26 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Recorder.java +++ b/src/main/org/apache/tools/ant/taskdefs/Recorder.java @@ -94,12 +94,19 @@ public class Recorder extends Task { } - /** Whether or not the logger should append to a previous file. */ + /** + * Whether or not the logger should append to a previous file. + * @param append if true, append to a previous file. + */ public void setAppend(boolean append) { - this.append = new Boolean(append); + this.append = (append ? Boolean.TRUE : Boolean.FALSE); } + /** + * Set emacs mode. + * @param emacsMode if true use emacs mode + */ public void setEmacsMode(boolean emacsMode) { this.emacsMode = emacsMode; } @@ -130,7 +137,10 @@ public class Recorder extends Task { ////////////////////////////////////////////////////////////////////// // CORE / MAIN BODY - /** The main execution. */ + /** + * The main execution. + * @throws BuildException on error + */ public void execute() throws BuildException { if (filename == null) { throw new BuildException("No filename specified"); @@ -163,11 +173,13 @@ public class Recorder extends Task { * Possible values include: start and stop. */ public static class ActionChoices extends EnumeratedAttribute { - private static final String[] values = {"start", "stop"}; - + private static final String[] VALUES = {"start", "stop"}; + /** + * @see EnumeratedAttribute#getValues() + */ public String[] getValues() { - return values; + return VALUES; } } @@ -177,12 +189,14 @@ public class Recorder extends Task { * Possible values include: error, warn, info, verbose, debug. */ public static class VerbosityLevelChoices extends EnumeratedAttribute { - private static final String[] values = {"error", "warn", "info", + private static final String[] VALUES = {"error", "warn", "info", "verbose", "debug"}; - + /** + * @see EnumeratedAttribute#getValues() + */ public String[] getValues() { - return values; + return VALUES; } } @@ -190,6 +204,10 @@ public class Recorder extends Task { /** * Gets the recorder that's associated with the passed in name. If the * recorder doesn't exist, then a new one is created. + * @param name the name of the recoder + * @param proj the current project + * @return a recorder + * @throws BuildException on error */ protected RecorderEntry getRecorder(String name, Project proj) throws BuildException {