diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java index 4039a6574..52666d2e2 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java @@ -1,5 +1,5 @@ /* - * Copyright 2001-2004 The Apache Software Foundation + * Copyright 2001-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,6 +40,7 @@ public class CCMCheck extends Continuus { protected Vector filesets = new Vector(); + /** Constructor for CCMCheck. */ public CCMCheck() { super(); } @@ -98,6 +99,7 @@ public class CCMCheck extends Continuus { /** * Adds a set of files to copy. + * @param set the set of files */ public void addFileset(FileSet set) { filesets.addElement(set); @@ -110,6 +112,7 @@ public class CCMCheck extends Continuus { * Builds a command line to execute ccm and then calls Exec's run method * to execute the command line. *

+ * @throws BuildException on error */ public void execute() throws BuildException { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheckinDefault.java b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheckinDefault.java index 5902a6074..3c4a79624 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheckinDefault.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheckinDefault.java @@ -1,5 +1,5 @@ /* - * Copyright 2001-2002,2004 The Apache Software Foundation + * Copyright 2001-2002,2004-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,12 +24,14 @@ package org.apache.tools.ant.taskdefs.optional.ccm; */ public class CCMCheckinDefault extends CCMCheck { + /** Constructor for CCMCheckinDefault. */ public CCMCheckinDefault() { super(); setCcmAction(COMMAND_CHECKIN); setTask(DEFAULT_TASK); } + /** The default task */ public static final String DEFAULT_TASK = "default"; } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.java index 17c8442f4..5586747a0 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.java @@ -1,5 +1,5 @@ /* - * Copyright 2001-2004 The Apache Software Foundation + * Copyright 2001-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,6 +44,9 @@ public class CCMCreateTask extends Continuus implements ExecuteStreamHandler { private String subSystem = null; private String task = null; + /** + * Constructor for CCMCreateTask. + */ public CCMCreateTask() { super(); setCcmAction(COMMAND_CREATE_TASK); @@ -56,6 +59,7 @@ public class CCMCreateTask extends Continuus implements ExecuteStreamHandler { * Builds a command line to execute ccm and then calls Exec's run method * to execute the command line. *

+ * @throws BuildException on error */ public void execute() throws BuildException { Commandline commandLine = new Commandline(); @@ -264,7 +268,7 @@ public class CCMCreateTask extends Continuus implements ExecuteStreamHandler { /** * - * @exception java.io.IOException + * @throws IOException on error */ public void start() throws IOException { } @@ -277,16 +281,16 @@ public class CCMCreateTask extends Continuus implements ExecuteStreamHandler { /** * - * @param param1 - * @exception java.io.IOException + * @param param1 the output stream + * @exception java.io.IOException on error */ public void setProcessInputStream(OutputStream param1) throws IOException { } /** * - * @param is - * @exception java.io.IOException + * @param is the input stream + * @exception java.io.IOException on error */ public void setProcessErrorStream(InputStream is) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(is)); @@ -299,7 +303,7 @@ public class CCMCreateTask extends Continuus implements ExecuteStreamHandler { /** * read the output stream to retrieve the new task number. * @param is InputStream - * @exception java.io.IOException + * @throws IOException on error */ public void setProcessOutputStream(InputStream is) throws IOException { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java index 558cf2a1e..ec96a970e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java @@ -1,5 +1,5 @@ /* - * Copyright 2001-2004 The Apache Software Foundation + * Copyright 2001-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,7 @@ public class CCMReconfigure extends Continuus { private boolean recurse = false; private boolean verbose = false; + /** Constructor for CCMReconfigure. */ public CCMReconfigure() { super(); setCcmAction(COMMAND_RECONFIGURE); @@ -44,6 +45,7 @@ public class CCMReconfigure extends Continuus { * Builds a command line to execute ccm and then calls Exec's run method * to execute the command line. *

+ * @throws BuildException on error */ public void execute() throws BuildException { Commandline commandLine = new Commandline(); @@ -69,11 +71,11 @@ public class CCMReconfigure extends Continuus { */ private void checkOptions(Commandline cmd) { - if (isRecurse() == true) { + if (isRecurse()) { cmd.createArgument().setValue(FLAG_RECURSE); } // end of if () - if (isVerbose() == true) { + if (isVerbose()) { cmd.createArgument().setValue(FLAG_VERBOSE); } // end of if () diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java index f5c6c329a..c5943bffb 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java @@ -1,5 +1,5 @@ /* - * Copyright 2001-2004 The Apache Software Foundation + * Copyright 2001-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -84,6 +84,12 @@ public abstract class Continuus extends Task { } + /** + * Run the command. + * @param cmd the command line + * @param handler an execute stream handler + * @return the exit status of the command + */ protected int run(Commandline cmd, ExecuteStreamHandler handler) { try { Execute exe = new Execute(handler); @@ -96,6 +102,11 @@ public abstract class Continuus extends Task { } } + /** + * Run the command. + * @param cmd the command line + * @return the exit status of the command + */ protected int run(Commandline cmd) { return run(cmd, new LogStreamHandler(this, Project.MSG_VERBOSE, Project.MSG_WARN)); }