| @@ -532,17 +532,6 @@ | |||
| feature="http://java.sun.com/xml/jaxp/properties/schemaSource"/> | |||
| </or> | |||
| </condition> | |||
| <!-- | |||
| Java8 introduced a HTML checker 'doclint' which is very strict and breaks | |||
| the build if there is a HTML error in the JavaDoc. | |||
| --> | |||
| <condition | |||
| property="javadoc.doclint.none" | |||
| value="-Xdoclint:none" | |||
| else=""> | |||
| <not><isset property="withDoclint"/></not> | |||
| </condition> | |||
| </target> | |||
| @@ -1464,16 +1453,15 @@ | |||
| description="--> creates the API documentation" unless="javadoc.notrequired"> | |||
| <mkdir dir="${build.javadocs}"/> | |||
| <javadoc useexternalfile="yes" | |||
| maxmemory="1000M" | |||
| destdir="${build.javadocs}" | |||
| failonerror="true" | |||
| author="true" | |||
| version="true" | |||
| locale="en" | |||
| windowtitle="${Name} API" | |||
| doctitle="${Name}" | |||
| failonerror="true" | |||
| verbose="${javadoc.verbose}" | |||
| additionalparam="${javadoc.doclint.none}"> | |||
| maxmemory="1000M" | |||
| verbose="${javadoc.verbose}"> | |||
| <packageset dir="${java.dir}"/> | |||
| @@ -1505,8 +1493,7 @@ | |||
| version="true" | |||
| locale="en" | |||
| windowtitle="${Name} Test Utilities" | |||
| doctitle="${Name}" | |||
| additionalparam="${javadoc.doclint.none}"> | |||
| doctitle="${Name}"> | |||
| <!-- hide some meta information for javadoc --> | |||
| <tag name="pre" description="Precondition:" scope="all"/> | |||
| @@ -1663,6 +1650,7 @@ ${antunit.reports} | |||
| fork="${junit.fork}" | |||
| forkmode="${junit.forkmode}" | |||
| threads="${junit.threads}" | |||
| tempdir="${build.dir}" | |||
| failureproperty="junit.failed" | |||
| errorproperty="junit.failed" | |||
| filtertrace="${junit.filtertrace}"> | |||
| @@ -927,8 +927,8 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener, Clo | |||
| * | |||
| * @param name name of the resource | |||
| * @return possible URLs as enumeration | |||
| * @throws IOException | |||
| * @see {@link #findResources(String, boolean)} | |||
| * @throws IOException if something goes wrong | |||
| * @see #findResources(String, boolean) | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public Enumeration<URL> getNamedResources(final String name) | |||
| @@ -1555,6 +1555,12 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener, Clo | |||
| /** | |||
| * Factory method | |||
| * | |||
| * @param parent ClassLoader | |||
| * @param project Project | |||
| * @param path Path | |||
| * @param parentFirst boolean | |||
| * @return AntClassLoader | |||
| */ | |||
| public static AntClassLoader newAntClassLoader(final ClassLoader parent, | |||
| final Project project, | |||
| @@ -37,6 +37,11 @@ public interface ArgumentProcessor { | |||
| * <p> | |||
| * If the argument is not supported, returns -1. Else, the position of the | |||
| * first argument not supported. | |||
| * </p> | |||
| * | |||
| * @param args String[] | |||
| * @param pos int | |||
| * @return int | |||
| */ | |||
| int readArguments(String[] args, int pos); | |||
| @@ -45,12 +50,18 @@ public interface ArgumentProcessor { | |||
| * this method is called after all arguments were parsed. Returns | |||
| * <code>true</code> if Ant should stop there, ie the build file not parsed | |||
| * and the project should not be executed. | |||
| * | |||
| * @param args List<String> | |||
| * @return boolean | |||
| */ | |||
| boolean handleArg(List<String> args); | |||
| /** | |||
| * If some arguments matched with {@link #readArguments(String[], int)}, | |||
| * this method is called just before the project being configured | |||
| * | |||
| * @param project Project | |||
| * @param args List<String> | |||
| */ | |||
| void prepareConfigure(Project project, List<String> args); | |||
| @@ -59,12 +70,17 @@ public interface ArgumentProcessor { | |||
| * after the project being configured. Returns <code>true</code> if Ant | |||
| * should stop there, ie the build file not parsed and the project should | |||
| * not be executed. | |||
| * | |||
| * @param project Project | |||
| * @param arg List<String> | |||
| * @return boolean | |||
| */ | |||
| boolean handleArg(Project project, List<String> arg); | |||
| /** | |||
| * Print the usage of the supported arguments | |||
| * | |||
| * @param writer PrintStream | |||
| * @see org.apache.tools.ant.Main#printUsage() | |||
| */ | |||
| void printUsage(PrintStream writer); | |||
| @@ -49,7 +49,7 @@ public class BuildException extends RuntimeException { | |||
| * | |||
| * @param pattern A description of or information about the exception. | |||
| * Should not be {@code null}. | |||
| * @param formatArguments | |||
| * @param formatArguments ditto | |||
| * @see String#format(String, Object...) | |||
| * @since Ant 1.10.2 | |||
| */ | |||
| @@ -53,7 +53,7 @@ import org.apache.tools.ant.util.FileUtils; | |||
| * | |||
| * A very simple hook mechanism is provided that allows users to plug | |||
| * in custom code. It is also possible to replace the default behavior | |||
| * ( for example in an app embedding ant ) | |||
| * (for example in an app embedding Ant) | |||
| * | |||
| * @since Ant1.6 | |||
| */ | |||
| @@ -201,7 +201,7 @@ public class ComponentHelper { | |||
| } | |||
| /** | |||
| * @return A deep copy of the restrictredDefinition | |||
| * @return A deep copy of the restrictedDefinition | |||
| */ | |||
| private Map<String, List<AntTypeDefinition>> getRestrictedDefinition() { | |||
| final Map<String, List<AntTypeDefinition>> result = new HashMap<>(); | |||
| @@ -272,7 +272,7 @@ public final class Diagnostics { | |||
| /** | |||
| * ignore exceptions. This is to allow future | |||
| * implementations to log at a verbose level | |||
| * @param thrown | |||
| * @param thrown a Throwable to ignore | |||
| */ | |||
| private static void ignoreThrowable(Throwable thrown) { | |||
| } | |||
| @@ -368,7 +368,7 @@ public final class Diagnostics { | |||
| /** | |||
| * Get the value of a system property. If a security manager | |||
| * blocks access to a property it fills the result in with an error | |||
| * @param key | |||
| * @param key a property key | |||
| * @return the system property's value or error text | |||
| * @see #ERROR_PROPERTY_ACCESS_BLOCKED | |||
| */ | |||
| @@ -514,7 +514,7 @@ public final class Diagnostics { | |||
| /** | |||
| * tell the user about the XML parser | |||
| * @param out | |||
| * @param out a PrintStream | |||
| */ | |||
| private static void doReportParserInfo(PrintStream out) { | |||
| String parserName = getXMLParserName(); | |||
| @@ -526,7 +526,7 @@ public final class Diagnostics { | |||
| /** | |||
| * tell the user about the XSLT processor | |||
| * @param out | |||
| * @param out a PrintStream | |||
| */ | |||
| private static void doReportXSLTProcessorInfo(PrintStream out) { | |||
| String processorName = getXSLTProcessorName(); | |||
| @@ -550,7 +550,7 @@ public final class Diagnostics { | |||
| * try and create a temp file in our temp dir; this | |||
| * checks that it has space and access. | |||
| * We also do some clock reporting. | |||
| * @param out | |||
| * @param out a PrintStream | |||
| */ | |||
| private static void doReportTempDir(PrintStream out) { | |||
| String tempdir = System.getProperty("java.io.tmpdir"); | |||
| @@ -55,6 +55,7 @@ import org.apache.tools.ant.util.VectorSet; | |||
| * With the selectors you can select which files you want to have included. | |||
| * Files which are not selected are excluded. With patterns you can include | |||
| * or exclude files based on their filename. | |||
| * </p> | |||
| * <p> | |||
| * The idea is simple. A given directory is recursively scanned for all files | |||
| * and directories. Each file/directory is matched against a set of selectors, | |||
| @@ -63,11 +64,13 @@ import org.apache.tools.ant.util.VectorSet; | |||
| * pattern of the include pattern list or other file selector, and don't match | |||
| * any pattern of the exclude pattern list or fail to match against a required | |||
| * selector will be placed in the list of files/directories found. | |||
| * </p> | |||
| * <p> | |||
| * When no list of include patterns is supplied, "**" will be used, which | |||
| * means that everything will be matched. When no list of exclude patterns is | |||
| * supplied, an empty list is used, such that nothing will be excluded. When | |||
| * no selectors are supplied, none are applied. | |||
| * </p> | |||
| * <p> | |||
| * The filename pattern matching is done as follows: | |||
| * The name to be matched is split up in path segments. A path segment is the | |||
| @@ -76,41 +79,54 @@ import org.apache.tools.ant.util.VectorSet; | |||
| * For example, "abc/def/ghi/xyz.java" is split up in the segments "abc", | |||
| * "def","ghi" and "xyz.java". | |||
| * The same is done for the pattern against which should be matched. | |||
| * </p> | |||
| * <p> | |||
| * The segments of the name and the pattern are then matched against each | |||
| * other. When '**' is used for a path segment in the pattern, it matches | |||
| * zero or more path segments of the name. | |||
| * </p> | |||
| * <p> | |||
| * There is a special case regarding the use of <code>File.separator</code>s | |||
| * at the beginning of the pattern and the string to match:<br> | |||
| * When a pattern starts with a <code>File.separator</code>, the string | |||
| * to match must also start with a <code>File.separator</code>. | |||
| * When a pattern does not start with a <code>File.separator</code>, the | |||
| * string to match may not start with a <code>File.separator</code>. | |||
| * When one of these rules is not obeyed, the string will not | |||
| * match. | |||
| * at the beginning of the pattern and the string to match: | |||
| * </p> | |||
| * <ul> | |||
| * <li>When a pattern starts with a <code>File.separator</code>, the string | |||
| * to match must also start with a <code>File.separator</code>.</li> | |||
| * <li>When a pattern does not start with a <code>File.separator</code>, the | |||
| * string to match may not start with a <code>File.separator</code>.</li> | |||
| * <li>When one of the above rules is not obeyed, the string will not | |||
| * match.</li> | |||
| * </ul> | |||
| * <p> | |||
| * When a name path segment is matched against a pattern path segment, the | |||
| * following special characters can be used:<br> | |||
| * '*' matches zero or more characters<br> | |||
| * '?' matches one character. | |||
| * </p> | |||
| * <p> | |||
| * Examples: | |||
| * </p> | |||
| * <p> | |||
| * "**\*.class" matches all .class files/dirs in a directory tree. | |||
| * </p> | |||
| * <p> | |||
| * "test\a??.java" matches all files/dirs which start with an 'a', then two | |||
| * more characters and then ".java", in a directory called test. | |||
| * </p> | |||
| * <p> | |||
| * "**" matches everything in a directory tree. | |||
| * </p> | |||
| * <p> | |||
| * "**\test\**\XYZ*" matches all files/dirs which start with "XYZ" and where | |||
| * there is a parent directory called test (e.g. "abc\test\def\ghi\XYZ123"). | |||
| * </p> | |||
| * <p> | |||
| * Case sensitivity may be turned off if necessary. By default, it is | |||
| * turned on. | |||
| * </p> | |||
| * <p> | |||
| * Example of usage: | |||
| * </p> | |||
| * <pre> | |||
| * String[] includes = {"**\\*.class"}; | |||
| * String[] excludes = {"modules\\*\\**"}; | |||
| @@ -702,6 +718,7 @@ public class DirectoryScanner | |||
| * The maximum number of times a symbolic link may be followed | |||
| * during a scan. | |||
| * | |||
| * @param max int | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setMaxLevelsOfSymlinks(final int max) { | |||
| @@ -785,7 +802,7 @@ public class DirectoryScanner | |||
| * <code>File.separatorChar</code>, so the separator used need not | |||
| * match <code>File.separatorChar</code>. | |||
| * | |||
| * <p> When a pattern ends with a '/' or '\', "**" is appended. | |||
| * <p>When a pattern ends with a '/' or '\', "**" is appended.</p> | |||
| * | |||
| * @since Ant 1.6.3 | |||
| */ | |||
| @@ -1371,7 +1388,7 @@ public class DirectoryScanner | |||
| * Test whether or not a name matches against at least one include | |||
| * pattern. | |||
| * | |||
| * @param name The name to match. Must not be <code>null</code>. | |||
| * @param path The tokenized path to match. Must not be <code>null</code>. | |||
| * @return <code>true</code> when the name matches against at least one | |||
| * include pattern, or <code>false</code> otherwise. | |||
| */ | |||
| @@ -812,7 +812,7 @@ public final class IntrospectionHelper { | |||
| * Helper method to extract the inner fault from an {@link InvocationTargetException}, and turn | |||
| * it into a BuildException. If it is already a BuildException, it is type cast and returned; if | |||
| * not a new BuildException is created containing the child as nested text. | |||
| * @param ite | |||
| * @param ite the exception | |||
| * @return the nested exception | |||
| */ | |||
| private static BuildException extractBuildException(final InvocationTargetException ite) { | |||
| @@ -1539,7 +1539,7 @@ public final class IntrospectionHelper { | |||
| * @param elementName name of the element | |||
| * @return a nested creator, or null if there is no component of the given name, or it | |||
| * has no matching add type methods | |||
| * @throws BuildException | |||
| * @throws BuildException if something goes wrong | |||
| */ | |||
| private NestedCreator createAddTypeCreator( | |||
| final Project project, final Object parent, final String elementName) throws BuildException { | |||
| @@ -258,7 +258,7 @@ public final class MagicNames { | |||
| /** | |||
| * Name of the project reference holding an instance of {@link | |||
| * org.apache.tools.ant.taskdefs.launcher.CommandLauncher} to use | |||
| * when executing commands with the help of an external skript. | |||
| * when executing commands with the help of an external script. | |||
| * | |||
| * <p>Alternatively this is the name of a system property holding | |||
| * the fully qualified class name of a {@link | |||
| @@ -272,7 +272,7 @@ public final class MagicNames { | |||
| /** | |||
| * Name of the project reference holding an instance of {@link | |||
| * org.apache.tools.ant.taskdefs.launcher.CommandLauncher} to use | |||
| * when executing commands without the help of an external skript. | |||
| * when executing commands without the help of an external script. | |||
| * | |||
| * <p>Alternatively this is the name of a system property holding | |||
| * the fully qualified class name of a {@link | |||
| @@ -1267,9 +1267,6 @@ public class Main implements AntMain { | |||
| * no descriptions are displayed. | |||
| * If non-<code>null</code>, this should have | |||
| * as many elements as <code>names</code>. | |||
| * @param topDependencies The list of dependencies for each target. | |||
| * The dependencies are listed as a non null | |||
| * enumeration of String. | |||
| * @param heading The heading to display. | |||
| * Should not be <code>null</code>. | |||
| * @param maxlen The maximum length of the names of the targets. | |||
| @@ -882,7 +882,7 @@ public class Project implements ResourceFactory { | |||
| /** | |||
| * Set "keep-going" mode. In this mode Ant will try to execute | |||
| * as many targets as possible. All targets that do not depend | |||
| * on failed target(s) will be executed. If the keepGoing settor/getter | |||
| * on failed target(s) will be executed. If the keepGoing setter/getter | |||
| * methods are used in conjunction with the <code>ant.executor.class</code> | |||
| * property, they will have no effect. | |||
| * @param keepGoingMode "keep-going" mode | |||
| @@ -893,7 +893,7 @@ public class Project implements ResourceFactory { | |||
| } | |||
| /** | |||
| * Return the keep-going mode. If the keepGoing settor/getter | |||
| * Return the keep-going mode. If the keepGoing setter/getter | |||
| * methods are used in conjunction with the <code>ant.executor.class</code> | |||
| * property, they will have no effect. | |||
| * @return "keep-going" mode | |||
| @@ -1797,13 +1797,13 @@ public class Project implements ResourceFactory { | |||
| /** | |||
| * Topologically sort a set of targets. | |||
| * | |||
| * @param root <code>String[]</code> containing the names of the root targets. | |||
| * The sort is created in such a way that the ordered sequence of | |||
| * Targets is the minimum possible such sequence to the specified | |||
| * root targets. | |||
| * Must not be <code>null</code>. | |||
| * @param roots <code>String[]</code> containing the names of the root targets. | |||
| * The sort is created in such a way that the ordered sequence of | |||
| * Targets is the minimum possible such sequence to the specified | |||
| * root targets. | |||
| * Must not be <code>null</code>. | |||
| * @param targetTable A map of names to targets (String to Target). | |||
| * Must not be <code>null</code>. | |||
| * Must not be <code>null</code>. | |||
| * @param returnAll <code>boolean</code> indicating whether to return all | |||
| * targets, or the execution sequence only. | |||
| * @return a Vector of Target objects in sorted order. | |||
| @@ -1811,7 +1811,7 @@ public class Project implements ResourceFactory { | |||
| * targets, or if a named target does not exist. | |||
| * @since Ant 1.6.3 | |||
| */ | |||
| public final Vector<Target> topoSort(final String[] root, final Hashtable<String, Target> targetTable, | |||
| public final Vector<Target> topoSort(final String[] roots, final Hashtable<String, Target> targetTable, | |||
| final boolean returnAll) throws BuildException { | |||
| final Vector<Target> ret = new VectorSet<>(); | |||
| final Hashtable<String, String> state = new Hashtable<>(); | |||
| @@ -1825,19 +1825,19 @@ public class Project implements ResourceFactory { | |||
| // dependency tree, not just on the Targets that depend on the | |||
| // build Target. | |||
| for (int i = 0; i < root.length; i++) { | |||
| final String st = state.get(root[i]); | |||
| for (int i = 0; i < roots.length; i++) { | |||
| final String st = state.get(roots[i]); | |||
| if (st == null) { | |||
| tsort(root[i], targetTable, state, visiting, ret); | |||
| tsort(roots[i], targetTable, state, visiting, ret); | |||
| } else if (st == VISITING) { | |||
| throw new BuildException("Unexpected node in visiting state: " | |||
| + root[i]); | |||
| + roots[i]); | |||
| } | |||
| } | |||
| final StringBuilder buf = new StringBuilder("Build sequence for target(s)"); | |||
| for (int j = 0; j < root.length; j++) { | |||
| buf.append((j == 0) ? " `" : ", `").append(root[j]).append('\''); | |||
| for (int j = 0; j < roots.length; j++) { | |||
| buf.append((j == 0) ? " `" : ", `").append(roots[j]).append('\''); | |||
| } | |||
| buf.append(" is ").append(ret); | |||
| log(buf.toString(), MSG_VERBOSE); | |||
| @@ -2013,6 +2013,8 @@ public class Project implements ResourceFactory { | |||
| /** | |||
| * Does the project know this reference? | |||
| * | |||
| * @param key String | |||
| * @return boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public boolean hasReference(final String key) { | |||
| @@ -2035,6 +2037,7 @@ public class Project implements ResourceFactory { | |||
| /** | |||
| * Look up a reference by its key (ID). | |||
| * | |||
| * @param <T> desired type | |||
| * @param key The key for the desired reference. | |||
| * Must not be <code>null</code>. | |||
| * | |||
| @@ -146,7 +146,7 @@ public abstract class ProjectComponent implements Cloneable { | |||
| getProject().log(msg, msgLevel); | |||
| } else { | |||
| // 'reasonable' default, if the component is used without | |||
| // a Project ( for example as a standalone Bean ). | |||
| // a Project (for example as a standalone Bean). | |||
| // Most ant components can be used this way. | |||
| if (msgLevel <= Project.MSG_INFO) { | |||
| System.err.println(msg); | |||
| @@ -147,8 +147,8 @@ public class ProjectHelper { | |||
| } | |||
| // -------------------- Common properties -------------------- | |||
| // The following properties are required by import ( and other tasks | |||
| // that read build files using ProjectHelper ). | |||
| // The following properties are required by import (and other tasks | |||
| // that read build files using ProjectHelper). | |||
| private Vector<Object> importStack = new Vector<>(); | |||
| private List<String[]> extensionStack = new LinkedList<>(); | |||
| @@ -195,6 +195,7 @@ public class ProjectHelper { | |||
| /** | |||
| * Sets the prefix to prepend to imported target names. | |||
| * | |||
| * @param prefix String | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public static void setCurrentTargetPrefix(String prefix) { | |||
| @@ -212,6 +213,7 @@ public class ProjectHelper { | |||
| * | |||
| * <p>May be set by <import>'s prefixSeparator attribute.</p> | |||
| * | |||
| * @return String | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public static String getCurrentPrefixSeparator() { | |||
| @@ -221,6 +223,7 @@ public class ProjectHelper { | |||
| /** | |||
| * Sets the separator between the prefix and the target name. | |||
| * | |||
| * @param sep String | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public static void setCurrentPrefixSeparator(String sep) { | |||
| @@ -246,6 +249,7 @@ public class ProjectHelper { | |||
| * overwritten in the importing build file. The depends list of | |||
| * the imported targets is not modified at all.</p> | |||
| * | |||
| * @return boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public static boolean isInIncludeMode() { | |||
| @@ -256,6 +260,7 @@ public class ProjectHelper { | |||
| * Sets whether the current file should be read in include as | |||
| * opposed to import mode. | |||
| * | |||
| * @param includeMode boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public static void setInIncludeMode(boolean includeMode) { | |||
| @@ -587,6 +592,8 @@ public class ProjectHelper { | |||
| * | |||
| * <p>This implementation returns false.</p> | |||
| * | |||
| * @param r Resource | |||
| * @return boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public boolean canParseAntlibDescriptor(Resource r) { | |||
| @@ -597,6 +604,9 @@ public class ProjectHelper { | |||
| * Parse the given URL as an antlib descriptor and return the | |||
| * content as something that can be turned into an Antlib task. | |||
| * | |||
| * @param containingProject Project | |||
| * @param source Resource | |||
| * @return UnknownElement | |||
| * @since ant 1.8.0 | |||
| */ | |||
| public UnknownElement parseAntlibDescriptor(Project containingProject, | |||
| @@ -80,7 +80,7 @@ public class ProjectHelperRepository { | |||
| Constructor<? extends ProjectHelper> projectHelper = getProjectHelperBySystemProperty(); | |||
| registerProjectHelper(projectHelper); | |||
| // A JDK1.3 'service' ( like in JAXP ). That will plug a helper | |||
| // A JDK1.3 'service' (like in JAXP). That will plug a helper | |||
| // automatically if in CLASSPATH, with the right META-INF/services. | |||
| try { | |||
| ClassLoader classLoader = LoaderUtils.getContextClassLoader(); | |||
| @@ -249,6 +249,7 @@ public class ProjectHelperRepository { | |||
| * Get the helper that will be able to parse the specified build file. The helper | |||
| * will be chosen among the ones found in the classpath | |||
| * | |||
| * @param buildFile Resource | |||
| * @return the first ProjectHelper that fit the requirement (never <code>null</code>). | |||
| */ | |||
| public ProjectHelper getProjectHelperForBuildFile(Resource buildFile) throws BuildException { | |||
| @@ -272,6 +273,7 @@ public class ProjectHelperRepository { | |||
| * Get the helper that will be able to parse the specified antlib. The helper | |||
| * will be chosen among the ones found in the classpath | |||
| * | |||
| * @param antlib Resource | |||
| * @return the first ProjectHelper that fit the requirement (never <code>null</code>). | |||
| */ | |||
| public ProjectHelper getProjectHelperForAntlib(Resource antlib) throws BuildException { | |||
| @@ -70,7 +70,7 @@ import org.apache.tools.ant.property.PropertyExpander; | |||
| * parseProperties} inside the ParseProperties class which in turn | |||
| * uses the {@link org.apache.tools.ant.property.PropertyExpander | |||
| * PropertyExpander delegates} to find properties inside the string | |||
| * and this class to expand the propertiy names found into the | |||
| * and this class to expand the property names found into the | |||
| * corresponding values.</p> | |||
| * | |||
| * <p>When {@link #getProperty looking up a property value} this class | |||
| @@ -1098,6 +1098,7 @@ public class PropertyHelper implements GetProperty { | |||
| /** | |||
| * Get the Collection of delegates of the specified type. | |||
| * | |||
| * @param <D> desired type. | |||
| * @param type | |||
| * delegate type. | |||
| * @return Collection. | |||
| @@ -1136,6 +1137,8 @@ public class PropertyHelper implements GetProperty { | |||
| /** | |||
| * If the given object can be interpreted as a true/false value, | |||
| * turn it into a matching Boolean - otherwise return null. | |||
| * @param value Object | |||
| * @return Boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public static Boolean toBoolean(Object value) { | |||
| @@ -1159,6 +1162,8 @@ public class PropertyHelper implements GetProperty { | |||
| /** | |||
| * Returns true if the object is null or an empty string. | |||
| * | |||
| * @param value Object | |||
| * @return boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| private static boolean nullOrEmpty(Object value) { | |||
| @@ -1170,6 +1175,8 @@ public class PropertyHelper implements GetProperty { | |||
| * Returns true if the value can be interpreted as a true value or | |||
| * cannot be interpreted as a false value and a property of the | |||
| * value's name exists. | |||
| * @param value Object | |||
| * @return boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| private boolean evalAsBooleanOrPropertyName(Object value) { | |||
| @@ -1184,6 +1191,8 @@ public class PropertyHelper implements GetProperty { | |||
| * Returns true if the value is null or an empty string, can be | |||
| * interpreted as a true value or cannot be interpreted as a false | |||
| * value and a property of the value's name exists. | |||
| * @param value Object | |||
| * @return boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public boolean testIfCondition(Object value) { | |||
| @@ -1194,6 +1203,8 @@ public class PropertyHelper implements GetProperty { | |||
| * Returns true if the value is null or an empty string, can be | |||
| * interpreted as a false value or cannot be interpreted as a true | |||
| * value and a property of the value's name doesn't exist. | |||
| * @param value Object | |||
| * @return boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public boolean testUnlessCondition(Object value) { | |||
| @@ -69,7 +69,7 @@ public class RuntimeConfigurable implements Serializable { | |||
| private transient boolean namespacedAttribute = false; | |||
| /** Attribute names and values. While the XML spec doesn't require | |||
| * preserving the order ( AFAIK ), some ant tests do rely on the | |||
| * preserving the order (AFAIK), some ant tests do rely on the | |||
| * exact order. | |||
| * The only exception to this order is the treatment of | |||
| * refid. A number of datatypes check if refid is set | |||
| @@ -171,7 +171,7 @@ public class RuntimeConfigurable implements Serializable { | |||
| * are any Ant attributes, and if so, the method calls the | |||
| * isEnabled() method on them. | |||
| * @param owner the UE that owns this RC. | |||
| * @return true if enabled, false if any of the ant attribures return | |||
| * @return true if enabled, false if any of the ant attributes return | |||
| * false. | |||
| * @since 1.9.1 | |||
| */ | |||
| @@ -266,10 +266,11 @@ public class RuntimeConfigurable implements Serializable { | |||
| /** | |||
| * Sets the attributes for the wrapped element. | |||
| * | |||
| * @deprecated since 1.6.x. | |||
| * @param attributes List of attributes defined in the XML for this | |||
| * element. May be <code>null</code>. | |||
| * @deprecated since 1.6.x. | |||
| */ | |||
| @Deprecated | |||
| public synchronized void setAttributes(AttributeList attributes) { | |||
| this.attributes = new AttributeListImpl(attributes); | |||
| for (int i = 0; i < attributes.getLength(); i++) { | |||
| @@ -340,10 +341,11 @@ public class RuntimeConfigurable implements Serializable { | |||
| /** | |||
| * Returns the list of attributes for the wrapped element. | |||
| * | |||
| * @deprecated Deprecated since Ant 1.6 in favor of {@link #getAttributeMap}. | |||
| * @return An AttributeList representing the attributes defined in the | |||
| * XML for this element. May be <code>null</code>. | |||
| * @deprecated Deprecated since Ant 1.6 in favor of {@link #getAttributeMap}. | |||
| */ | |||
| @Deprecated | |||
| public synchronized AttributeList getAttributes() { | |||
| return attributes; | |||
| } | |||
| @@ -414,7 +416,7 @@ public class RuntimeConfigurable implements Serializable { | |||
| /** | |||
| * Get the text content of this element. Various text chunks are | |||
| * concatenated, there is no way ( currently ) of keeping track of | |||
| * concatenated, there is no way (currently) of keeping track of | |||
| * multiple fragments. | |||
| * | |||
| * @return the text content of this element. | |||
| @@ -448,9 +450,10 @@ public class RuntimeConfigurable implements Serializable { | |||
| * and then each child is configured and added. Each time the | |||
| * wrapper is configured, the attributes and text for it are | |||
| * reset. | |||
| * | |||
| * <p> | |||
| * If the element has an <code>id</code> attribute, a reference | |||
| * is added to the project as well. | |||
| * </p> | |||
| * | |||
| * @param p The project containing the wrapped element. | |||
| * Must not be <code>null</code>. | |||
| @@ -467,18 +470,18 @@ public class RuntimeConfigurable implements Serializable { | |||
| * Configures the wrapped element. The attributes and text for | |||
| * the wrapped element are configured. Each time the wrapper is | |||
| * configured, the attributes and text for it are reset. | |||
| * | |||
| * <p> | |||
| * If the element has an <code>id</code> attribute, a reference | |||
| * is added to the project as well. | |||
| * </p> | |||
| * | |||
| * @param p The project containing the wrapped element. | |||
| * Must not be <code>null</code>. | |||
| * | |||
| * @param configureChildren ignored. | |||
| * | |||
| * @exception BuildException if the configuration fails, for instance due | |||
| * to invalid attributes , or text being added to | |||
| * to invalid attributes, or text being added to | |||
| * an element which doesn't accept it. | |||
| */ | |||
| public synchronized void maybeConfigure(Project p, boolean configureChildren) | |||
| @@ -539,7 +542,7 @@ public class RuntimeConfigurable implements Serializable { | |||
| } catch (BuildException be) { | |||
| if ("id".equals(name)) { | |||
| // Assume that this is an not supported attribute type | |||
| // thrown for example by a dymanic attribute task | |||
| // thrown for example by a dynamic attribute task | |||
| // Do nothing | |||
| } else { | |||
| throw be; | |||
| @@ -306,6 +306,7 @@ public class Target implements TaskContainer { | |||
| /** | |||
| * Same as {@link #setIf(String)} but requires a {@link Condition} instance | |||
| * | |||
| * @param condition Condition | |||
| * @since 1.9 | |||
| */ | |||
| public void setIf(Condition condition) { | |||
| @@ -358,6 +359,7 @@ public class Target implements TaskContainer { | |||
| /** | |||
| * Same as {@link #setUnless(String)} but requires a {@link Condition} instance | |||
| * | |||
| * @param condition Condition | |||
| * @since 1.9 | |||
| */ | |||
| public void setUnless(Condition condition) { | |||
| @@ -44,7 +44,7 @@ public class TaskAdapter extends Task implements TypeAdapter { | |||
| * Constructor for given proxy. | |||
| * So you could write easier code | |||
| * <pre> | |||
| * myTaskContainer.addTask( new TaskAdapter(myProxy) ); | |||
| * myTaskContainer.addTask(new TaskAdapter(myProxy)); | |||
| * </pre> | |||
| * | |||
| * @param proxy The object which Ant should use as task. | |||
| @@ -94,7 +94,7 @@ public class TaskConfigurationChecker { | |||
| */ | |||
| public void checkErrors() throws BuildException { | |||
| if (!errors.isEmpty()) { | |||
| StringBuilder sb = new StringBuilder("Configurationerror on <"); | |||
| StringBuilder sb = new StringBuilder("Configuration error on <"); | |||
| sb.append(task.getTaskName()); | |||
| sb.append(">:"); | |||
| sb.append(System.getProperty("line.separator")); | |||
| @@ -23,8 +23,7 @@ import org.apache.tools.ant.Task; | |||
| * Tasks extending this class may contain multiple actions. | |||
| * The method that is invoked for execution depends upon the | |||
| * value of the action attribute of the task. | |||
| * <br> | |||
| * Example:<br> | |||
| * <p>Example:</p> | |||
| * <mytask action="list"/> will invoke the method | |||
| * with the signature public void list() in mytask's class. | |||
| * If the action attribute is not defined in the task or is empty, | |||
| @@ -58,7 +58,7 @@ public abstract class BaseParamFilterReader | |||
| * @param parameters The parameters to be used by this filter. | |||
| * Should not be <code>null</code>. | |||
| */ | |||
| public final void setParameters(final Parameter[] parameters) { | |||
| public final void setParameters(final Parameter... parameters) { | |||
| this.parameters = parameters; | |||
| setInitialized(false); | |||
| } | |||
| @@ -29,8 +29,7 @@ import org.apache.tools.ant.util.ResourceUtils; | |||
| * Assembles the constants declared in a Java class in | |||
| * <code>key1=value1(line separator)key2=value2</code> | |||
| * format. | |||
| *<p> | |||
| * Notes: | |||
| *<p>Notes:</p> | |||
| * <ol> | |||
| * <li>This filter uses the BCEL external toolkit. | |||
| * <li>This assembles only those constants that are not created | |||
| @@ -39,7 +38,7 @@ import org.apache.tools.ant.util.ResourceUtils; | |||
| * and String only.</li> | |||
| * <li>The access modifiers of the declared constants do not matter.</li> | |||
| *</ol> | |||
| * Example:<br> | |||
| * <p>Example:</p> | |||
| * <pre><classconstants/></pre> | |||
| * Or: | |||
| * <pre><filterreader | |||
| @@ -30,8 +30,7 @@ import org.apache.tools.ant.types.PropertySet; | |||
| /** | |||
| * Expands Ant properties, if any, in the data. | |||
| * <p> | |||
| * Example:<br> | |||
| * <p>Example:</p> | |||
| * <pre><expandproperties/></pre> | |||
| * Or: | |||
| * <pre><filterreader | |||
| @@ -29,13 +29,14 @@ import org.apache.tools.ant.types.EnumeratedAttribute; | |||
| * damaged by misconfigured or misguided editors or file transfer programs. | |||
| * <p> | |||
| * This filter can take the following arguments: | |||
| * </p> | |||
| * <ul> | |||
| * <li>eof | |||
| * <li>eol | |||
| * <li>fixlast | |||
| * <li>javafiles | |||
| * <li>tab | |||
| * <li>tablength | |||
| * <li>eof</li> | |||
| * <li>eol</li> | |||
| * <li>fixlast</li> | |||
| * <li>javafiles</li> | |||
| * <li>tab</li> | |||
| * <li>tablength</li> | |||
| * </ul> | |||
| * None of which are required. | |||
| * <p> | |||
| @@ -44,6 +45,7 @@ import org.apache.tools.ant.types.EnumeratedAttribute; | |||
| * handling has also been generalised to accommodate any tabwidth from 2 to 80, | |||
| * inclusive. Importantly, it can leave untouched any literal TAB characters | |||
| * embedded within Java string or character constants. | |||
| * </p> | |||
| * <p> | |||
| * <em>Caution:</em> run with care on carefully formatted files. This may | |||
| * sound obvious, but if you don't specify asis, presume that your files are | |||
| @@ -53,22 +55,19 @@ import org.apache.tools.ant.types.EnumeratedAttribute; | |||
| * cr="add" can result in CR characters being removed in one special case | |||
| * accommodated, i.e., CRCRLF is regarded as a single EOL to handle cases where | |||
| * other programs have converted CRLF into CRCRLF. | |||
| * | |||
| * <P> | |||
| *</p> | |||
| * <p> | |||
| * Example: | |||
| * | |||
| * </p> | |||
| * <pre> | |||
| * <<fixcrlf tab="add" eol="crlf" eof="asis"/> | |||
| * </pre> | |||
| * | |||
| * Or: | |||
| * | |||
| * <pre> | |||
| * <filterreader classname="org.apache.tools.ant.filters.FixCrLfFilter"> | |||
| * <param eol="crlf" tab="asis"/> | |||
| * </filterreader> | |||
| * </pre> | |||
| * | |||
| */ | |||
| public final class FixCrLfFilter extends BaseParamFilterReader implements ChainableReader { | |||
| private static final int DEFAULT_TAB_LENGTH = 8; | |||
| @@ -946,8 +945,8 @@ public final class FixCrLfFilter extends BaseParamFilterReader implements Chaina | |||
| /** | |||
| * @see EnumeratedAttribute#getValues | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| public String[] getValues() { | |||
| return new String[] {"asis", "cr", "lf", "crlf", "mac", "unix", "dos"}; | |||
| } | |||
| @@ -204,7 +204,8 @@ public final class LineContainsRegExp | |||
| } | |||
| /** | |||
| * Whether to match casesensitevly. | |||
| * Whether to match casesensitively. | |||
| * @param b boolean | |||
| * @since Ant 1.8.2 | |||
| */ | |||
| public void setCaseSensitive(boolean b) { | |||
| @@ -221,6 +222,7 @@ public final class LineContainsRegExp | |||
| /** | |||
| * Set the regular expression as an attribute. | |||
| * @param pattern String | |||
| * @since Ant 1.10.2 | |||
| */ | |||
| public void setRegexp(String pattern) { | |||
| @@ -217,6 +217,7 @@ public final class ReplaceTokens | |||
| * A resource containing properties, each of which is interpreted | |||
| * as a token/value pair. | |||
| * | |||
| * @param r Resource | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setPropertiesResource(Resource r) { | |||
| @@ -82,10 +82,10 @@ import org.apache.tools.ant.types.Parameter; | |||
| * | |||
| * <p> | |||
| * Sort all files <code>*.txt</code> from <i>src</i> location using as | |||
| * sorting criterium <code>EvenFirstCmp</code> class, that sorts the file | |||
| * sorting criterion <code>EvenFirstCmp</code> class, that sorts the file | |||
| * lines putting even lines first then odd lines for example. The modified files | |||
| * are copied into <i>build</i> location. The <code>EvenFirstCmp</code>, | |||
| * has to an instanciable class via <code>Class.newInstance()</code>, | |||
| * has to an instantiable class via <code>Class.newInstance()</code>, | |||
| * therefore in case of inner class has to be <em>static</em>. It also has to | |||
| * implement <code>java.util.Comparator</code> interface, for example: | |||
| * </p> | |||
| @@ -102,7 +102,7 @@ import org.apache.tools.ant.types.Parameter; | |||
| * | |||
| * <p>The example above is equivalent to:</p> | |||
| * | |||
| * <blockquote><pre> | |||
| * <pre> | |||
| * <componentdef name="evenfirst" | |||
| * classname="org.apache.tools.ant.filters.EvenFirstCmp"/> | |||
| * <copy todir="build"> | |||
| @@ -113,10 +113,10 @@ import org.apache.tools.ant.types.Parameter; | |||
| * </sortfilter> | |||
| * </filterchain> | |||
| * </copy> | |||
| * </pre></blockquote> | |||
| * </pre> | |||
| * | |||
| * <p> If parameter <code>comparator</code> is present, then | |||
| * <code>reverse</code> parameter will not be taken into account. </p> | |||
| * <p>If parameter <code>comparator</code> is present, then | |||
| * <code>reverse</code> parameter will not be taken into account.</p> | |||
| * | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| @@ -285,7 +285,7 @@ public final class SortFilter extends BaseParamFilterReader | |||
| } | |||
| /** | |||
| * Set the comparator to be used as sorting criterium. | |||
| * Set the comparator to be used as sorting criterion. | |||
| * | |||
| * @param comparator | |||
| * the comparator to set | |||
| @@ -110,9 +110,9 @@ public final class ChainReaderHelper { | |||
| /** | |||
| * Convenience constructor. | |||
| * @param project | |||
| * @param primaryReader | |||
| * @param filterChains | |||
| * @param project ditto | |||
| * @param primaryReader ditto | |||
| * @param filterChains ditto | |||
| */ | |||
| public ChainReaderHelper(Project project, Reader primaryReader, | |||
| Iterable<FilterChain> filterChains) { | |||
| @@ -130,7 +130,7 @@ public final class ChainReaderHelper { | |||
| /** | |||
| * Fluent primary {@link Reader} mutator. | |||
| * @param rdr | |||
| * @param rdr Reader | |||
| * @return {@code this} | |||
| */ | |||
| public ChainReaderHelper withPrimaryReader(Reader rdr) { | |||
| @@ -148,7 +148,7 @@ public final class ChainReaderHelper { | |||
| /** | |||
| * Fluent {@link Project} mutator. | |||
| * @param project | |||
| * @param project ditto | |||
| * @return {@code this} | |||
| */ | |||
| public ChainReaderHelper withProject(Project project) { | |||
| @@ -176,7 +176,7 @@ public final class ChainReaderHelper { | |||
| /** | |||
| * Fluent buffer size mutator. | |||
| * @param size | |||
| * @param size ditto | |||
| * @return {@code this} | |||
| */ | |||
| public ChainReaderHelper withBufferSize(int size) { | |||
| @@ -195,7 +195,7 @@ public final class ChainReaderHelper { | |||
| /** | |||
| * Fluent {@code filterChains} mutator. | |||
| * @param filterChains | |||
| * @param filterChains ditto | |||
| * @return {@code this} | |||
| */ | |||
| public ChainReaderHelper withFilterChains(Iterable<FilterChain> filterChains) { | |||
| @@ -212,7 +212,7 @@ public final class ChainReaderHelper { | |||
| /** | |||
| * Fluent mechanism to apply some {@link Consumer}. | |||
| * @param consumer | |||
| * @param consumer ditto | |||
| * @return {@code this} | |||
| */ | |||
| public ChainReaderHelper with(Consumer<ChainReaderHelper> consumer) { | |||
| @@ -84,14 +84,14 @@ public class AntXMLContext { | |||
| */ | |||
| private Target implicitTarget = new Target(); | |||
| /** Current target ( no need for a stack as the processing model | |||
| allows only one level of target ) */ | |||
| /** Current target (no need for a stack as the processing model | |||
| allows only one level of target) */ | |||
| private Target currentTarget = null; | |||
| /** The stack of RuntimeConfigurable2 wrapping the | |||
| objects. | |||
| */ | |||
| private Vector<RuntimeConfigurable> wStack = new Vector<RuntimeConfigurable>(); | |||
| private Vector<RuntimeConfigurable> wStack = new Vector<>(); | |||
| /** | |||
| * Indicates whether the project tag attributes are to be ignored | |||
| @@ -138,7 +138,8 @@ public class AntXMLContext { | |||
| /** | |||
| * sets the build file to which the XML context belongs | |||
| * @param buildFile ant build file | |||
| * @param buildFile Ant build file | |||
| * @throws MalformedURLException if parent URL cannot be constructed | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setBuildFile(URL buildFile) throws MalformedURLException { | |||
| @@ -151,7 +152,7 @@ public class AntXMLContext { | |||
| /** | |||
| * find out the build file | |||
| * @return the build file to which the xml context belongs | |||
| * @return the build file to which the XML context belongs | |||
| */ | |||
| public File getBuildFile() { | |||
| return buildFile; | |||
| @@ -167,7 +168,7 @@ public class AntXMLContext { | |||
| /** | |||
| * find out the build file | |||
| * @return the build file to which the xml context belongs | |||
| * @return the build file to which the xml context belongs | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public URL getBuildFileURL() { | |||
| @@ -486,8 +486,8 @@ public class ProjectHelper2 extends ProjectHelper { | |||
| /** | |||
| * Handler for ant processing. Uses a stack of AntHandlers to | |||
| * implement each element ( the original parser used a recursive behavior, | |||
| * with the implicit execution stack ) | |||
| * implement each element (the original parser used a recursive behavior, | |||
| * with the implicit execution stack) | |||
| */ | |||
| public static class RootHandler extends DefaultHandler { | |||
| private Stack<AntHandler> antHandlers = new Stack<AntHandler>(); | |||
| @@ -718,11 +718,11 @@ public class ProjectHelper2 extends ProjectHelper { | |||
| * too 'involved' in the processing. A better solution (IMO) | |||
| * would be to create UE for Project and Target too, and | |||
| * then process the tree and have Project/Target deal with | |||
| * its attributes ( similar with Description ). | |||
| * its attributes (similar with Description). | |||
| * | |||
| * If we eventually switch to ( or add support for ) DOM, | |||
| * If we eventually switch to (or add support for) DOM, | |||
| * things will work smoothly - UE can be avoided almost completely | |||
| * ( it could still be created on demand, for backward compatibility ) | |||
| * (it could still be created on demand, for backward compatibility) | |||
| */ | |||
| for (int i = 0; i < attrs.getLength(); i++) { | |||
| @@ -772,7 +772,7 @@ public class ProjectHelper2 extends ProjectHelper { | |||
| } | |||
| } | |||
| // TODO Move to Project ( so it is shared by all helpers ) | |||
| // TODO Move to Project (so it is shared by all helpers) | |||
| String antFileProp = | |||
| MagicNames.ANT_FILE + "." + context.getCurrentProjectName(); | |||
| String dup = project.getProperty(antFileProp); | |||
| @@ -1097,7 +1097,7 @@ public class ProjectHelper2 extends ProjectHelper { | |||
| } | |||
| /** | |||
| * Handler for all project elements ( tasks, data types ) | |||
| * Handler for all project elements (tasks, data types) | |||
| */ | |||
| public static class ElementHandler extends AntHandler { | |||
| @@ -1153,7 +1153,7 @@ public class ProjectHelper2 extends ProjectHelper { | |||
| // Nested element | |||
| ((UnknownElement) parent).addChild(task); | |||
| } else { | |||
| // Task included in a target ( including the default one ). | |||
| // Task included in a target (including the default one). | |||
| context.getCurrentTarget().addTask(task); | |||
| } | |||
| @@ -188,8 +188,8 @@ public class ProjectHelperImpl extends ProjectHelper { | |||
| protected DocumentHandler parentHandler; | |||
| /** Helper impl. With non-static internal classes, the compiler will generate | |||
| this automatically - but this will fail with some compilers ( reporting | |||
| "Expecting to find object/array on stack" ). If we pass it | |||
| this automatically - but this will fail with some compilers (reporting | |||
| "Expecting to find object/array on stack"). If we pass it | |||
| explicitly it'll work with more compilers. | |||
| */ | |||
| ProjectHelperImpl helperImpl; | |||
| @@ -18,12 +18,10 @@ | |||
| package org.apache.tools.ant.helper; | |||
| import org.apache.tools.ant.BuildException; | |||
| import org.apache.tools.ant.Executor; | |||
| import org.apache.tools.ant.Project; | |||
| /** | |||
| * "Single-check" Target executor implementation. | |||
| * Differs from {@link DefaultExecutor} in that the dependencies for all | |||
| @@ -58,10 +58,9 @@ public class Launcher { | |||
| /** | |||
| * The location of a per-user library directory. | |||
| * <p> | |||
| * It's value is the concatenation of {@link #ANT_PRIVATEDIR} | |||
| * <p>It's value is the concatenation of {@link #ANT_PRIVATEDIR} | |||
| * with {@link #ANT_PRIVATELIB}, with an appropriate file separator | |||
| * in between. For example, on Unix, it's <code>.ant/lib</code>. | |||
| * in between. For example, on Unix, it's <code>.ant/lib</code>.</p> | |||
| */ | |||
| public static final String USER_LIBDIR = | |||
| ANT_PRIVATEDIR + File.separatorChar + ANT_PRIVATELIB; | |||
| @@ -378,14 +378,14 @@ public final class Locator { | |||
| * File.toURL() does not encode characters like #. | |||
| * File.toURI() has been introduced in java 1.4, so | |||
| * Ant cannot use it (except by reflection) <!-- TODO no longer true --> | |||
| * FileUtils.toURI() cannot be used by Locator.java | |||
| * File.toURI() cannot be used by Locator.java | |||
| * Implemented this way. | |||
| * File.toURL() adds file: and changes '\' to '/' for dos OSes | |||
| * encodeURI converts characters like ' ' and '#' to %DD | |||
| * @param file the file to convert | |||
| * @return URL the converted File | |||
| * @throws MalformedURLException on error | |||
| * @deprecated since 1.9, use {@link FileUtils#getFileURL(File)} | |||
| * @deprecated since 1.9, use <code>FileUtils.getFileURL(File)</code> | |||
| */ | |||
| @Deprecated | |||
| public static URL fileToURL(File file) | |||
| @@ -201,8 +201,8 @@ public class AnsiColorLogger extends DefaultLogger { | |||
| /** | |||
| * @see DefaultLogger#printMessage | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| @Override | |||
| protected void printMessage(final String message, | |||
| final PrintStream stream, | |||
| @@ -75,7 +75,7 @@ public class BigProjectLogger extends SimpleBigProjectLogger | |||
| /** | |||
| * {@inheritDoc} | |||
| * | |||
| * @param event | |||
| * @param event BuildEvent | |||
| */ | |||
| public void targetStarted(BuildEvent event) { | |||
| maybeRaiseSubBuildStarted(event); | |||
| @@ -85,7 +85,7 @@ public class BigProjectLogger extends SimpleBigProjectLogger | |||
| /** | |||
| * {@inheritDoc} | |||
| * | |||
| * @param event | |||
| * @param event BuildEvent | |||
| */ | |||
| public void taskStarted(BuildEvent event) { | |||
| maybeRaiseSubBuildStarted(event); | |||
| @@ -95,7 +95,7 @@ public class BigProjectLogger extends SimpleBigProjectLogger | |||
| /** | |||
| * {@inheritDoc} | |||
| * | |||
| * @param event | |||
| * @param event BuildEvent | |||
| */ | |||
| public void buildFinished(BuildEvent event) { | |||
| maybeRaiseSubBuildStarted(event); | |||
| @@ -106,7 +106,7 @@ public class BigProjectLogger extends SimpleBigProjectLogger | |||
| /** | |||
| * {@inheritDoc} | |||
| * | |||
| * @param event | |||
| * @param event BuildEvent | |||
| */ | |||
| public void messageLogged(BuildEvent event) { | |||
| maybeRaiseSubBuildStarted(event); | |||
| @@ -130,8 +130,8 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { | |||
| /** | |||
| * @see BuildListener#targetStarted | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| @Override | |||
| public void targetStarted(final BuildEvent event) { | |||
| if (initialized) { | |||
| @@ -146,8 +146,8 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { | |||
| /** | |||
| * @see BuildListener#targetFinished | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| @Override | |||
| public void targetFinished(final BuildEvent event) { | |||
| if (initialized) { | |||
| @@ -166,8 +166,8 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { | |||
| /** | |||
| * @see BuildListener#taskStarted | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| @Override | |||
| public void taskStarted(final BuildEvent event) { | |||
| if (initialized) { | |||
| @@ -189,8 +189,8 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { | |||
| /** | |||
| * @see BuildListener#taskFinished | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| @Override | |||
| public void taskFinished(final BuildEvent event) { | |||
| if (initialized) { | |||
| @@ -219,8 +219,8 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { | |||
| /** | |||
| * @see BuildListener#messageLogged | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| @Override | |||
| public void messageLogged(final BuildEvent event) { | |||
| if (initialized) { | |||
| @@ -55,8 +55,8 @@ public class Log4jListener implements BuildListener { | |||
| /** | |||
| * @see BuildListener#buildStarted | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| @Override | |||
| public void buildStarted(final BuildEvent event) { | |||
| if (initialized) { | |||
| @@ -67,8 +67,8 @@ public class Log4jListener implements BuildListener { | |||
| /** | |||
| * @see BuildListener#buildFinished | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| @Override | |||
| public void buildFinished(final BuildEvent event) { | |||
| if (initialized) { | |||
| @@ -83,8 +83,8 @@ public class Log4jListener implements BuildListener { | |||
| /** | |||
| * @see BuildListener#targetStarted | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| @Override | |||
| public void targetStarted(final BuildEvent event) { | |||
| if (initialized) { | |||
| @@ -95,8 +95,8 @@ public class Log4jListener implements BuildListener { | |||
| /** | |||
| * @see BuildListener#targetFinished | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| @Override | |||
| public void targetFinished(final BuildEvent event) { | |||
| if (initialized) { | |||
| @@ -113,8 +113,8 @@ public class Log4jListener implements BuildListener { | |||
| /** | |||
| * @see BuildListener#taskStarted | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| @Override | |||
| public void taskStarted(final BuildEvent event) { | |||
| if (initialized) { | |||
| @@ -126,8 +126,8 @@ public class Log4jListener implements BuildListener { | |||
| /** | |||
| * @see BuildListener#taskFinished | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| @Override | |||
| public void taskFinished(final BuildEvent event) { | |||
| if (initialized) { | |||
| @@ -144,8 +144,8 @@ public class Log4jListener implements BuildListener { | |||
| /** | |||
| * @see BuildListener#messageLogged | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| @Override | |||
| public void messageLogged(final BuildEvent event) { | |||
| if (initialized) { | |||
| @@ -328,8 +328,6 @@ public class MailLogger extends DefaultLogger { | |||
| * @param defaultValue value returned if not present in the properties. | |||
| * Set to null to make required. | |||
| * @return The value of the property, or default value. | |||
| * @exception Exception thrown if no default value is specified and the | |||
| * property is not present in properties. | |||
| */ | |||
| private String getValue(Map<String, Object> properties, String name, | |||
| String defaultValue) { | |||
| @@ -38,17 +38,18 @@ import org.apache.tools.ant.util.StringUtils; | |||
| /** | |||
| * original Cvs.java 1.20 | |||
| * | |||
| * NOTE: This implementation has been moved here from Cvs.java with | |||
| * the addition of some accessors for extensibility. Another task | |||
| * can extend this with some customized output processing. | |||
| * <p> | |||
| * NOTE: This implementation has been moved here from Cvs.java with | |||
| * the addition of some accessors for extensibility. Another task | |||
| * can extend this with some customized output processing. | |||
| * </p> | |||
| * | |||
| * @since Ant 1.5 | |||
| */ | |||
| public abstract class AbstractCvsTask extends Task { | |||
| /** | |||
| * Default compression level to use, if compression is enabled via | |||
| * setCompression( true ). | |||
| * setCompression(true). | |||
| */ | |||
| public static final int DEFAULT_COMPRESSION_LEVEL = 3; | |||
| private static final int MAXIMUM_COMRESSION_LEVEL = 9; | |||
| @@ -74,14 +75,17 @@ public abstract class AbstractCvsTask extends Task { | |||
| * the package/module to check out. | |||
| */ | |||
| private String cvsPackage; | |||
| /** | |||
| * the tag | |||
| */ | |||
| private String tag; | |||
| /** | |||
| * the default command. | |||
| */ | |||
| private static final String DEFAULT_COMMAND = "checkout"; | |||
| /** | |||
| * the CVS command to execute. | |||
| */ | |||
| @@ -122,7 +126,9 @@ public abstract class AbstractCvsTask extends Task { | |||
| */ | |||
| private File dest; | |||
| /** whether or not to append stdout/stderr to existing files */ | |||
| /** | |||
| * whether or not to append stdout/stderr to existing files | |||
| */ | |||
| private boolean append = false; | |||
| /** | |||
| @@ -830,6 +836,7 @@ public abstract class AbstractCvsTask extends Task { | |||
| /** | |||
| * add a named module/package. | |||
| * | |||
| * @param m Module | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void addModule(Module m) { | |||
| @@ -181,7 +181,7 @@ public abstract class AbstractJarSignerTask extends Task { | |||
| } | |||
| /** | |||
| * Enable verbose output when signing ; optional: default false | |||
| * Enable verbose output when signing; optional: default false | |||
| * | |||
| * @param verbose if true enable verbose output | |||
| */ | |||
| @@ -192,7 +192,7 @@ public abstract class AbstractJarSignerTask extends Task { | |||
| /** | |||
| * do strict checking | |||
| * @since Ant 1.9.1 | |||
| * @param strict | |||
| * @param strict boolean | |||
| */ | |||
| public void setStrict(boolean strict) { | |||
| this.strict = strict; | |||
| @@ -139,6 +139,7 @@ public class Ant extends Task { | |||
| * as it would be when running the build file directly - | |||
| * independent of dir and/or inheritAll settings. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setUseNativeBasedir(boolean b) { | |||
| @@ -470,7 +471,7 @@ public class Ant extends Task { | |||
| /** | |||
| * Get the default build file name to use when launching the task. | |||
| * <p> | |||
| * This function may be overrided by providers of custom ProjectHelper so they can implement easily their sub | |||
| * This function may be overriden by providers of custom ProjectHelper so they can implement easily their sub | |||
| * launcher. | |||
| * | |||
| * @return the name of the default file | |||
| @@ -613,7 +614,7 @@ public class Ant extends Task { | |||
| * well as properties named basedir or ant.file. | |||
| * @param props properties <code>Hashtable</code> to copy to the | |||
| * new project. | |||
| * @param the type of property to set (a plain Ant property, a | |||
| * @param type the type of property to set (a plain Ant property, a | |||
| * user property or an inherited property). | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| @@ -822,6 +823,6 @@ public class Ant extends Task { | |||
| } | |||
| private enum PropertyType { | |||
| PLAIN, INHERITED, USER; | |||
| PLAIN, INHERITED, USER | |||
| } | |||
| } | |||
| @@ -33,7 +33,7 @@ public final class AttributeNamespaceDef extends AntlibDefinition { | |||
| /** | |||
| * Run the definition. | |||
| * This registers the XML namespace (URI) as a namepace for | |||
| * This registers the XML namespace (URI) as a namespace for | |||
| * attributes. | |||
| */ | |||
| public void execute() { | |||
| @@ -498,8 +498,8 @@ public class Available extends Task implements Condition { | |||
| /** | |||
| * @see EnumeratedAttribute#getValues | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| @Override | |||
| public String[] getValues() { | |||
| return VALUES; | |||
| @@ -121,7 +121,7 @@ public class BuildNumber extends Task { | |||
| * Utility method to load properties from file. | |||
| * | |||
| * @return the loaded properties | |||
| * @throws BuildException | |||
| * @throws BuildException if something goes wrong | |||
| */ | |||
| private Properties loadProperties() throws BuildException { | |||
| try (InputStream input = Files.newInputStream(myFile.toPath())) { | |||
| @@ -363,7 +363,7 @@ public class Concat extends Task implements ResourceCollection { | |||
| /** | |||
| * return true if the lastchars buffer does | |||
| * not contain the lineseparator | |||
| * not contain the line separator | |||
| */ | |||
| private boolean isMissingEndOfLine() { | |||
| for (int i = 0; i < lastChars.length; ++i) { | |||
| @@ -621,6 +621,7 @@ public class Concat extends Task implements ResourceCollection { | |||
| * | |||
| * <p>Defaults to false</p> | |||
| * | |||
| * @param f boolean | |||
| * @since Ant 1.8.2 | |||
| */ | |||
| public void setForceReadOnly(boolean f) { | |||
| @@ -241,6 +241,7 @@ public class Copy extends Task { | |||
| * | |||
| * <p>Defaults to false</p> | |||
| * | |||
| * @param f boolean | |||
| * @since Ant 1.8.2 | |||
| */ | |||
| public void setForce(final boolean f) { | |||
| @@ -250,6 +251,7 @@ public class Copy extends Task { | |||
| /** | |||
| * Whether read-only destinations will be overwritten. | |||
| * | |||
| * @return boolean | |||
| * @since Ant 1.8.2 | |||
| */ | |||
| public boolean getForce() { | |||
| @@ -466,7 +468,7 @@ public class Copy extends Task { | |||
| (1) Move is optimized to move directories if a fileset | |||
| has been included completely, therefore FileSets need a | |||
| special treatment. This is also required to support | |||
| the failOnError semantice (skip filesets with broken | |||
| the failOnError semantic (skip filesets with broken | |||
| basedir but handle the remaining collections). | |||
| (2) We carry around a few protected methods that work | |||
| @@ -1036,7 +1038,7 @@ public class Copy extends Task { | |||
| } | |||
| /** | |||
| * Either returns its argument or a plaeholder if the argument is null. | |||
| * Either returns its argument or a placeholder if the argument is null. | |||
| */ | |||
| private static File getKeyFile(final File f) { | |||
| return f == null ? NULL_FILE_PLACEHOLDER : f; | |||
| @@ -213,6 +213,7 @@ public class Delete extends MatchingTask { | |||
| * default) but also on other operating systems, for example when | |||
| * deleting directories from an NFS share.</p> | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.3 | |||
| */ | |||
| public void setPerformGcOnFailedDelete(boolean b) { | |||
| @@ -254,7 +255,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add a name entry on the include files list | |||
| * @return an NameEntry object to be configured | |||
| * @return a NameEntry object to be configured | |||
| */ | |||
| @Override | |||
| public PatternSet.NameEntry createIncludesFile() { | |||
| @@ -264,7 +265,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add a name entry on the exclude list | |||
| * @return an NameEntry object to be configured | |||
| * @return a NameEntry object to be configured | |||
| */ | |||
| @Override | |||
| public PatternSet.NameEntry createExclude() { | |||
| @@ -274,7 +275,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add a name entry on the include files list | |||
| * @return an NameEntry object to be configured | |||
| * @return a NameEntry object to be configured | |||
| */ | |||
| @Override | |||
| public PatternSet.NameEntry createExcludesFile() { | |||
| @@ -380,6 +381,7 @@ public class Delete extends MatchingTask { | |||
| * Sets whether the symbolic links that have not been followed | |||
| * shall be removed (the links, not the locations they point at). | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setRemoveNotFollowedSymlinks(boolean b) { | |||
| @@ -388,6 +390,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add a "Select" selector entry on the selector list | |||
| * | |||
| * @param selector the selector to be added | |||
| */ | |||
| @Override | |||
| @@ -398,6 +401,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add an "And" selector entry on the selector list | |||
| * | |||
| * @param selector the selector to be added | |||
| */ | |||
| @Override | |||
| @@ -408,6 +412,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add an "Or" selector entry on the selector list | |||
| * | |||
| * @param selector the selector to be added | |||
| */ | |||
| @Override | |||
| @@ -418,6 +423,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add a "Not" selector entry on the selector list | |||
| * | |||
| * @param selector the selector to be added | |||
| */ | |||
| @Override | |||
| @@ -428,6 +434,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add a "None" selector entry on the selector list | |||
| * | |||
| * @param selector the selector to be added | |||
| */ | |||
| @Override | |||
| @@ -438,6 +445,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add a majority selector entry on the selector list | |||
| * | |||
| * @param selector the selector to be added | |||
| */ | |||
| @Override | |||
| @@ -448,6 +456,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add a selector date entry on the selector list | |||
| * | |||
| * @param selector the selector to be added | |||
| */ | |||
| @Override | |||
| @@ -458,6 +467,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add a selector size entry on the selector list | |||
| * | |||
| * @param selector the selector to be added | |||
| */ | |||
| @Override | |||
| @@ -468,6 +478,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add a selector filename entry on the selector list | |||
| * | |||
| * @param selector the selector to be added | |||
| */ | |||
| @Override | |||
| @@ -478,6 +489,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add an extended selector entry on the selector list | |||
| * | |||
| * @param selector the selector to be added | |||
| */ | |||
| @Override | |||
| @@ -488,6 +500,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add a contains selector entry on the selector list | |||
| * | |||
| * @param selector the selector to be added | |||
| */ | |||
| @Override | |||
| @@ -498,6 +511,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add a present selector entry on the selector list | |||
| * | |||
| * @param selector the selector to be added | |||
| */ | |||
| @Override | |||
| @@ -508,6 +522,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add a depth selector entry on the selector list | |||
| * | |||
| * @param selector the selector to be added | |||
| */ | |||
| @Override | |||
| @@ -518,6 +533,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add a depends selector entry on the selector list | |||
| * | |||
| * @param selector the selector to be added | |||
| */ | |||
| @Override | |||
| @@ -528,6 +544,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add a regular expression selector entry on the selector list | |||
| * | |||
| * @param selector the selector to be added | |||
| */ | |||
| @Override | |||
| @@ -538,6 +555,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add the modified selector | |||
| * | |||
| * @param selector the selector to add | |||
| * @since ant 1.6 | |||
| */ | |||
| @@ -549,6 +567,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * add an arbitrary selector | |||
| * | |||
| * @param selector the selector to be added | |||
| * @since Ant 1.6 | |||
| */ | |||
| @@ -560,6 +579,7 @@ public class Delete extends MatchingTask { | |||
| /** | |||
| * Delete the file(s). | |||
| * | |||
| * @exception BuildException if an error occurs | |||
| */ | |||
| @Override | |||
| @@ -183,6 +183,7 @@ public class DependSet extends MatchingTask { | |||
| * | |||
| * <p>All deleted files will be logged as well.</p> | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setVerbose(boolean b) { | |||
| @@ -156,6 +156,7 @@ public class Echo extends Task { | |||
| * | |||
| * <p>Defaults to false</p> | |||
| * | |||
| * @param f boolean | |||
| * @since Ant 1.8.2 | |||
| */ | |||
| public void setForce(boolean f) { | |||
| @@ -58,8 +58,7 @@ public class EchoXML extends XMLFragment { | |||
| /** | |||
| * Set the namespace policy for the xml file | |||
| * @param n namespace policy: "ignore," "elementsOnly," or "all" | |||
| * @see | |||
| * org.apache.tools.ant.util.DOMElementWriter.XmlNamespacePolicy | |||
| * @see org.apache.tools.ant.util.DOMElementWriter.XmlNamespacePolicy | |||
| */ | |||
| public void setNamespacePolicy(NamespacePolicy n) { | |||
| namespacePolicy = n; | |||
| @@ -155,6 +155,7 @@ public class ExecTask extends Task { | |||
| /** | |||
| * List of operating systems on which the command may be executed. | |||
| * @return String | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public final String getOs() { | |||
| @@ -404,6 +405,7 @@ public class ExecTask extends Task { | |||
| /** | |||
| * Restrict this execution to a single OS Family | |||
| * @return the family to restrict to. | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public final String getOsFamily() { | |||
| @@ -627,14 +627,14 @@ public class Execute { | |||
| for (String osEnvItem : osEnv.keySet()) { | |||
| // Nb: using default locale as key is a env name | |||
| if (osEnvItem.equalsIgnoreCase(key)) { | |||
| // Use the original casiness of the key | |||
| // Use the original case of the key | |||
| key = osEnvItem; | |||
| break; | |||
| } | |||
| } | |||
| } | |||
| // Add the key to the enviromnent copy | |||
| // Add the key to the environment copy | |||
| osEnv.put(key, keyValue.substring(key.length() + 1)); | |||
| } | |||
| @@ -91,6 +91,7 @@ public class Expand extends Task { | |||
| /** | |||
| * Creates an Expand instance and sets the given encoding. | |||
| * | |||
| * @param encoding String | |||
| * @since Ant 1.9.5 | |||
| */ | |||
| protected Expand(String encoding) { | |||
| @@ -100,6 +101,7 @@ public class Expand extends Task { | |||
| /** | |||
| * Whether try ing to expand an empty archive would be an error. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setFailOnEmptyArchive(boolean b) { | |||
| @@ -109,6 +111,7 @@ public class Expand extends Task { | |||
| /** | |||
| * Whether try ing to expand an empty archive would be an error. | |||
| * | |||
| * @return boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public boolean getFailOnEmptyArchive() { | |||
| @@ -463,6 +466,7 @@ public class Expand extends Task { | |||
| * where the child-class doesn't (i.e. Unzip in the compress | |||
| * Antlib). | |||
| * | |||
| * @param encoding String | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| protected void internalSetEncoding(String encoding) { | |||
| @@ -473,6 +477,7 @@ public class Expand extends Task { | |||
| } | |||
| /** | |||
| * @return String | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public String getEncoding() { | |||
| @@ -482,6 +487,7 @@ public class Expand extends Task { | |||
| /** | |||
| * Whether leading path separators should be stripped. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setStripAbsolutePathSpec(boolean b) { | |||
| @@ -491,6 +497,7 @@ public class Expand extends Task { | |||
| /** | |||
| * Whether unicode extra fields will be used if present. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setScanForUnicodeExtraFields(boolean b) { | |||
| @@ -502,6 +509,7 @@ public class Expand extends Task { | |||
| * where the child-class doesn't (i.e. Unzip in the compress | |||
| * Antlib). | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| protected void internalSetScanForUnicodeExtraFields(boolean b) { | |||
| @@ -509,6 +517,7 @@ public class Expand extends Task { | |||
| } | |||
| /** | |||
| * @return boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public boolean getScanForUnicodeExtraFields() { | |||
| @@ -690,8 +690,8 @@ public class FixCRLF extends MatchingTask implements ChainableReader { | |||
| public static class CrLf extends EnumeratedAttribute { | |||
| /** | |||
| * @see EnumeratedAttribute#getValues | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| @Override | |||
| public String[] getValues() { | |||
| return new String[] { "asis", "cr", "lf", "crlf", "mac", "unix", | |||
| @@ -327,6 +327,7 @@ public class Get extends Task { | |||
| /** | |||
| * Adds URLs to get. | |||
| * @param rc ResourceCollection | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void add(final ResourceCollection rc) { | |||
| @@ -414,6 +415,7 @@ public class Get extends Task { | |||
| * The time in seconds the download is allowed to take before | |||
| * being terminated. | |||
| * | |||
| * @param maxTime long | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setMaxTime(final long maxTime) { | |||
| @@ -428,7 +430,6 @@ public class Get extends Task { | |||
| * reach the URI at all.</p> | |||
| * | |||
| * @param r number of attempts to make | |||
| * | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setRetries(final int r) { | |||
| @@ -444,7 +445,6 @@ public class Get extends Task { | |||
| * Skip files that already exist locally. | |||
| * | |||
| * @param s "true" to skip existing destination files | |||
| * | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setSkipExisting(final boolean s) { | |||
| @@ -457,6 +457,7 @@ public class Get extends Task { | |||
| * the value is considered unset and the behaviour falls | |||
| * back to the default of the http API. | |||
| * | |||
| * @param userAgent String | |||
| * @since Ant 1.9.3 | |||
| */ | |||
| public void setUserAgent(final String userAgent) { | |||
| @@ -471,6 +472,7 @@ public class Get extends Task { | |||
| * <p>Defaults to true (allow caching, which is also the | |||
| * HttpUrlConnection default value.</p> | |||
| * | |||
| * @param httpUseCache boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setHttpUseCaches(final boolean httpUseCache) { | |||
| @@ -484,6 +486,7 @@ public class Get extends Task { | |||
| * <p>Setting this to true also means Ant will uncompress | |||
| * <code>.tar.gz</code> and similar files automatically.</p> | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.9.5 | |||
| */ | |||
| public void setTryGzipEncoding(boolean b) { | |||
| @@ -894,7 +897,7 @@ public class Get extends Task { | |||
| /** | |||
| * Has the download completed successfully? | |||
| * | |||
| * <p>Re-throws any exception caught during executaion.</p> | |||
| * <p>Re-throws any exception caught during execution.</p> | |||
| */ | |||
| boolean wasSuccessful() throws IOException, BuildException { | |||
| if (ioexception != null) { | |||
| @@ -99,6 +99,7 @@ public class ImportTask extends Task { | |||
| /** | |||
| * The prefix to use when prefixing the imported target names. | |||
| * | |||
| * @param prefix String | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setAs(String prefix) { | |||
| @@ -109,6 +110,7 @@ public class ImportTask extends Task { | |||
| * The separator to use between prefix and target name, default is | |||
| * ".". | |||
| * | |||
| * @param s String | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setPrefixSeparator(String s) { | |||
| @@ -118,6 +120,7 @@ public class ImportTask extends Task { | |||
| /** | |||
| * The resource to import. | |||
| * | |||
| * @param r ResourceCollection | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void add(ResourceCollection r) { | |||
| @@ -314,6 +317,7 @@ public class ImportTask extends Task { | |||
| * overwritten in the importing build file. The depends list of | |||
| * the imported targets is not modified at all.</p> | |||
| * | |||
| * @return boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| protected final boolean isInIncludeMode() { | |||
| @@ -323,6 +327,9 @@ public class ImportTask extends Task { | |||
| /** | |||
| * Sets a bunch of Thread-local ProjectHelper properties. | |||
| * | |||
| * @param prefix String | |||
| * @param prefixSep String | |||
| * @param inIncludeMode boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| private static void setProjectHelperProps(String prefix, | |||
| @@ -245,6 +245,7 @@ public abstract class JDBCTask extends Task { | |||
| /** | |||
| * whether the task should cause the build to fail if it cannot | |||
| * connect to the database. | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setFailOnConnectionError(boolean b) { | |||
| @@ -313,6 +314,7 @@ public abstract class JDBCTask extends Task { | |||
| /** | |||
| * Additional properties to put into the JDBC connection string. | |||
| * | |||
| * @param var Property | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void addConnectionProperty(Property var) { | |||
| @@ -382,7 +384,7 @@ public abstract class JDBCTask extends Task { | |||
| * Gets an instance of the required driver. | |||
| * Uses the ant class loader and the optionally the provided classpath. | |||
| * @return Driver | |||
| * @throws BuildException | |||
| * @throws BuildException if something goes wrong | |||
| */ | |||
| private Driver getDriver() throws BuildException { | |||
| if (driver == null) { | |||
| @@ -153,7 +153,7 @@ public class Jar extends Zip { | |||
| // CheckStyle:LineLength OFF - Link is too long. | |||
| /** | |||
| * Strict mode for checking rules of the JAR-Specification. | |||
| * @see http://java.sun.com/j2se/1.3/docs/guide/versioning/spec/VersioningSpecification.html#PackageVersioning | |||
| * @see <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/versioning/spec/versioning2.html#wp89936"></a> | |||
| */ | |||
| private StrictMode strict = new StrictMode("ignore"); | |||
| @@ -441,6 +441,7 @@ public class Jar extends Zip { | |||
| /** | |||
| * Whether to merge Class-Path attributes. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setMergeClassPathAttributes(boolean b) { | |||
| @@ -451,6 +452,7 @@ public class Jar extends Zip { | |||
| * Whether to flatten multi-valued attributes (i.e. Class-Path) | |||
| * into a single one. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setFlattenAttributes(boolean b) { | |||
| @@ -978,7 +980,6 @@ public class Jar extends Zip { | |||
| * @param dirs a list of directories | |||
| * @param files a list of files | |||
| * @param writer the writer to write to | |||
| * @throws IOException on error | |||
| * @since Ant 1.6.2 | |||
| */ | |||
| protected final void writeIndexLikeList(List<String> dirs, List<String> files, | |||
| @@ -1079,6 +1079,7 @@ public class Javac extends MatchingTask { | |||
| * The classpath to use when loading the compiler implementation | |||
| * if it is not a built-in one. | |||
| * | |||
| * @return Path | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public Path createCompilerClasspath() { | |||
| @@ -1087,6 +1088,8 @@ public class Javac extends MatchingTask { | |||
| /** | |||
| * Set the compiler adapter explicitly. | |||
| * | |||
| * @param adapter CompilerAdapter | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void add(final CompilerAdapter adapter) { | |||
| @@ -1102,6 +1105,7 @@ public class Javac extends MatchingTask { | |||
| * matching package-info.java files that have been compiled but | |||
| * didn't create class files themselves. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.3 | |||
| */ | |||
| public void setCreateMissingPackageInfoClass(final boolean b) { | |||
| @@ -66,9 +66,9 @@ import org.apache.tools.ant.util.StringUtils; | |||
| * Generates Javadoc documentation for a collection | |||
| * of source code. | |||
| * | |||
| * <p>Current known limitations are: | |||
| * <p>Current known limitations are:</p> | |||
| * | |||
| * <p><ul> | |||
| * <ul> | |||
| * <li>patterns must be of the form "xxx.*", every other pattern doesn't | |||
| * work. | |||
| * <li>there is no control on arguments sanity since they are left | |||
| @@ -76,10 +76,10 @@ import org.apache.tools.ant.util.StringUtils; | |||
| * </ul> | |||
| * | |||
| * <p>If no <code>doclet</code> is set, then the <code>version</code> and | |||
| * <code>author</code> are by default <code>"yes"</code>. | |||
| * <code>author</code> are by default <code>"yes"</code>.</p> | |||
| * | |||
| * <p>Note: This task is run on another VM because the Javadoc code calls | |||
| * <code>System.exit()</code> which would break Ant functionality. | |||
| * <code>System.exit()</code> which would break Ant functionality.</p> | |||
| * | |||
| * @since Ant 1.1 | |||
| * | |||
| @@ -1666,6 +1666,7 @@ public class Javadoc extends Task { | |||
| /** | |||
| * Enables deep-copying of <code>doc-files</code> directories. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setDocFilesSubDirs(final boolean b) { | |||
| @@ -1676,6 +1677,7 @@ public class Javadoc extends Task { | |||
| * Colon-separated list of <code>doc-files</code> subdirectories | |||
| * to skip if {@link #setDocFilesSubDirs docFilesSubDirs is true}. | |||
| * | |||
| * @param s String | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setExcludeDocFilesSubDir(final String s) { | |||
| @@ -1684,6 +1686,8 @@ public class Javadoc extends Task { | |||
| /** | |||
| * Whether to post-process the generated javadocs in order to mitigate CVE-2013-1571. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.9.2 | |||
| */ | |||
| public void setPostProcessGeneratedJavadocs(final boolean b) { | |||
| @@ -147,6 +147,7 @@ public class LoadProperties extends Task { | |||
| * Whether to apply the prefix when expanding properties on the | |||
| * right hand side of a properties file as well. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.2 | |||
| */ | |||
| public void setPrefixValues(boolean b) { | |||
| @@ -28,7 +28,7 @@ import org.apache.tools.ant.util.LineOrientedOutputStream; | |||
| /** | |||
| * Logs each line written to this stream to the log system of ant. | |||
| * | |||
| * Tries to be smart about line separators.<br> | |||
| * <p>Tries to be smart about line separators.</p> | |||
| * | |||
| * @since Ant 1.2 | |||
| */ | |||
| @@ -274,7 +274,7 @@ public class MakeUrl extends Task { | |||
| /** | |||
| * convert a file to a URL; | |||
| * | |||
| * @param fileToConvert | |||
| * @param fileToConvert File | |||
| * @return the file converted to a URL | |||
| */ | |||
| private String toURL(File fileToConvert) { | |||
| @@ -44,8 +44,8 @@ import org.apache.tools.ant.util.FileUtils; | |||
| * Holds the data of a jar manifest. | |||
| * | |||
| * Manifests are processed according to the | |||
| * {@link <a href="http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html">Jar | |||
| * file specification.</a>}. | |||
| * <a href="http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html">Jar | |||
| * file specification</a>. | |||
| * Specifically, a manifest element consists of | |||
| * a set of attributes and sections. These sections in turn may contain | |||
| * attributes. Note in particular that this may result in manifest lines | |||
| @@ -198,6 +198,7 @@ public class ManifestTask extends Task { | |||
| /** | |||
| * Whether to merge Class-Path attributes. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setMergeClassPathAttributes(boolean b) { | |||
| @@ -208,6 +209,7 @@ public class ManifestTask extends Task { | |||
| * Whether to flatten multi-valued attributes (i.e. Class-Path) | |||
| * into a single one. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setFlattenAttributes(boolean b) { | |||
| @@ -155,7 +155,7 @@ public abstract class MatchingTask extends Task implements SelectorContainer { | |||
| /** | |||
| * List of filenames and directory names to not include. They should be | |||
| * either , or " " (space) separated. The ignored files will be logged. | |||
| * either comma or space separated. The ignored files will be logged. | |||
| * | |||
| * @param ignoreString the string containing the files to ignore. | |||
| */ | |||
| @@ -71,6 +71,7 @@ public class Move extends Copy { | |||
| * default) but also on other operating systems, for example when | |||
| * deleting directories from an NFS share.</p> | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.3 | |||
| */ | |||
| public void setPerformGcOnFailedDelete(boolean b) { | |||
| @@ -229,10 +230,10 @@ public class Move extends Copy { | |||
| /** | |||
| * Copy fromFile to toFile. | |||
| * @param fromFile | |||
| * @param toFile | |||
| * @param filtering | |||
| * @param overwrite | |||
| * @param fromFile File | |||
| * @param toFile File | |||
| * @param filtering boolean | |||
| * @param overwrite boolean | |||
| */ | |||
| private void copyFile(File fromFile, File toFile, boolean filtering, boolean overwrite) { | |||
| try { | |||
| @@ -150,7 +150,7 @@ public abstract class Pack extends Task { | |||
| * zip a stream to an output stream | |||
| * @param in the stream to zip | |||
| * @param zOut the output stream | |||
| * @throws IOException | |||
| * @throws IOException if something goes wrong | |||
| */ | |||
| private void zipFile(InputStream in, OutputStream zOut) | |||
| throws IOException { | |||
| @@ -293,6 +293,7 @@ public class Property extends Task { | |||
| * Whether to apply the prefix when expanding properties on the | |||
| * right hand side of a properties file as well. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.2 | |||
| */ | |||
| public void setPrefixValues(boolean b) { | |||
| @@ -303,6 +304,7 @@ public class Property extends Task { | |||
| * Whether to apply the prefix when expanding properties on the | |||
| * right hand side of a properties file as well. | |||
| * | |||
| * @return boolean | |||
| * @since Ant 1.8.2 | |||
| */ | |||
| public boolean getPrefixValues() { | |||
| @@ -360,10 +362,12 @@ public class Property extends Task { | |||
| * allow access of environment variables through "myenv.PATH" and | |||
| * "myenv.TERM". This functionality is currently only implemented | |||
| * on select platforms. Feel free to send patches to increase the number of platforms | |||
| * this functionality is supported on ;).<br> | |||
| * this functionality is supported on ;). | |||
| * </p> | |||
| * Note also that properties are case sensitive, even if the | |||
| * environment variables on your operating system are not, e.g. it | |||
| * will be ${env.Path} not ${env.PATH} on Windows 2000. | |||
| * | |||
| * @param env prefix | |||
| * | |||
| * @ant.attribute group="noname" | |||
| @@ -164,6 +164,7 @@ public class PumpStreamHandler implements ExecuteStreamHandler { | |||
| * ThreadWithPumper ThreadWithPumper} instance) or interrupting | |||
| * the thread. | |||
| * | |||
| * @param t Thread | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| protected final void finish(Thread t) { | |||
| @@ -180,8 +180,8 @@ public class Recorder extends Task implements SubBuildListener { | |||
| /** | |||
| * @see EnumeratedAttribute#getValues() | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| public String[] getValues() { | |||
| return VALUES; | |||
| } | |||
| @@ -321,4 +321,3 @@ public class Recorder extends Task implements SubBuildListener { | |||
| getProject().removeBuildListener(this); | |||
| } | |||
| } | |||
| @@ -91,16 +91,16 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { | |||
| /** | |||
| * @see org.apache.tools.ant.BuildListener#buildStarted(BuildEvent) | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| public void buildStarted(BuildEvent event) { | |||
| log("> BUILD STARTED", Project.MSG_DEBUG); | |||
| } | |||
| /** | |||
| * @see org.apache.tools.ant.BuildListener#buildFinished(BuildEvent) | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| public void buildFinished(BuildEvent event) { | |||
| log("< BUILD FINISHED", Project.MSG_DEBUG); | |||
| @@ -145,8 +145,8 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { | |||
| /** | |||
| * @see org.apache.tools.ant.BuildListener#targetStarted(BuildEvent) | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| public void targetStarted(BuildEvent event) { | |||
| log(">> TARGET STARTED -- " + event.getTarget(), Project.MSG_DEBUG); | |||
| log(StringUtils.LINE_SEP + event.getTarget().getName() + ":", | |||
| @@ -156,8 +156,8 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { | |||
| /** | |||
| * @see org.apache.tools.ant.BuildListener#targetFinished(BuildEvent) | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| public void targetFinished(BuildEvent event) { | |||
| log("<< TARGET FINISHED -- " + event.getTarget(), Project.MSG_DEBUG); | |||
| @@ -169,16 +169,16 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { | |||
| /** | |||
| * @see org.apache.tools.ant.BuildListener#taskStarted(BuildEvent) | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| public void taskStarted(BuildEvent event) { | |||
| log(">>> TASK STARTED -- " + event.getTask(), Project.MSG_DEBUG); | |||
| } | |||
| /** | |||
| * @see org.apache.tools.ant.BuildListener#taskFinished(BuildEvent) | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| public void taskFinished(BuildEvent event) { | |||
| log("<<< TASK FINISHED -- " + event.getTask(), Project.MSG_DEBUG); | |||
| flush(); | |||
| @@ -186,8 +186,8 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { | |||
| /** | |||
| * @see org.apache.tools.ant.BuildListener#messageLogged(BuildEvent) | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| public void messageLogged(BuildEvent event) { | |||
| log("--- MESSAGE LOGGED", Project.MSG_DEBUG); | |||
| @@ -232,8 +232,8 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { | |||
| /** | |||
| * @see BuildLogger#setMessageOutputLevel(int) | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| public void setMessageOutputLevel(int level) { | |||
| if (level >= Project.MSG_ERR && level <= Project.MSG_DEBUG) { | |||
| loglevel = level; | |||
| @@ -242,8 +242,8 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { | |||
| /** | |||
| * @see BuildLogger#setOutputPrintStream(PrintStream) | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| public void setOutputPrintStream(PrintStream output) { | |||
| closeFile(); | |||
| out = output; | |||
| @@ -252,8 +252,8 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { | |||
| /** | |||
| * @see BuildLogger#setEmacsMode(boolean) | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| public void setEmacsMode(boolean emacsMode) { | |||
| this.emacsMode = emacsMode; | |||
| } | |||
| @@ -261,8 +261,8 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { | |||
| /** | |||
| * @see BuildLogger#setErrorPrintStream(PrintStream) | |||
| * {@inheritDoc}. | |||
| */ | |||
| /** {@inheritDoc}. */ | |||
| public void setErrorPrintStream(PrintStream err) { | |||
| setOutputPrintStream(err); | |||
| } | |||
| @@ -303,6 +303,7 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { | |||
| /** | |||
| * Get the project associated with this recorder entry. | |||
| * | |||
| * @return Project | |||
| * @since 1.8.0 | |||
| */ | |||
| public Project getProject() { | |||
| @@ -325,7 +326,7 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { | |||
| * Used by Recorder. | |||
| * @param append Indicates if output must be appended to the logfile or that | |||
| * the logfile should be overwritten. | |||
| * @throws BuildException | |||
| * @throws BuildException if something goes wrong | |||
| * @since 1.6.3 | |||
| */ | |||
| void openFile(boolean append) throws BuildException { | |||
| @@ -347,7 +348,7 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { | |||
| /** | |||
| * Re-opens the file associated with this recorder. | |||
| * Used by Recorder. | |||
| * @throws BuildException | |||
| * @throws BuildException if something goes wrong | |||
| * @since 1.6.3 | |||
| */ | |||
| void reopenFile() throws BuildException { | |||
| @@ -534,6 +534,8 @@ public class Redirector { | |||
| * <p>Binary output will not be split into lines which may make | |||
| * error and normal output look mixed up when they get written to | |||
| * the same stream.</p> | |||
| * | |||
| * @param b boolean | |||
| * @since 1.9.4 | |||
| */ | |||
| public void setBinaryOutput(final boolean b) { | |||
| @@ -102,6 +102,7 @@ public class Replace extends MatchingTask { | |||
| * expanded already so you do <b>not</b> want to set this to | |||
| * true.</p> | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setExpandProperties(boolean b) { | |||
| @@ -286,7 +287,7 @@ public class Replace extends MatchingTask { | |||
| * The filter expects from the component providing the input that data | |||
| * is only added by that component to the end of this StringBuffer. | |||
| * This StringBuffer will be modified by this filter, and expects that | |||
| * another component will only apped to this StringBuffer. | |||
| * another component will only added to this StringBuffer. | |||
| * @param input The input for this filter. | |||
| */ | |||
| void setInputBuffer(StringBuffer input) { | |||
| @@ -873,6 +874,7 @@ public class Replace extends MatchingTask { | |||
| /** | |||
| * Support arbitrary file system based resource collections. | |||
| * | |||
| * @param rc ResourceCollection | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void addConfigured(ResourceCollection rc) { | |||
| @@ -889,6 +891,7 @@ public class Replace extends MatchingTask { | |||
| * Whether the file timestamp shall be preserved even if the file | |||
| * is modified. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setPreserveLastModified(boolean b) { | |||
| @@ -898,6 +901,7 @@ public class Replace extends MatchingTask { | |||
| /** | |||
| * Whether the build should fail if nothing has been replaced. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setFailOnNoReplacements(boolean b) { | |||
| @@ -917,6 +921,10 @@ public class Replace extends MatchingTask { | |||
| /** | |||
| * Replace occurrences of str1 in StringBuffer str with str2. | |||
| * | |||
| * @param str StringBuilder | |||
| * @param str1 String | |||
| * @param str2 String | |||
| */ | |||
| private void stringReplace(StringBuilder str, String str1, String str2) { | |||
| int found = str.indexOf(str1); | |||
| @@ -931,6 +939,8 @@ public class Replace extends MatchingTask { | |||
| /** | |||
| * Sort keys by size so that tokens that are substrings of other | |||
| * strings are tried later. | |||
| * | |||
| * @param props Properties | |||
| */ | |||
| private Iterator<Object> getOrderedIterator(Properties props) { | |||
| List<Object> keys = new ArrayList<>(props.keySet()); | |||
| @@ -73,11 +73,11 @@ import org.apache.tools.ant.util.facade.FacadeTaskHelper; | |||
| * <ul> | |||
| * <li>sun (the standard compiler of the JDK)</li> | |||
| * <li>kaffe (the standard compiler of | |||
| * {@link <a href="http://www.kaffe.org">Kaffe</a>})</li> | |||
| * <a href="http://www.kaffe.org">Kaffe</a>)</li> | |||
| * <li>weblogic</li> | |||
| * </ul> | |||
| * | |||
| * <p> The <a href="http://dione.zcu.cz/~toman40/miniRMI/">miniRMI</a> | |||
| * <p>The <a href="http://dione.zcu.cz/~toman40/miniRMI/">miniRMI</a> | |||
| * project contains a compiler implementation for this task as well, | |||
| * please consult miniRMI's documentation to learn how to use it.</p> | |||
| * | |||
| @@ -536,6 +536,7 @@ public class Rmic extends MatchingTask { | |||
| /** | |||
| * Name of the executable to use when forking. | |||
| * | |||
| * @param ex String | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setExecutable(String ex) { | |||
| @@ -546,6 +547,7 @@ public class Rmic extends MatchingTask { | |||
| * Explicitly specified name of the executable to use when forking | |||
| * - if any. | |||
| * | |||
| * @return String | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public String getExecutable() { | |||
| @@ -556,6 +558,7 @@ public class Rmic extends MatchingTask { | |||
| * The classpath to use when loading the compiler implementation | |||
| * if it is not a built-in one. | |||
| * | |||
| * @return Path | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public Path createCompilerClasspath() { | |||
| @@ -564,6 +567,7 @@ public class Rmic extends MatchingTask { | |||
| /** | |||
| * If true, list the source files being handed off to the compiler. | |||
| * | |||
| * @param list if true list the source files | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| @@ -573,6 +577,8 @@ public class Rmic extends MatchingTask { | |||
| /** | |||
| * Set the compiler adapter explicitly. | |||
| * | |||
| * @param adapter RmicAdapter | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void add(RmicAdapter adapter) { | |||
| @@ -500,6 +500,8 @@ public class SQLExec extends JDBCTask { | |||
| * If false, delimiters will be searched for in a case-insensitive | |||
| * manner (i.e. delimiter="go" matches "GO") and surrounding | |||
| * whitespace will be ignored (delimiter="go" matches "GO "). | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setStrictDelimiterMatching(boolean b) { | |||
| @@ -508,6 +510,8 @@ public class SQLExec extends JDBCTask { | |||
| /** | |||
| * whether to show SQLWarnings as WARN messages. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setShowWarnings(boolean b) { | |||
| @@ -516,6 +520,8 @@ public class SQLExec extends JDBCTask { | |||
| /** | |||
| * Whether a warning is an error - in which case onError applies. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setTreatWarningsAsErrors(boolean b) { | |||
| @@ -527,6 +533,7 @@ public class SQLExec extends JDBCTask { | |||
| * | |||
| * <p>Defaults to ","</p> | |||
| * | |||
| * @param s String | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setCsvColumnSeparator(String s) { | |||
| @@ -549,6 +556,7 @@ public class SQLExec extends JDBCTask { | |||
| * | |||
| * <p>Defaults to "not set"</p> | |||
| * | |||
| * @param s String | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setCsvQuoteCharacter(String s) { | |||
| @@ -584,6 +592,7 @@ public class SQLExec extends JDBCTask { | |||
| /** | |||
| * Sets a given property to the number of rows in the first | |||
| * statement that returned a row count. | |||
| * @param rowCountProperty String | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setRowCountProperty(String rowCountProperty) { | |||
| @@ -592,6 +601,7 @@ public class SQLExec extends JDBCTask { | |||
| /** | |||
| * Force the csv quote character | |||
| * @param forceCsvQuoteChar boolean | |||
| */ | |||
| public void setForceCsvQuoteChar(boolean forceCsvQuoteChar) { | |||
| this.forceCsvQuoteChar = forceCsvQuoteChar; | |||
| @@ -957,6 +967,9 @@ public class SQLExec extends JDBCTask { | |||
| * instances, should override this method but keep in mind that | |||
| * this class expects to get the same connection instance on | |||
| * consecutive calls.</p> | |||
| * | |||
| * @return Statement | |||
| * @throws SQLException if statement creation or processing fails | |||
| */ | |||
| protected Statement getStatement() throws SQLException { | |||
| if (statement == null) { | |||
| @@ -45,9 +45,8 @@ public class Sequential extends Task implements TaskContainer { | |||
| /** | |||
| * Add a nested task to Sequential. | |||
| * <p> | |||
| * | |||
| * @param nestedTask Nested task to execute Sequential | |||
| * <p> | |||
| */ | |||
| @Override | |||
| public void addTask(Task nestedTask) { | |||
| @@ -321,6 +321,7 @@ public class SignJar extends AbstractJarSignerTask { | |||
| /** | |||
| * Whether to force signing of a jar even it is already signed. | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setForce(boolean b) { | |||
| @@ -330,6 +331,7 @@ public class SignJar extends AbstractJarSignerTask { | |||
| /** | |||
| * Should the task force signing of a jar even it is already | |||
| * signed? | |||
| * @return boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public boolean isForce() { | |||
| @@ -347,6 +349,8 @@ public class SignJar extends AbstractJarSignerTask { | |||
| /** | |||
| * Signature Algorithm; optional | |||
| * | |||
| * @return String | |||
| */ | |||
| public String getSigAlg() { | |||
| return sigAlg; | |||
| @@ -363,6 +367,8 @@ public class SignJar extends AbstractJarSignerTask { | |||
| /** | |||
| * Digest Algorithm; optional | |||
| * | |||
| * @return String | |||
| */ | |||
| public String getDigestAlg() { | |||
| return digestAlg; | |||
| @@ -380,6 +386,8 @@ public class SignJar extends AbstractJarSignerTask { | |||
| /** | |||
| * TSA Digest Algorithm; optional | |||
| * | |||
| * @return String | |||
| * @since Ant 1.10.2 | |||
| */ | |||
| public String getTSADigestAlg() { | |||
| @@ -478,7 +486,7 @@ public class SignJar extends AbstractJarSignerTask { | |||
| * | |||
| * @param jarSource source to sign | |||
| * @param jarTarget target; may be null | |||
| * @throws BuildException | |||
| * @throws BuildException if something goes wrong | |||
| */ | |||
| private void signOneJar(File jarSource, File jarTarget) | |||
| throws BuildException { | |||
| @@ -39,8 +39,8 @@ import org.apache.tools.ant.util.StringUtils; | |||
| /** | |||
| * Calls a given target for all defined sub-builds. This is an extension | |||
| * of ant for bulk project execution. | |||
| * <p> | |||
| * <h2> Use with directories </h2> | |||
| * | |||
| * <h2>Use with directories</h2> | |||
| * <p> | |||
| * subant can be used with directory sets to execute a build from different directories. | |||
| * 2 different options are offered | |||
| @@ -82,8 +82,9 @@ public class SubAnt extends Task { | |||
| /** | |||
| * Get the default build file name to use when launching the task. | |||
| * <p> | |||
| * This function may be overrided by providers of custom ProjectHelper so they can implement easily their sub | |||
| * launcher. | |||
| * This function may be overriden by providers of custom ProjectHelper so | |||
| * they can implement easily their sub launcher. | |||
| * </p> | |||
| * | |||
| * @return the name of the default file | |||
| * @since Ant 1.8.0 | |||
| @@ -376,10 +377,10 @@ public class SubAnt extends Task { | |||
| /** | |||
| * The target to call on the different sub-builds. Set to "" to execute | |||
| * the default target. | |||
| * | |||
| * @param target the target | |||
| * <p> | |||
| */ | |||
| // REVISIT: Defaults to the target name that contains this task if not specified. | |||
| // REVISIT: Defaults to the target name that contains this task if not specified. | |||
| public void setTarget(String target) { | |||
| this.subTarget = target; | |||
| } | |||
| @@ -470,6 +471,7 @@ public class SubAnt extends Task { | |||
| * <em>Note that the directories will be added to the build path | |||
| * in no particular order, so if order is significant, one should | |||
| * use a file list instead!</em> | |||
| * </p> | |||
| * | |||
| * @param set the directory set to add. | |||
| */ | |||
| @@ -483,6 +485,7 @@ public class SubAnt extends Task { | |||
| * <em>Note that the directories will be added to the build path | |||
| * in no particular order, so if order is significant, one should | |||
| * use a file list instead!</em> | |||
| * </p> | |||
| * | |||
| * @param set the file set to add. | |||
| */ | |||
| @@ -495,6 +498,7 @@ public class SubAnt extends Task { | |||
| * <p> | |||
| * <em>Note that contrary to file and directory sets, file lists | |||
| * can reference non-existent files or directories!</em> | |||
| * </p> | |||
| * | |||
| * @param list the file list to add. | |||
| */ | |||
| @@ -632,4 +636,4 @@ public class SubAnt extends Task { | |||
| } | |||
| } | |||
| } // END class SubAnt | |||
| } | |||
| @@ -177,7 +177,7 @@ public class Sync extends Task { | |||
| * <p>If the directory is an orphan, it will also be removed.</p> | |||
| * | |||
| * @param nonOrphans the table of all non-orphan <code>File</code>s. | |||
| * @param file the initial file or directory to scan or test. | |||
| * @param toDir the initial file or directory to scan or test. | |||
| * @param preservedDirectories will be filled with the directories | |||
| * matched by preserveInTarget - if any. Will not be | |||
| * filled unless preserveEmptyDirs and includeEmptyDirs | |||
| @@ -459,8 +459,8 @@ public class Sync extends Task { | |||
| /** | |||
| * @see Copy#scan(File, File, String[], String[]) | |||
| * {@inheritDoc} | |||
| */ | |||
| /** {@inheritDoc} */ | |||
| @Override | |||
| protected void scan(File fromDir, File toDir, String[] files, | |||
| String[] dirs) { | |||
| @@ -474,8 +474,8 @@ public class Sync extends Task { | |||
| /** | |||
| * @see Copy#scan(Resource[], File) | |||
| * {@inheritDoc} | |||
| */ | |||
| /** {@inheritDoc} */ | |||
| @Override | |||
| protected Map<Resource, String[]> scan(Resource[] resources, File toDir) { | |||
| assertTrue("No mapper", mapperElement == null); | |||
| @@ -549,6 +549,7 @@ public class Sync extends Task { | |||
| * Whether empty directories matched by this fileset should be | |||
| * preserved. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setPreserveEmptyDirs(boolean b) { | |||
| @@ -559,6 +560,7 @@ public class Sync extends Task { | |||
| * Whether empty directories matched by this fileset should be | |||
| * preserved. | |||
| * | |||
| * @return Boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public Boolean getPreserveEmptyDirs() { | |||
| @@ -102,7 +102,7 @@ public class TempFile extends Task { | |||
| /** | |||
| * Sets the optional suffix string for the temp file. | |||
| * | |||
| * @param suffix suffix including any "." , e.g ".xml" | |||
| * @param suffix suffix including any ".", e.g ".xml" | |||
| */ | |||
| public void setSuffix(String suffix) { | |||
| this.suffix = suffix; | |||
| @@ -113,6 +113,8 @@ public class Tstamp extends Task { | |||
| /** | |||
| * Return the {@link Date} instance to use as base for DSTAMP, TSTAMP and TODAY. | |||
| * | |||
| * @return Date | |||
| */ | |||
| protected Date getNow() { | |||
| Optional<Date> now = getNow( | |||
| @@ -139,9 +141,9 @@ public class Tstamp extends Task { | |||
| /** | |||
| * Checks and returns a Date if the specified property is set. | |||
| * @param propertyName name of the property to check | |||
| * @param map convertion of the property value as string to Date | |||
| * @param log supplier of the log message containg the property name and value if | |||
| * the convertion fails | |||
| * @param map conversion of the property value as string to Date | |||
| * @param log supplier of the log message containing the property name and value if | |||
| * the conversion fails | |||
| * @return Optional containing the Date or null | |||
| */ | |||
| protected Optional<Date> getNow(String propertyName, Function<String, Date> map, BiFunction<String, String, String> log) { | |||
| @@ -94,8 +94,8 @@ public class Untar extends Expand { | |||
| /** | |||
| * @see Expand#expandFile(FileUtils, File, File) | |||
| * {@inheritDoc} | |||
| */ | |||
| /** {@inheritDoc} */ | |||
| @Override | |||
| protected void expandFile(FileUtils fileUtils, File srcF, File dir) { | |||
| if (!srcF.exists()) { | |||
| @@ -250,7 +250,7 @@ public class Untar extends Expand { | |||
| clazz.getConstructor(InputStream.class); | |||
| return c.newInstance(istream); | |||
| } catch (ClassNotFoundException ex) { | |||
| throw new BuildException("xz uncompression requires the XZ for Java library", | |||
| throw new BuildException("xz decompression requires the XZ for Java library", | |||
| ex); | |||
| } catch (NoSuchMethodException | |||
| | InstantiationException | |||
| @@ -263,8 +263,8 @@ public class WaitFor extends ConditionBase { | |||
| /** | |||
| * @see EnumeratedAttribute#getValues() | |||
| * {@inheritDoc} | |||
| */ | |||
| /** {@inheritDoc} */ | |||
| @Override | |||
| public String[] getValues() { | |||
| return UNITS; | |||
| @@ -66,4 +66,4 @@ public interface XSLTLiaison { | |||
| */ | |||
| void transform(File infile, File outfile) throws Exception; //NOSONAR | |||
| } //-- XSLTLiaison | |||
| } | |||
| @@ -26,7 +26,7 @@ package org.apache.tools.ant.taskdefs; | |||
| */ | |||
| public interface XSLTLiaison2 extends XSLTLiaison { | |||
| /** | |||
| * Configure the liaision from the XSLTProcess task | |||
| * Configure the liaison from the XSLTProcess task | |||
| * @param xsltTask the XSLTProcess task | |||
| */ | |||
| void configure(XSLTProcess xsltTask); | |||
| @@ -592,6 +592,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * Whether to suppress warning messages of the processor. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setSuppressWarnings(final boolean b) { | |||
| @@ -601,6 +602,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * Whether to suppress warning messages of the processor. | |||
| * | |||
| * @return boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public boolean getSuppressWarnings() { | |||
| @@ -610,6 +612,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * Whether transformation errors should make the build fail. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setFailOnTransformationError(final boolean b) { | |||
| @@ -619,6 +622,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * Whether any errors should make the build fail. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setFailOnError(final boolean b) { | |||
| @@ -628,6 +632,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * Whether the build should fail if the nested resource collection is empty. | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setFailOnNoResources(final boolean b) { | |||
| @@ -637,6 +642,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * A system property to set during transformation. | |||
| * | |||
| * @param sysp Environment.Variable | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void addSysproperty(final Environment.Variable sysp) { | |||
| @@ -646,6 +652,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * A set of system properties to set during transformation. | |||
| * | |||
| * @param sysp PropertySet | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void addSyspropertyset(final PropertySet sysp) { | |||
| @@ -659,6 +666,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| * processor other than trax or if the Transformer is not Xalan2's | |||
| * transformer implementation.</p> | |||
| * | |||
| * @return TraceConfiguration | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public TraceConfiguration createTrace() { | |||
| @@ -672,6 +680,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * Configuration for Xalan2 traces. | |||
| * | |||
| * @return TraceConfiguration | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public TraceConfiguration getTraceConfiguration() { | |||
| @@ -703,7 +712,6 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| * As a side effect, the loader is set as the thread context classloader | |||
| * @param classname the name of the class to load. | |||
| * @return the requested class. | |||
| * @exception Exception if the class could not be loaded. | |||
| */ | |||
| private Class<?> loadClass(final String classname) throws ClassNotFoundException { | |||
| setupLoader(); | |||
| @@ -737,7 +745,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * specifies a single XML document to be styled. Should be used | |||
| * with the <tt>out</tt> attribute; ; required if <tt>out</tt> is set | |||
| * with the <tt>out</tt> attribute; required if <tt>out</tt> is set | |||
| * | |||
| * @param inFile the input file | |||
| */ | |||
| @@ -1001,6 +1009,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| } | |||
| /** | |||
| * @param type String | |||
| * @see ParamType | |||
| * @since Ant 1.9.3 | |||
| */ | |||
| @@ -1036,6 +1045,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| } | |||
| /** | |||
| * @return String | |||
| * @see ParamType | |||
| * @since Ant 1.9.3 | |||
| */ | |||
| @@ -1387,6 +1397,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| * Throws an exception with the given message if failOnError is | |||
| * true, otherwise logs the message using the WARN level. | |||
| * | |||
| * @param msg String | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| protected void handleError(final String msg) { | |||
| @@ -1402,6 +1413,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| * failOnError is true, otherwise logs the message using the WARN | |||
| * level. | |||
| * | |||
| * @param ex Throwable | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| protected void handleError(final Throwable ex) { | |||
| @@ -1416,6 +1428,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| * failOnError and failOnTransformationError are true, otherwise | |||
| * logs the message using the WARN level. | |||
| * | |||
| * @param ex Exception | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| protected void handleTransformationError(final Exception ex) { | |||
| @@ -1488,6 +1501,8 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * The configured features. | |||
| * @since Ant 1.9.8 | |||
| * | |||
| * @return Iterable<Feature> | |||
| */ | |||
| public Iterable<Feature> getFeatures() { | |||
| return features; | |||
| @@ -1659,6 +1674,8 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * Set to true if the listener is to print events that occur | |||
| * as each node is 'executed' in the stylesheet. | |||
| * | |||
| * @param b boolean | |||
| */ | |||
| public void setElements(final boolean b) { | |||
| elements = b; | |||
| @@ -1667,6 +1684,8 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * True if the listener is to print events that occur as each | |||
| * node is 'executed' in the stylesheet. | |||
| * | |||
| * @return boolean | |||
| */ | |||
| public boolean getElements() { | |||
| return elements; | |||
| @@ -1675,6 +1694,8 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * Set to true if the listener is to print information after | |||
| * each extension event. | |||
| * | |||
| * @param b boolean | |||
| */ | |||
| public void setExtension(final boolean b) { | |||
| extension = b; | |||
| @@ -1683,6 +1704,8 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * True if the listener is to print information after each | |||
| * extension event. | |||
| * | |||
| * @return boolean | |||
| */ | |||
| public boolean getExtension() { | |||
| return extension; | |||
| @@ -1691,6 +1714,8 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * Set to true if the listener is to print information after | |||
| * each result-tree generation event. | |||
| * | |||
| * @param b boolean | |||
| */ | |||
| public void setGeneration(final boolean b) { | |||
| generation = b; | |||
| @@ -1699,6 +1724,8 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * True if the listener is to print information after each | |||
| * result-tree generation event. | |||
| * | |||
| * @return boolean | |||
| */ | |||
| public boolean getGeneration() { | |||
| return generation; | |||
| @@ -1707,6 +1734,8 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * Set to true if the listener is to print information after | |||
| * each selection event. | |||
| * | |||
| * @param b boolean | |||
| */ | |||
| public void setSelection(final boolean b) { | |||
| selection = b; | |||
| @@ -1715,6 +1744,8 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * True if the listener is to print information after each | |||
| * selection event. | |||
| * | |||
| * @return boolean | |||
| */ | |||
| public boolean getSelection() { | |||
| return selection; | |||
| @@ -1723,6 +1754,8 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * Set to true if the listener is to print an event whenever a | |||
| * template is invoked. | |||
| * | |||
| * @param b boolean | |||
| */ | |||
| public void setTemplates(final boolean b) { | |||
| templates = b; | |||
| @@ -1731,6 +1764,8 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * True if the listener is to print an event whenever a | |||
| * template is invoked. | |||
| * | |||
| * @return boolean | |||
| */ | |||
| public boolean getTemplates() { | |||
| return templates; | |||
| @@ -1738,6 +1773,8 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| /** | |||
| * The stream to write traces to. | |||
| * | |||
| * @return OutputStream | |||
| */ | |||
| public OutputStream getOutputStream() { | |||
| return new LogOutputStream(XSLTProcess.this); | |||
| @@ -142,7 +142,7 @@ import org.xml.sax.SAXException; | |||
| * </classpath> | |||
| * </pre> | |||
| * | |||
| * <p> This task <i>requires</i> the following attributes:</p> | |||
| * <p>This task <i>requires</i> the following attributes:</p> | |||
| * | |||
| * <ul> | |||
| * <li><b>file</b>: The name of the file to load.</li> | |||
| @@ -722,10 +722,14 @@ public class XmlProperty extends org.apache.tools.ant.Task { | |||
| return this.rootDirectory; | |||
| } | |||
| @Deprecated | |||
| protected boolean getIncludeSementicAttribute() { | |||
| return getIncludeSemanticAttribute(); | |||
| } | |||
| /** | |||
| * @return the include semantic attribute. | |||
| */ | |||
| protected boolean getIncludeSementicAttribute () { | |||
| protected boolean getIncludeSemanticAttribute() { | |||
| return this.includeSemanticAttribute; | |||
| } | |||
| @@ -496,6 +496,7 @@ public class Zip extends MatchingTask { | |||
| /** | |||
| * Assume 0 Unix mode is intentional. | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setPreserve0Permissions(final boolean b) { | |||
| @@ -504,6 +505,7 @@ public class Zip extends MatchingTask { | |||
| /** | |||
| * Assume 0 Unix mode is intentional. | |||
| * @return boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public boolean getPreserve0Permissions() { | |||
| @@ -512,6 +514,7 @@ public class Zip extends MatchingTask { | |||
| /** | |||
| * Whether to set the language encoding flag. | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setUseLanguageEncodingFlag(final boolean b) { | |||
| @@ -520,6 +523,7 @@ public class Zip extends MatchingTask { | |||
| /** | |||
| * Whether the language encoding flag will be used. | |||
| * @return boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public boolean getUseLanguageEnodingFlag() { | |||
| @@ -528,6 +532,7 @@ public class Zip extends MatchingTask { | |||
| /** | |||
| * Whether Unicode extra fields will be created. | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setCreateUnicodeExtraFields(final UnicodeExtraField b) { | |||
| @@ -536,6 +541,7 @@ public class Zip extends MatchingTask { | |||
| /** | |||
| * Whether Unicode extra fields will be created. | |||
| * @return boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public UnicodeExtraField getCreateUnicodeExtraFields() { | |||
| @@ -548,6 +554,7 @@ public class Zip extends MatchingTask { | |||
| * | |||
| * <p>Defaults to false.</p> | |||
| * | |||
| * @param b boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setFallBackToUTF8(final boolean b) { | |||
| @@ -558,6 +565,7 @@ public class Zip extends MatchingTask { | |||
| * Whether to fall back to UTF-8 if a name cannot be encoded using | |||
| * the specified encoding. | |||
| * | |||
| * @return boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public boolean getFallBackToUTF8() { | |||
| @@ -566,6 +574,7 @@ public class Zip extends MatchingTask { | |||
| /** | |||
| * Whether Zip64 extensions should be used. | |||
| * @param b boolean | |||
| * @since Ant 1.9.1 | |||
| */ | |||
| public void setZip64Mode(final Zip64ModeAttribute b) { | |||
| @@ -574,6 +583,7 @@ public class Zip extends MatchingTask { | |||
| /** | |||
| * Whether Zip64 extensions will be used. | |||
| * @return boolean | |||
| * @since Ant 1.9.1 | |||
| */ | |||
| public Zip64ModeAttribute getZip64Mode() { | |||
| @@ -597,6 +607,7 @@ public class Zip extends MatchingTask { | |||
| /** | |||
| * The file modification time previously provided to | |||
| * {@link #setModificationtime(String)} or {@code null} if unset. | |||
| * @return String | |||
| * @since Ant 1.10.2 | |||
| */ | |||
| public String getModificationtime() { | |||
| @@ -1638,7 +1649,7 @@ public class Zip extends MatchingTask { | |||
| /** | |||
| * Add a directory to the zip stream. | |||
| * @param dir the directort to add to the archive | |||
| * @param dir the directory to add to the archive | |||
| * @param zOut the stream to write to | |||
| * @param vPath the name this entry shall have in the archive | |||
| * @param mode the Unix permissions to set. | |||
| @@ -1733,6 +1744,7 @@ public class Zip extends MatchingTask { | |||
| /** | |||
| * Provides the extra fields for the zip entry currently being | |||
| * added to the archive - if any. | |||
| * @return ZipExtraField[] | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| protected final ZipExtraField[] getCurrentExtraFields() { | |||
| @@ -1742,6 +1754,7 @@ public class Zip extends MatchingTask { | |||
| /** | |||
| * Sets the extra fields for the zip entry currently being | |||
| * added to the archive - if any. | |||
| * @param extra ZipExtraField[] | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| protected final void setCurrentExtraFields(final ZipExtraField[] extra) { | |||
| @@ -2049,6 +2062,7 @@ public class Zip extends MatchingTask { | |||
| /** | |||
| * Drops all resources from the given array that are not selected | |||
| * @param orig the resources to filter | |||
| * @param selector ResourceSelector | |||
| * @return the filters resources | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| @@ -2066,6 +2080,8 @@ public class Zip extends MatchingTask { | |||
| * Logs a message at the given output level, but only if this is | |||
| * the pass that will actually create the archive. | |||
| * | |||
| * @param msg String | |||
| * @param level int | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| protected void logWhenWriting(final String msg, final int level) { | |||
| @@ -2081,8 +2097,8 @@ public class Zip extends MatchingTask { | |||
| public static class Duplicate extends EnumeratedAttribute { | |||
| /** | |||
| * @see EnumeratedAttribute#getValues() | |||
| * {@inheritDoc} | |||
| */ | |||
| /** {@inheritDoc} */ | |||
| @Override | |||
| public String[] getValues() { | |||
| return new String[] { "add", "preserve", "fail" }; | |||
| @@ -2138,7 +2154,7 @@ public class Zip extends MatchingTask { | |||
| } | |||
| /** | |||
| * Policiy for creation of Unicode extra fields: never, always or | |||
| * Policy for creation of Unicode extra fields: never, always or | |||
| * not-encodeable. | |||
| * | |||
| * @since Ant 1.8.0 | |||
| @@ -301,7 +301,7 @@ public abstract class DefaultCompilerAdapter | |||
| cmd.createArgument().setValue("-classpath"); | |||
| // Just add "sourcepath" to classpath ( for JDK1.1 ) | |||
| // Just add "sourcepath" to classpath (for JDK1.1) | |||
| // as well as "bootclasspath" and "extdirs" | |||
| if (assumeJava11()) { | |||
| final Path cp = new Path(project); | |||
| @@ -67,9 +67,9 @@ public class JavacExternal extends DefaultCompilerAdapter { | |||
| /** | |||
| * helper method to execute our command on VMS. | |||
| * @param cmd | |||
| * @param firstFileName | |||
| * @return | |||
| * @param cmd Commandline | |||
| * @param firstFileName int | |||
| * @return boolean | |||
| */ | |||
| private boolean execOnVMS(Commandline cmd, int firstFileName) { | |||
| File vmsFile = null; | |||
| @@ -68,7 +68,7 @@ public class Http extends ProjectComponent implements Condition { | |||
| * | |||
| * @param method The HTTP request method to use. Valid values are | |||
| * the same as those accepted by the | |||
| * HttpURLConnection.setRequestMetho d() method, | |||
| * HttpURLConnection.setRequestMethod() method, | |||
| * such as "GET", "HEAD", "TRACE", etc. The default | |||
| * if not specified is "GET". | |||
| * | |||
| @@ -83,6 +83,8 @@ public class Http extends ProjectComponent implements Condition { | |||
| /** | |||
| * Whether redirects sent by the server should be followed, | |||
| * defaults to true. | |||
| * | |||
| * @param f boolean | |||
| * @since Ant 1.9.7 | |||
| */ | |||
| public void setFollowRedirects(boolean f) { | |||
| @@ -151,8 +151,8 @@ public class IsLastModified extends ProjectComponent implements Condition { | |||
| /** | |||
| * evaluate the condition | |||
| * @return true or false depending on the compoarison mode and the time of the resource | |||
| * @throws BuildException | |||
| * @return true or false depending on the comparison mode and the time of the resource | |||
| * @throws BuildException if something goes wrong | |||
| */ | |||
| @Override | |||
| public boolean eval() throws BuildException { | |||
| @@ -185,7 +185,7 @@ public class IsReachable extends ProjectComponent implements Condition { | |||
| //utterly implausible, but catered for anyway | |||
| throw new BuildException("When calling " + reachableMethod); | |||
| } catch (final InvocationTargetException e) { | |||
| //assume this is an IOexception about un readability | |||
| //assume this is an IOException about un readability | |||
| final Throwable nested = e.getTargetException(); | |||
| log(ERROR_ON_NETWORK + target + ": " + nested.toString()); | |||
| //any kind of fault: not reachable. | |||
| @@ -86,8 +86,8 @@ public class Os implements Condition { | |||
| /** | |||
| * OpenJDK is reported to call MacOS X "Darwin" | |||
| * @see https://issues.apache.org/bugzilla/show_bug.cgi?id=44889 | |||
| * @see https://issues.apache.org/jira/browse/HADOOP-3318 | |||
| * @see <a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=44889">Bugzilla</a> | |||
| * @see <a href="https://issues.apache.org/jira/browse/HADOOP-3318">Jira</a> | |||
| */ | |||
| private static final String DARWIN = "darwin"; | |||
| @@ -127,8 +127,8 @@ public class Os implements Condition { | |||
| /** | |||
| * Sets the desired OS family type | |||
| * | |||
| * @param f The OS family type desired<br> | |||
| * Possible values:<br> | |||
| * @param f The OS family type desired | |||
| * <p>Possible values:</p> | |||
| * <ul> | |||
| * <li>dos</li> | |||
| * <li>mac</li> | |||
| @@ -32,6 +32,8 @@ public class ResourceExists extends ProjectComponent implements Condition { | |||
| /** | |||
| * The resource to test. | |||
| * | |||
| * @param r Resource | |||
| */ | |||
| public void add(Resource r) { | |||
| if (resource != null) { | |||
| @@ -41,36 +41,24 @@ import org.apache.tools.ant.types.FileSet; | |||
| * | |||
| * It produces an XML output representing the list of changes. | |||
| * <pre> | |||
| * <font color=#0000ff><!-- Root element --></font> | |||
| * <font color=#6a5acd><!ELEMENT</font> changelog <font color=#ff00ff> | |||
| * (entry</font><font color=#ff00ff>+</font><font color=#ff00ff>) | |||
| * </font><font color=#6a5acd>></font> | |||
| * <font color=#0000ff><!-- CVS Entry --></font> | |||
| * <font color=#6a5acd><!ELEMENT</font> entry <font color=#ff00ff> | |||
| * (date,author,file</font><font color=#ff00ff>+</font><font color=#ff00ff>,msg) | |||
| * </font><font color=#6a5acd>></font> | |||
| * <font color=#0000ff><!-- Date of cvs entry --></font> | |||
| * <font color=#6a5acd><!ELEMENT</font> date <font color=#ff00ff>(#PCDATA) | |||
| * </font><font color=#6a5acd>></font> | |||
| * <font color=#0000ff><!-- Author of change --></font> | |||
| * <font color=#6a5acd><!ELEMENT</font> author <font color=#ff00ff>(#PCDATA) | |||
| * </font><font color=#6a5acd>></font> | |||
| * <font color=#0000ff><!-- List of files affected --></font> | |||
| * <font color=#6a5acd><!ELEMENT</font> msg <font color=#ff00ff>(#PCDATA) | |||
| * </font><font color=#6a5acd>></font> | |||
| * <font color=#0000ff><!-- File changed --></font> | |||
| * <font color=#6a5acd><!ELEMENT</font> file <font color=#ff00ff> | |||
| * (name,revision,prevrevision</font><font color=#ff00ff>?</font> | |||
| * <font color=#ff00ff>)</font><font color=#6a5acd>></font> | |||
| * <font color=#0000ff><!-- Name of the file --></font> | |||
| * <font color=#6a5acd><!ELEMENT</font> name <font color=#ff00ff>(#PCDATA) | |||
| * </font><font color=#6a5acd>></font> | |||
| * <font color=#0000ff><!-- Revision number --></font> | |||
| * <font color=#6a5acd><!ELEMENT</font> revision <font color=#ff00ff> | |||
| * (#PCDATA)</font><font color=#6a5acd>></font> | |||
| * <font color=#0000ff><!-- Previous revision number --></font> | |||
| * <font color=#6a5acd><!ELEMENT</font> prevrevision <font color=#ff00ff> | |||
| * (#PCDATA)</font><font color=#6a5acd>></font> | |||
| * <!-- Root element --> | |||
| * <!ELEMENT changelog (entry+)> | |||
| * <!-- CVS Entry --> | |||
| * <!ELEMENT entry (date,author,file+,msg)> | |||
| * <!-- Date of cvs entry --> | |||
| * <!ELEMENT date (#PCDATA)> | |||
| * <!-- Author of change --> | |||
| * <!ELEMENT author (#PCDATA)> | |||
| * <!-- List of files affected --> | |||
| * <!ELEMENT msg (#PCDATA)> | |||
| * <!-- File changed --> | |||
| * <!ELEMENT file (name,revision,prevrevision?)> | |||
| * <!-- Name of the file --> | |||
| * <!ELEMENT name (#PCDATA)> | |||
| * <!-- Revision number --> | |||
| * <!ELEMENT revision (#PCDATA)> | |||
| * <!-- Previous revision number --> | |||
| * <!ELEMENT prevrevision (#PCDATA)> | |||
| * </pre> | |||
| * | |||
| * @since Ant 1.5 | |||
| @@ -183,6 +171,7 @@ public class ChangeLogTask extends AbstractCvsTask { | |||
| * Whether to use rlog against a remote repository instead of log | |||
| * in a working copy's directory. | |||
| * | |||
| * @param remote boolean | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| public void setRemote(final boolean remote) { | |||
| @@ -42,9 +42,9 @@ import org.w3c.dom.Element; | |||
| * Examines the output of cvs rdiff between two tags. | |||
| * | |||
| * It produces an XML output representing the list of changes. | |||
| * <PRE> | |||
| * <pre> | |||
| * <!-- Root element --> | |||
| * <!ELEMENT tagdiff ( entry+ ) > | |||
| * <!ELEMENT tagdiff (entry+) > | |||
| * <!-- Start tag of the report --> | |||
| * <!ATTLIST tagdiff startTag NMTOKEN #IMPLIED > | |||
| * <!-- End tag of the report --> | |||
| @@ -55,16 +55,16 @@ import org.w3c.dom.Element; | |||
| * <!ATTLIST tagdiff endDate NMTOKEN #IMPLIED > | |||
| * | |||
| * <!-- CVS tag entry --> | |||
| * <!ELEMENT entry ( file ) > | |||
| * <!ELEMENT entry (file) > | |||
| * <!-- File added, changed or removed --> | |||
| * <!ELEMENT file ( name, revision?, prevrevision? ) > | |||
| * <!ELEMENT file (name, revision?, prevrevision?) > | |||
| * <!-- Name of the file --> | |||
| * <!ELEMENT name ( #PCDATA ) > | |||
| * <!ELEMENT name (#PCDATA) > | |||
| * <!-- Revision number --> | |||
| * <!ELEMENT revision ( #PCDATA ) > | |||
| * <!ELEMENT revision (#PCDATA) > | |||
| * <!-- Previous revision number --> | |||
| * <!ELEMENT prevrevision ( #PCDATA ) > | |||
| * </PRE> | |||
| * <!ELEMENT prevrevision (#PCDATA) > | |||
| * </pre> | |||
| * | |||
| * @since Ant 1.5 | |||
| * @ant.task name="cvstagdiff" | |||
| @@ -92,15 +92,15 @@ public class EmailAddress { | |||
| } | |||
| } | |||
| // DEBUG: System.out.println( email ); | |||
| // DEBUG: System.out.println(email); | |||
| if (end == 0) { | |||
| end = len; | |||
| } | |||
| // DEBUG: System.out.println( "address: " + start + " " + end ); | |||
| // DEBUG: System.out.println("address: " + start + " " + end); | |||
| if (nEnd == 0) { | |||
| nEnd = len; | |||
| } | |||
| // DEBUG: System.out.println( "name: " + nStart + " " + nEnd ); | |||
| // DEBUG: System.out.println("name: " + nStart + " " + nEnd); | |||
| this.address = trim(email.substring(start, end), true); | |||
| this.name = trim(email.substring(nStart, nEnd), false); | |||