Browse Source

checkstyle

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@471562 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 18 years ago
parent
commit
f0e86c70ce
39 changed files with 125 additions and 37 deletions
  1. +5
    -0
      src/main/org/apache/tools/ant/DefaultLogger.java
  2. +4
    -0
      src/main/org/apache/tools/ant/DirectoryScanner.java
  3. +2
    -0
      src/main/org/apache/tools/ant/NoBannerLogger.java
  4. +2
    -0
      src/main/org/apache/tools/ant/ProjectComponent.java
  5. +3
    -0
      src/main/org/apache/tools/ant/Task.java
  6. +3
    -0
      src/main/org/apache/tools/ant/filters/util/ChainReaderHelper.java
  7. +6
    -1
      src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java
  8. +1
    -0
      src/main/org/apache/tools/ant/taskdefs/Available.java
  9. +2
    -0
      src/main/org/apache/tools/ant/taskdefs/Copy.java
  10. +21
    -16
      src/main/org/apache/tools/ant/taskdefs/CopyPath.java
  11. +1
    -0
      src/main/org/apache/tools/ant/taskdefs/DefBase.java
  12. +2
    -0
      src/main/org/apache/tools/ant/taskdefs/Delete.java
  13. +5
    -0
      src/main/org/apache/tools/ant/taskdefs/DiagnosticsTask.java
  14. +2
    -0
      src/main/org/apache/tools/ant/taskdefs/Echo.java
  15. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/EchoXML.java
  16. +2
    -0
      src/main/org/apache/tools/ant/taskdefs/Exec.java
  17. +2
    -0
      src/main/org/apache/tools/ant/taskdefs/ExecTask.java
  18. +3
    -2
      src/main/org/apache/tools/ant/taskdefs/Execute.java
  19. +7
    -1
      src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
  20. +6
    -2
      src/main/org/apache/tools/ant/taskdefs/FixCRLF.java
  21. +3
    -0
      src/main/org/apache/tools/ant/taskdefs/GenerateKey.java
  22. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/Jar.java
  23. +2
    -0
      src/main/org/apache/tools/ant/taskdefs/Java.java
  24. +4
    -1
      src/main/org/apache/tools/ant/taskdefs/Javac.java
  25. +2
    -0
      src/main/org/apache/tools/ant/taskdefs/Jikes.java
  26. +2
    -0
      src/main/org/apache/tools/ant/taskdefs/JikesOutputParser.java
  27. +2
    -0
      src/main/org/apache/tools/ant/taskdefs/MatchingTask.java
  28. +2
    -0
      src/main/org/apache/tools/ant/taskdefs/Pack.java
  29. +2
    -0
      src/main/org/apache/tools/ant/taskdefs/Property.java
  30. +1
    -0
      src/main/org/apache/tools/ant/taskdefs/Recorder.java
  31. +11
    -0
      src/main/org/apache/tools/ant/taskdefs/RecorderEntry.java
  32. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/SQLExec.java
  33. +2
    -1
      src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
  34. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java
  35. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java
  36. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
  37. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java
  38. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapterFactory.java
  39. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java

+ 5
- 0
src/main/org/apache/tools/ant/DefaultLogger.java View File

