Browse Source

checkstyle

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@476576 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 18 years ago
parent
commit
6b572c917c
9 changed files with 30 additions and 14 deletions
  1. +5
    -0
      src/main/org/apache/tools/ant/taskdefs/optional/PropertyFile.java
  2. +6
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/scm/AntStarTeamCheckOut.java
  3. +1
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDef.java
  4. +2
    -0
      src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java
  5. +5
    -5
      src/main/org/apache/tools/ant/taskdefs/optional/sound/AntSoundPlayer.java
  6. +2
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java
  7. +2
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamLabel.java
  8. +5
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java
  9. +2
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java

+ 5
- 0
src/main/org/apache/tools/ant/taskdefs/optional/PropertyFile.java View File

@@ -324,6 +324,11 @@ public class PropertyFile extends Task {
field = unit.getCalendarField();
}

/**
* Apply the nested element to the properties.
* @param props the properties to apply the entry on.
* @throws BuildException if there is an error.
*/
protected void executeOn(Properties props) throws BuildException {
checkParameters();



+ 6
- 3
src/main/org/apache/tools/ant/taskdefs/optional/scm/AntStarTeamCheckOut.java View File

@@ -187,7 +187,10 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task {
}
}


/**
* Check if the attributes/elements are correct.
* @throws BuildException if there was a problem.
*/
protected void checkParameters() throws BuildException {
// Check all of the properties that are required.
assertTrue(getServerName() != null, "ServerName must be set.");
@@ -220,7 +223,7 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task {
/**
* Do the execution.
*
* @exception BuildException
* @throws BuildException if there was a problem.
*/
public void execute() throws BuildException {
log("DEPRECATED - The starteam task is deprecated. Use stcheckout instead.",
@@ -658,7 +661,7 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task {
* Formats a property value for display to the user.
*
* @param p An item property to format.
* @param value
* @param value the object to format.
* @return A string containing the property, which is truncated to 35
* characters for display.
*/


+ 1
- 2
src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDef.java View File

@@ -274,8 +274,7 @@ public class ScriptDef extends DefBase {
*/
ClassLoader loader = createLoader();

try
{
try {
instance = ClasspathUtils.newInstance(classname, loader);
} catch (BuildException e) {
instance = ClasspathUtils.newInstance(classname, ScriptDef.class.getClassLoader());


+ 2
- 0
src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java View File

@@ -54,8 +54,10 @@ public abstract class SOS extends Task implements SOSCmd {
private boolean recursive = false;
private boolean verbose = false;

// CheckStyle:VisibilityModifier OFF - bc
/** Commandline to be executed. */
protected Commandline commandLine;
// CheckStyle:VisibilityModifier ON

/**
* Flag to disable the cache when set.


+ 5
- 5
src/main/org/apache/tools/ant/taskdefs/optional/sound/AntSoundPlayer.java View File

@@ -183,7 +183,7 @@ public class AntSoundPlayer implements LineListener, BuildListener {
/**
* Fired after the last target has finished. This event
* will still be thrown if an error occurred during the build.
*
* @param event the build finished event.
* @see BuildEvent#getException()
*/
public void buildFinished(BuildEvent event) {
@@ -197,7 +197,7 @@ public class AntSoundPlayer implements LineListener, BuildListener {

/**
* Fired when a target is started.
*
* @param event ignored.
* @see BuildEvent#getTarget()
*/
public void targetStarted(BuildEvent event) {
@@ -206,7 +206,7 @@ public class AntSoundPlayer implements LineListener, BuildListener {
/**
* Fired when a target has finished. This event will
* still be thrown if an error occurred during the build.
*
* @param event ignored.
* @see BuildEvent#getException()
*/
public void targetFinished(BuildEvent event) {
@@ -214,7 +214,7 @@ public class AntSoundPlayer implements LineListener, BuildListener {

/**
* Fired when a task is started.
*
* @param event ignored.
* @see BuildEvent#getTask()
*/
public void taskStarted(BuildEvent event) {
@@ -223,7 +223,7 @@ public class AntSoundPlayer implements LineListener, BuildListener {
/**
* Fired when a task has finished. This event will still
* be throw if an error occurred during the build.
*
* @param event ignored.
* @see BuildEvent#getException()
*/
public void taskFinished(BuildEvent event) {


+ 2
- 1
src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java View File

@@ -43,7 +43,8 @@ import org.apache.tools.ant.Project;
* </pre>
*
* @version 1.1
* @see <a href="http://www.borland.com/us/products/starteam/index.html">borland StarTeam Web Site</a>
* @see <a href="http://www.borland.com/us/products/starteam/index.html"
* >borland StarTeam Web Site</a>
*
* @ant.task name="stcheckout" category="scm"
*/


+ 2
- 1
src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamLabel.java View File

@@ -38,7 +38,8 @@ import org.apache.tools.ant.BuildException;
* starteamurl="server:port/project/view"/&gt;
* </pre>
*
* @see <a href="http://www.borland.com/us/products/starteam/index.html">borland StarTeam Web Site</a>
* @see <a href="http://www.borland.com/us/products/starteam/index.html"
* >borland StarTeam Web Site</a>
*
* @ant.task name="stlabel" category="scm"
*/


+ 5
- 1
src/main/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java View File

@@ -47,7 +47,8 @@ import org.apache.tools.ant.Project;
*
* Created: Sat Dec 15 16:55:19 2001
*
* @see <a href="http://www.borland.com/us/products/starteam/index.html">borland StarTeam Web Site</a>
* @see <a href="http://www.borland.com/us/products/starteam/index.html"
* >borland StarTeam Web Site</a>
*/

public abstract class TreeBasedTask extends StarTeamTask {
@@ -285,6 +286,7 @@ public abstract class TreeBasedTask extends StarTeamTask {
}
}

// CheckStyle:MethodNameCheck OFF - bc

/**
* protected function to allow subclasses to set the label (or not).
@@ -329,6 +331,8 @@ public abstract class TreeBasedTask extends StarTeamTask {
}
}

// CheckStyle:VisibilityModifier ON


/**
* return the asOfDate entered by the user for internal use by derived


+ 2
- 1
src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java View File

@@ -403,7 +403,8 @@ public class Symlink extends DispatchTask {
* <code>File.getCanonicalPath</code>
* fail.
*/
public static void deleteSymlink(File linkfil) throws IOException {
public static void deleteSymlink(File linkfil)
throws IOException, FileNotFoundException {
if (!linkfil.exists()) {
throw new FileNotFoundException("No such symlink: " + linkfil);
}


Loading…
Cancel
Save