@@ -39,6 +39,7 @@ public class DefaultLogger implements BuildLogger {
*/
public static final int LEFT_COLUMN_SIZE = 12;

// CheckStyle:VisibilityModifier OFF - bc
/** PrintStream to write non-error messages to */
protected PrintStream out;

@@ -51,11 +52,15 @@ public class DefaultLogger implements BuildLogger {
/** Time of the start of the build */
private long startTime = System.currentTimeMillis();

// CheckStyle:ConstantNameCheck OFF - bc
/** Line separator */
protected static final String lSep = StringUtils.LINE_SEP;
// CheckStyle:ConstantNameCheck ON

/** Whether or not to use emacs-style output */
protected boolean emacsMode = false;
// CheckStyle:VisibilityModifier ON


/**
* Sole constructor.


+ 4
- 0
src/main/org/apache/tools/ant/DirectoryScanner.java View File

@@ -186,6 +186,8 @@ public class DirectoryScanner
resetDefaultExcludes();
}

// CheckStyle:VisibilityModifier OFF - bc

/** The base directory to be scanned. */
protected File basedir;

@@ -259,6 +261,8 @@ public class DirectoryScanner
/** Whether or not everything tested so far has been included. */
protected boolean everythingIncluded = true;

// CheckStyle:VisibilityModifier ON

/**
* Temporary table to speed up the various scanning methods.
*


+ 2
- 0
src/main/org/apache/tools/ant/NoBannerLogger.java View File

@@ -26,6 +26,7 @@ import org.apache.tools.ant.util.StringUtils;
*/
public class NoBannerLogger extends DefaultLogger {

// CheckStyle:VisibilityModifier OFF - bc
/**
* Name of the current target, if it should
* be displayed on the next message. This is
@@ -34,6 +35,7 @@ public class NoBannerLogger extends DefaultLogger {
* the target is logged.
*/
protected String targetName;
// CheckStyle:VisibilityModifier ON

/** Sole constructor. */
public NoBannerLogger() {


+ 2
- 0
src/main/org/apache/tools/ant/ProjectComponent.java View File

@@ -26,6 +26,7 @@ package org.apache.tools.ant;
*/
public abstract class ProjectComponent implements Cloneable {

// CheckStyle:VisibilityModifier OFF - bc
/**
* Project object of this component.
* @deprecated since 1.6.x.
@@ -42,6 +43,7 @@ public abstract class ProjectComponent implements Cloneable {
* Please use the {@link #getLocation()} method.
*/
protected Location location = Location.UNKNOWN_LOCATION;
// CheckStyle:VisibilityModifier ON

/** Sole constructor. */
public ProjectComponent() {


+ 3
- 0
src/main/org/apache/tools/ant/Task.java View File

@@ -32,6 +32,7 @@ import java.io.IOException;
* @see Project#createTask
*/
public abstract class Task extends ProjectComponent {
// CheckStyle:VisibilityModifier OFF - bc
/**
* Target this task belongs to, if any.
* @deprecated since 1.6.x.
@@ -78,6 +79,8 @@ public abstract class Task extends ProjectComponent {
*/
protected RuntimeConfigurable wrapper;

// CheckStyle:VisibilityModifier ON

/**
* Whether or not this task is invalid. A task becomes invalid
* if a conflicting class is specified as the implementation for


+ 3
- 0
src/main/org/apache/tools/ant/filters/util/ChainReaderHelper.java View File

@@ -43,6 +43,7 @@ public final class ChainReaderHelper {

// default buffer size
private static final int DEFAULT_BUFFER_SIZE = 8192;
// CheckStyle:VisibilityModifier OFF - bc
/**
* The primary reader to which the reader chain is to be attached.
*/
@@ -61,6 +62,8 @@ public final class ChainReaderHelper {
/** The Ant project */
private Project project = null;

// CheckStyle:VisibilityModifier ON

/**
* Sets the primary reader
* @param rdr the reader object


+ 6
- 1
src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java View File

@@ -22,6 +22,7 @@ import java.io.File;
import java.util.Enumeration;
import java.util.Vector;

import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.types.Environment;
import org.apache.tools.ant.types.FileSet;
@@ -35,6 +36,7 @@ import org.apache.tools.ant.util.JavaEnvUtils;
*/

public abstract class AbstractJarSignerTask extends Task {
// CheckStyle:VisibilityModifier OFF - bc
/**
* The name of the jar file.
*/
@@ -75,6 +77,9 @@ public abstract class AbstractJarSignerTask extends Task {
* name of JDK program we are looking for
*/
protected static final String JARSIGNER_COMMAND = "jarsigner";

// CheckStyle:VisibilityModifier ON

/**
* redirector used to talk to the jarsigner program
*/
@@ -274,7 +279,7 @@ public abstract class AbstractJarSignerTask extends Task {
* @throws BuildException if the property is not correctly defined.
*/
protected void declareSysProperty(
ExecTask cmd, Environment.Variable property) {
ExecTask cmd, Environment.Variable property) throws BuildException {
addValue(cmd, "-J-D" + property.getContent());
}



+ 1
- 0
src/main/org/apache/tools/ant/taskdefs/Available.java View File

@@ -475,6 +475,7 @@ public class Available extends Task implements Condition {
/**
* @see EnumeratedAttribute#getValues
*/
/** {@inheritDoc}. */
public String[] getValues() {
return VALUES;
}


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

@@ -67,6 +67,7 @@ import org.apache.tools.ant.util.FlatFileNameMapper;
public class Copy extends Task {
static final File NULL_FILE_PLACEHOLDER = new File("/NULL_FILE");
static final String LINE_SEPARATOR = System.getProperty("line.separator");
// CheckStyle:VisibilityModifier OFF - bc
protected File file = null; // the source file
protected File destFile = null; // the destination file
protected File destDir = null; // the destination directory
@@ -92,6 +93,7 @@ public class Copy extends Task {
private String inputEncoding = null;
private String outputEncoding = null;
private long granularity = 0;
// CheckStyle:VisibilityModifier ON

/**
* Copy task constructor.


+ 21
- 16
src/main/org/apache/tools/ant/taskdefs/CopyPath.java View File

@@ -39,30 +39,35 @@ import java.io.IOException;

public class CopyPath extends Task {

private FileNameMapper mapper;
private Path path;
// Error messages
/** No destdir attribute */
public static final String ERROR_NO_DESTDIR = "No destDir specified";

private File destDir;
/** No path */
public static final String ERROR_NO_PATH = "No path specified";

protected FileUtils fileUtils;
/** No mapper */
public static final String ERROR_NO_MAPPER = "No mapper specified";

// TODO not read, yet in a public setter
private long granularity = 0;
// fileutils
private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();

protected boolean preserveLastModified = false;
// --- Fields --
private FileNameMapper mapper;

public CopyPath() {
fileUtils = FileUtils.getFileUtils();
granularity = fileUtils.getFileTimestampGranularity();
}
private Path path;

public static final String ERROR_NO_DESTDIR = "No destDir specified";
private File destDir;

public static final String ERROR_NO_PATH = "No path specified";
// TODO not read, yet in a public setter
private long granularity = FILE_UTILS.getFileTimestampGranularity();

public static final String ERROR_NO_MAPPER = "No mapper specified";
private boolean preserveLastModified = false;

/**
* The dest dir attribute.
* @param destDir the value of the destdir attribute.
*/
public void setDestDir(File destDir) {
this.destDir = destDir;
}
@@ -173,7 +178,7 @@ public class CopyPath extends Task {
try {
log("Copying " + sourceFile + " to " + destFile, Project.MSG_VERBOSE);

fileUtils.copyFile(sourceFile, destFile, null, null, false,
FILE_UTILS.copyFile(sourceFile, destFile, null, null, false,
preserveLastModified, null, null, getProject());
} catch (IOException ioe) {
String msg = "Failed to copy " + sourceFile + " to " + destFile + " due to "


+ 1
- 0
src/main/org/apache/tools/ant/taskdefs/DefBase.java View File

@@ -142,6 +142,7 @@ public abstract class DefBase extends AntlibDefinition {

/**
* @see org.apache.tools.ant.Task#init()
* @throws BuildException on error.
* @since Ant 1.6
*/
public void init() throws BuildException {


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

@@ -97,6 +97,7 @@ public class Delete extends MatchingTask {
public int size() { return dirs.length; }
}

// CheckStyle:VisibilityModifier OFF - bc
protected File file = null;
protected File dir = null;
protected Vector filesets = new Vector();
@@ -109,6 +110,7 @@ public class Delete extends MatchingTask {
private boolean failonerror = true;
private boolean deleteOnExit = false;
private Resources rcs = null;
// CheckStyle:VisibilityModifier ON

/**
* Set the name of a single file to be removed.


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

@@ -30,6 +30,11 @@ public class DiagnosticsTask extends Task {

private static final String[] ARGS = new String[0];

/**
* Execute the task.
* This delgates to the Diagnositics class.
* @throws BuildException on error.
*/
public void execute() throws BuildException {
Diagnostics.main(ARGS);
}


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

@@ -40,6 +40,7 @@ import org.apache.tools.ant.types.LogLevel;
* @ant.task category="utility"
*/
public class Echo extends Task {
// CheckStyle:VisibilityModifier OFF - bc
protected String message = "";
protected File file = null;
protected boolean append = false;
@@ -48,6 +49,7 @@ public class Echo extends Task {

// by default, messages are always displayed
protected int logLevel = Project.MSG_WARN;
// CheckStyle:VisibilityModifier ON

/**
* Does the work.


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/EchoXML.java View File

@@ -46,7 +46,7 @@ public class EchoXML extends XMLFragment {

private File file;
private boolean append;
public static final String ERROR_NO_XML = "No nested XML specified";
private static final String ERROR_NO_XML = "No nested XML specified";

/**
* Set the output file.


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

@@ -48,7 +48,9 @@ public class Exec extends Task {
private String out;
private File dir;
private String command;
// CheckStyle:VisibilityModifier OFF - bc
protected PrintWriter fos = null;
// CheckStyle:VisibilityModifier ON
private boolean failOnError = false;

/**


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

@@ -43,6 +43,7 @@ import org.apache.tools.ant.util.FileUtils;
*/
public class ExecTask extends Task {

// CheckStyle:VisibilityModifier OFF - bc
private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();

private String os;
@@ -70,6 +71,7 @@ public class ExecTask extends Task {

protected Redirector redirector = new Redirector(this);
protected RedirectorElement redirectorElement;
// CheckStyle:VisibilityModifier ON

/**
* Controls whether the VM (1.3 and above) is used to execute the


+ 3
- 2
src/main/org/apache/tools/ant/taskdefs/Execute.java View File

@@ -595,7 +595,7 @@ public class Execute {

/**
* Did this execute return in a failure.
* @see #isFailure(int)
* @see #isFailure(int)
* @return true if and only if the exit code is interpreted as a failure
* @since Ant1.7
*/
@@ -1215,7 +1215,8 @@ public class Execute {
}
FileUtils.delete(f);
}
}.start();
}
.start();
}
}
}

+ 7
- 1
src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java View File

@@ -49,6 +49,8 @@ import org.apache.tools.ant.util.SourceFileScanner;
*/
public class ExecuteOn extends ExecTask {

// CheckStyle:VisibilityModifier OFF - bc

// filesets has been protected so we need to keep that even after
// switching to resource collections. In fact, they will still
// get a different treatment form the other resource collections
@@ -80,6 +82,7 @@ public class ExecuteOn extends ExecTask {
*/
protected boolean srcIsFirst = true;

// CheckStyle:VisibilityModifier ON
/**
* Add a set of files upon which to operate.
* @param set the FileSet to add.
@@ -724,12 +727,15 @@ public class ExecuteOn extends ExecTask {
* for the type attribute.
*/
public static class FileDirBoth extends EnumeratedAttribute {
/** File value */
public static final String FILE = "file";
/** Dir value */
public static final String DIR = "dir";
/**
* @see EnumeratedAttribute#getValues
*/
public String[] getValues() {
/** {@inheritDoc}. */
public String[] getValues() {
return new String[] {FILE, DIR, "both"};
}
}


+ 6
- 2
src/main/org/apache/tools/ant/taskdefs/FixCRLF.java View File

@@ -83,7 +83,7 @@ import org.apache.tools.ant.util.FileUtils;

public class FixCRLF extends MatchingTask implements ChainableReader {

public static final String ERROR_FILE_AND_SRCDIR
private static final String ERROR_FILE_AND_SRCDIR
= "srcdir and file are mutually exclusive";

private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
@@ -211,7 +211,8 @@ public class FixCRLF extends MatchingTask implements ChainableReader {
/**
* Specify tab length in characters.
*
* @param tlength specify the length of tab in spaces,
* @param tlength specify the length of tab in spaces.
* @throws BuildException on error.
*/
public void setTablength(int tlength) throws BuildException {
try {
@@ -273,6 +274,7 @@ public class FixCRLF extends MatchingTask implements ChainableReader {

/**
* Executes the task.
* @throws BuildException on error.
*/
public void execute() throws BuildException {
// first off, make sure that we've got a srcdir and destdir
@@ -614,6 +616,7 @@ public class FixCRLF extends MatchingTask implements ChainableReader {
* Enumerated attribute with the values "asis", "add" and "remove".
*/
public static class AddAsisRemove extends EnumeratedAttribute {
/** {@inheritDoc}. */
public String[] getValues() {
return new String[] {"add", "asis", "remove"};
}
@@ -626,6 +629,7 @@ public class FixCRLF extends MatchingTask implements ChainableReader {
/**
* @see EnumeratedAttribute#getValues
*/
/** {@inheritDoc}. */
public String[] getValues() {
return new String[] {"asis", "cr", "lf", "crlf",
"mac", "unix", "dos"};


+ 3
- 0
src/main/org/apache/tools/ant/taskdefs/GenerateKey.java View File

@@ -157,6 +157,8 @@ public class GenerateKey extends Task {
}
}

// CheckStyle:VisibilityModifier OFF - bc

/**
* The alias of signer.
*/
@@ -177,6 +179,7 @@ public class GenerateKey extends Task {
protected int keysize;
protected int validity;
protected boolean verbose;
// CheckStyle:VisibilityModifier ON

/**
* Distinguished name list.


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/Jar.java View File

@@ -391,7 +391,7 @@ public class Jar extends Zip {
Service service;

serviceIterator = serviceList.iterator();
while(serviceIterator.hasNext()) {
while (serviceIterator.hasNext()) {
service = (Service) serviceIterator.next();
//stolen from writeManifest
super.zipFile(service.getAsStream(), zOut,


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

@@ -65,8 +65,10 @@ public class Java extends Task {
private File output;
private File error;

// CheckStyle:VisibilityModifier OFF - bc
protected Redirector redirector = new Redirector(this);
protected RedirectorElement redirectorElement;
// CheckStyle:VisibilityModifier ON

private String resultProperty;
private Permissions perm = null;


+ 4
- 1
src/main/org/apache/tools/ant/taskdefs/Javac.java View File

@@ -104,9 +104,11 @@ public class Javac extends MatchingTask {
private String memoryMaximumSize;
private FacadeTaskHelper facade = null;

// CheckStyle:VisibilityModifier OFF - bc
protected boolean failOnError = true;
protected boolean listFiles = false;
protected File[] compileList = new File[0];
// CheckStyle:VisibilityModifier ON

private String source;
private String debugLevel;
@@ -905,7 +907,7 @@ public class Javac extends MatchingTask {
* attribute looks like.</p>
*
* @see #getCompilerVersion
*
* @return the compiler.
* @since Ant 1.5
*/
public String getCompiler() {
@@ -931,6 +933,7 @@ public class Javac extends MatchingTask {
* account.</p>
*
* @see #getCompiler
* @return the compiler.
*
* @since Ant 1.5
*/


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

@@ -40,9 +40,11 @@ import org.apache.tools.ant.util.FileUtils;
*/
public class Jikes {

// CheckStyle:VisibilityModifier OFF - bc
protected JikesOutputParser jop;
protected String command;
protected Project project;
// CheckStyle:VisibilityModifier ON

/**
* Constructs a new Jikes object.


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

@@ -38,6 +38,7 @@ import org.apache.tools.ant.Task;
* Use Jikes' exit value to detect compilation failure.
*/
public class JikesOutputParser implements ExecuteStreamHandler {
// CheckStyle:VisibilityModifier OFF - bc
protected Task task;
protected boolean errorFlag = false; // no errors so far
protected int errors;
@@ -46,6 +47,7 @@ public class JikesOutputParser implements ExecuteStreamHandler {
protected boolean emacsMode;

protected BufferedReader br;
// CheckStyle:VisibilityModifier ON

/**
* Ignore.


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

@@ -56,7 +56,9 @@ import org.apache.tools.ant.types.selectors.modifiedselector.ModifiedSelector;

public abstract class MatchingTask extends Task implements SelectorContainer {

// CheckStyle:VisibilityModifier OFF - bc
protected FileSet fileset = new FileSet();
// CheckStyle:VisibilityModifier ON

/** {@inheritDoc}. */
public void setProject(Project project) {


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

@@ -36,8 +36,10 @@ import org.apache.tools.ant.types.resources.FileResource;

public abstract class Pack extends Task {

// CheckStyle:VisibilityModifier OFF - bc
protected File zipFile;
protected File source;
// CheckStyle:VisibilityModifier ON
private Resource src;

/**


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

@@ -70,6 +70,7 @@ import org.apache.tools.ant.types.Reference;
*/
public class Property extends Task {

// CheckStyle:VisibilityModifier OFF - bc
protected String name;
protected String value;
protected File file;
@@ -82,6 +83,7 @@ public class Property extends Task {
private Project fallback;

protected boolean userProperty; // set read-only properties
// CheckStyle:VisibilityModifier ON

/**
* Constructor for Property.


+ 1
- 0
src/main/org/apache/tools/ant/taskdefs/Recorder.java View File

@@ -178,6 +178,7 @@ public class Recorder extends Task implements SubBuildListener {
/**
* @see EnumeratedAttribute#getValues()
*/
/** {@inheritDoc}. */
public String[] getValues() {
return VALUES;
}


+ 11
- 0
src/main/org/apache/tools/ant/taskdefs/RecorderEntry.java View File

@@ -90,6 +90,7 @@ public class RecorderEntry implements BuildLogger, SubBuildListener {
/**
* @see org.apache.tools.ant.BuildListener#buildStarted(BuildEvent)
*/
/** {@inheritDoc}. */
public void buildStarted(BuildEvent event) {
log("> BUILD STARTED", Project.MSG_DEBUG);
}
@@ -97,6 +98,7 @@ public class RecorderEntry implements BuildLogger, SubBuildListener {
/**
* @see org.apache.tools.ant.BuildListener#buildFinished(BuildEvent)
*/
/** {@inheritDoc}. */
public void buildFinished(BuildEvent event) {
log("< BUILD FINISHED", Project.MSG_DEBUG);

@@ -142,6 +144,7 @@ public class RecorderEntry implements BuildLogger, SubBuildListener {
/**
* @see org.apache.tools.ant.BuildListener#targetStarted(BuildEvent)
*/
/** {@inheritDoc}. */
public void targetStarted(BuildEvent event) {
log(">> TARGET STARTED -- " + event.getTarget(), Project.MSG_DEBUG);
log(StringUtils.LINE_SEP + event.getTarget().getName() + ":",
@@ -152,6 +155,7 @@ public class RecorderEntry implements BuildLogger, SubBuildListener {
/**
* @see org.apache.tools.ant.BuildListener#targetFinished(BuildEvent)
*/
/** {@inheritDoc}. */
public void targetFinished(BuildEvent event) {
log("<< TARGET FINISHED -- " + event.getTarget(), Project.MSG_DEBUG);

@@ -164,6 +168,7 @@ public class RecorderEntry implements BuildLogger, SubBuildListener {
/**
* @see org.apache.tools.ant.BuildListener#taskStarted(BuildEvent)
*/
/** {@inheritDoc}. */
public void taskStarted(BuildEvent event) {
log(">>> TASK STARTED -- " + event.getTask(), Project.MSG_DEBUG);
}
@@ -171,6 +176,7 @@ public class RecorderEntry implements BuildLogger, SubBuildListener {
/**
* @see org.apache.tools.ant.BuildListener#taskFinished(BuildEvent)
*/
/** {@inheritDoc}. */
public void taskFinished(BuildEvent event) {
log("<<< TASK FINISHED -- " + event.getTask(), Project.MSG_DEBUG);
flush();
@@ -179,6 +185,7 @@ public class RecorderEntry implements BuildLogger, SubBuildListener {
/**
* @see org.apache.tools.ant.BuildListener#messageLogged(BuildEvent)
*/
/** {@inheritDoc}. */
public void messageLogged(BuildEvent event) {
log("--- MESSAGE LOGGED", Project.MSG_DEBUG);

@@ -224,6 +231,7 @@ public class RecorderEntry implements BuildLogger, SubBuildListener {
/**
* @see BuildLogger#setMessageOutputLevel(int)
*/
/** {@inheritDoc}. */
public void setMessageOutputLevel(int level) {
if (level >= Project.MSG_ERR && level <= Project.MSG_DEBUG) {
loglevel = level;
@@ -233,6 +241,7 @@ public class RecorderEntry implements BuildLogger, SubBuildListener {
/**
* @see BuildLogger#setOutputPrintStream(PrintStream)
*/
/** {@inheritDoc}. */
public void setOutputPrintStream(PrintStream output) {
closeFile();
out = output;
@@ -242,6 +251,7 @@ public class RecorderEntry implements BuildLogger, SubBuildListener {
/**
* @see BuildLogger#setEmacsMode(boolean)
*/
/** {@inheritDoc}. */
public void setEmacsMode(boolean emacsMode) {
this.emacsMode = emacsMode;
}
@@ -250,6 +260,7 @@ public class RecorderEntry implements BuildLogger, SubBuildListener {
/**
* @see BuildLogger#setErrorPrintStream(PrintStream)
*/
/** {@inheritDoc}. */
public void setErrorPrintStream(PrintStream err) {
setOutputPrintStream(err);
}


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/SQLExec.java View File

@@ -715,7 +715,7 @@ public class SQLExec extends JDBCTask {
public void setSrc(File src) {
//there are places (in this file, and perhaps elsewhere, where it is assumed
//that null is an acceptable parameter.
if (src!=null) {
if (src != null) {
setSrcResource(new FileResource(src));
}
}


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

@@ -1060,7 +1060,8 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
// Use '.' so a dir+"/"+name would not result in an absolute path
liaison.addParam(
fileDirParameter,
(file.getParent()!=null) ? file.getParent().replace('\\','/') : "." );
(file.getParent() != null)
? file.getParent().replace('\\', '/') : ".");
}
}



+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java View File

@@ -75,7 +75,7 @@ class ChangeLogParser {
public CVSEntry[] getEntrySetAsArray() {
final CVSEntry[] array = new CVSEntry[ entries.size() ];
int i = 0;
for(Enumeration e = entries.elements(); e.hasMoreElements();) {
for (Enumeration e = entries.elements(); e.hasMoreElements();) {
array[i++] = (CVSEntry) e.nextElement();
}
return array;


+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java View File

@@ -327,7 +327,7 @@ public class ChangeLogTask extends AbstractCvsTask {
for (int i = 0; i < entrySet.length; i++) {
final CVSEntry cvsEntry = entrySet[i];
final Date date = cvsEntry.getDate();
//bug#30471
//this is caused by Date.after throwing a NullPointerException
//for some reason there's no date set in the CVSEntry
@@ -339,12 +339,12 @@ public class ChangeLogTask extends AbstractCvsTask {
//according to the docs it doesn't throw, according to the bug report it does
//http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html#after(java.util.Date)
//according to the docs it does throw
//for now skip entries which are missing a date
if (null == date) {
continue;
}
if (null != startDate && startDate.after(date)) {
//Skip dates that are too early
continue;


+ 2
- 2
src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java View File

@@ -209,12 +209,12 @@ public abstract class DefaultRmicAdapter implements RmicAdapter {
}
//for java1.5+, we generate compatible stubs, that is, unless
//the caller asked for IDL or IIOP support.
if (stubOption == null &&
if (stubOption == null &&
!attributes.getIiop() &&
!attributes.getIdl()) {
stubOption = STUB_COMPAT;
}
if(stubOption!=null) {
if (stubOption != null) {
//set the non-null stubOption
cmd.createArgument().setValue(stubOption);
}


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java View File

@@ -57,7 +57,7 @@ public class KaffeRmic extends DefaultRmicAdapter {
if (i != 0) {
buf.append(", ");
}
buf.append(RMIC_CLASSNAMES[i]);
}
buf.append(" have been found. A common solution is to set the"


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapterFactory.java View File

@@ -68,7 +68,7 @@ public final class RmicAdapterFactory {
*/
public static RmicAdapter getRmic(String rmicType, Task task)
throws BuildException {
//convert to lower case in the English locale,
//convert to lower case in the English locale,
String compiler = rmicType.toLowerCase(Locale.ENGLISH);

//handle default specially by choosing the sun or kaffe compiler


+ 2
- 2
src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java View File

@@ -15,7 +15,7 @@ public class XNewRmic extends ForkingSunRmic {
* the name of this adapter for users to select
*/
public static final String COMPILER_NAME = "xnew";
public XNewRmic() {
}
@@ -24,7 +24,7 @@ public class XNewRmic extends ForkingSunRmic {
* @return a command line that hands off to thw
*/
protected Commandline setupRmicCommand() {
String options[]=new String[] {
String options[] = new String[] {
"-Xnew"
};
Commandline commandline = super.setupRmicCommand(options);


Loading…
Cancel
Save