You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by gi...@apache.org on 2017/12/10 06:16:18 UTC
[3/8] ant git commit: Let’s use doclint
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/resources/Union.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/resources/Union.java b/src/main/org/apache/tools/ant/types/resources/Union.java
index 9c10658..43c1b57 100644
--- a/src/main/org/apache/tools/ant/types/resources/Union.java
+++ b/src/main/org/apache/tools/ant/types/resources/Union.java
@@ -109,6 +109,7 @@ public class Union extends BaseResourceCollectionContainer {
/**
* Unify the contained Resources.
+ * @param <T> resource type
* @param asString indicates whether the resulting Collection
* should contain Strings instead of Resources.
* @return a Collection of Resources.
@@ -122,7 +123,7 @@ public class Union extends BaseResourceCollectionContainer {
/**
* Get a collection of strings representing the unified resource set (strings may duplicate).
- * @return Collection<String>
+ * @return Collection<String>
*/
protected Collection<String> getAllToStrings() {
return streamResources(Object::toString)
@@ -131,7 +132,7 @@ public class Union extends BaseResourceCollectionContainer {
/**
* Get the unified set of contained Resources.
- * @return Set<Resource>
+ * @return Set<Resource>
*/
protected Set<Resource> getAllResources() {
return streamResources()
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/resources/ZipResource.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/resources/ZipResource.java b/src/main/org/apache/tools/ant/types/resources/ZipResource.java
index 37fc98e..1dec546 100644
--- a/src/main/org/apache/tools/ant/types/resources/ZipResource.java
+++ b/src/main/org/apache/tools/ant/types/resources/ZipResource.java
@@ -186,6 +186,7 @@ public class ZipResource extends ArchiveResource {
/**
* The compression method that has been used.
+ * @return int
* @since Ant 1.8.0
*/
public int getMethod() {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/resources/selectors/Name.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/resources/selectors/Name.java b/src/main/org/apache/tools/ant/types/resources/selectors/Name.java
index fcbe51e..75d4f25 100644
--- a/src/main/org/apache/tools/ant/types/resources/selectors/Name.java
+++ b/src/main/org/apache/tools/ant/types/resources/selectors/Name.java
@@ -108,7 +108,7 @@ public class Name implements ResourceSelector {
/**
* Whether the difference between / and \ (the two common
* directory characters) is ignored.
- *
+ * @return boolean
* @since Ant 1.8.0
*/
public boolean doesHandledirSep() {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/resources/selectors/ResourceSelectorContainer.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/resources/selectors/ResourceSelectorContainer.java b/src/main/org/apache/tools/ant/types/resources/selectors/ResourceSelectorContainer.java
index 795d453..9ac639c 100644
--- a/src/main/org/apache/tools/ant/types/resources/selectors/ResourceSelectorContainer.java
+++ b/src/main/org/apache/tools/ant/types/resources/selectors/ResourceSelectorContainer.java
@@ -43,7 +43,7 @@ public class ResourceSelectorContainer extends DataType {
/**
* Construct a new ResourceSelectorContainer with the specified array of selectors.
- * @param r the ResourceSelector[] to add.
+ * @param resourceSelectors the ResourceSelector[] to add.
*/
public ResourceSelectorContainer(ResourceSelector... resourceSelectors) {
for (ResourceSelector rsel : resourceSelectors) {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/selectors/AbstractSelectorContainer.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/selectors/AbstractSelectorContainer.java b/src/main/org/apache/tools/ant/types/selectors/AbstractSelectorContainer.java
index 90a2a87..21fbdeb 100644
--- a/src/main/org/apache/tools/ant/types/selectors/AbstractSelectorContainer.java
+++ b/src/main/org/apache/tools/ant/types/selectors/AbstractSelectorContainer.java
@@ -301,6 +301,7 @@ public abstract class AbstractSelectorContainer extends DataType
}
/**
+ * @param e ExecutableSelector
* @since 1.10.0
*/
public void addExecutable(ExecutableSelector e) {
@@ -308,6 +309,7 @@ public abstract class AbstractSelectorContainer extends DataType
}
/**
+ * @param e SymlinkSelector
* @since 1.10.0
*/
public void addSymlink(SymlinkSelector e) {
@@ -315,6 +317,7 @@ public abstract class AbstractSelectorContainer extends DataType
}
/**
+ * @param o OwnedBySelector
* @since 1.10.0
*/
public void addOwnedBy(OwnedBySelector o) {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/selectors/BaseSelector.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/selectors/BaseSelector.java b/src/main/org/apache/tools/ant/types/selectors/BaseSelector.java
index 6307ced..7ae6d80 100644
--- a/src/main/org/apache/tools/ant/types/selectors/BaseSelector.java
+++ b/src/main/org/apache/tools/ant/types/selectors/BaseSelector.java
@@ -53,6 +53,7 @@ public abstract class BaseSelector extends DataType implements FileSelector {
* the first error message is recorded.
*
* @param msg The error message any BuildException should throw.
+ * @param cause Throwable
*/
public void setError(String msg, Throwable cause) {
if (errmsg == null) {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/selectors/BaseSelectorContainer.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/selectors/BaseSelectorContainer.java b/src/main/org/apache/tools/ant/types/selectors/BaseSelectorContainer.java
index baf14da..fe90b38 100644
--- a/src/main/org/apache/tools/ant/types/selectors/BaseSelectorContainer.java
+++ b/src/main/org/apache/tools/ant/types/selectors/BaseSelectorContainer.java
@@ -297,6 +297,7 @@ public abstract class BaseSelectorContainer extends BaseSelector
}
/**
+ * @param e ExecutableSelector
* @since 1.10.0
*/
public void addExecutable(ExecutableSelector e) {
@@ -304,6 +305,7 @@ public abstract class BaseSelectorContainer extends BaseSelector
}
/**
+ * @param e SymlinkSelector
* @since 1.10.0
*/
public void addSymlink(SymlinkSelector e) {
@@ -311,6 +313,7 @@ public abstract class BaseSelectorContainer extends BaseSelector
}
/**
+ * @param o OwnedBySelector
* @since 1.10.0
*/
public void addOwnedBy(OwnedBySelector o) {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/selectors/DateSelector.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/selectors/DateSelector.java b/src/main/org/apache/tools/ant/types/selectors/DateSelector.java
index e79061c..d05a752 100644
--- a/src/main/org/apache/tools/ant/types/selectors/DateSelector.java
+++ b/src/main/org/apache/tools/ant/types/selectors/DateSelector.java
@@ -237,7 +237,6 @@ public class DateSelector extends BaseExtendSelector {
/**
* Enumerated attribute with the values for time comparison.
- * <p>
*/
public static class TimeComparisons extends TimeComparison {
}
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/selectors/DifferentSelector.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/selectors/DifferentSelector.java b/src/main/org/apache/tools/ant/types/selectors/DifferentSelector.java
index 90fa9e0..c987053 100644
--- a/src/main/org/apache/tools/ant/types/selectors/DifferentSelector.java
+++ b/src/main/org/apache/tools/ant/types/selectors/DifferentSelector.java
@@ -40,12 +40,13 @@ import org.apache.tools.ant.util.FileUtils;
* output files, followup tasks can be driven off copies made with a different
* selector, so their dependencies are driven on the absolute state of the
* files, not a timestamp.
+ * </p>
* <p>
* Clearly, however, bulk file comparisons is inefficient; anything that can
* use timestamps is to be preferred. If this selector must be used, use it
- * over as few files as possible, perhaps following it with an <uptodate;>
+ * over as few files as possible, perhaps following it with an <uptodate>
* to keep the descendant routines conditional.
- *
+ * </p>
*/
public class DifferentSelector extends MappingSelector {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/selectors/FileSelector.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/selectors/FileSelector.java b/src/main/org/apache/tools/ant/types/selectors/FileSelector.java
index 984db23..f583bdf 100644
--- a/src/main/org/apache/tools/ant/types/selectors/FileSelector.java
+++ b/src/main/org/apache/tools/ant/types/selectors/FileSelector.java
@@ -50,7 +50,7 @@ public interface FileSelector extends ResourceSelector {
/**
* Implement a basic {@link Resource} selection that delegates to this
* {@link FileSelector}.
- * @param r
+ * @param r resource
* @return whether the resource is selected
*/
default boolean isSelected(Resource r) {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/selectors/OwnedBySelector.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/selectors/OwnedBySelector.java b/src/main/org/apache/tools/ant/types/selectors/OwnedBySelector.java
index 88f3b08..d37fd2f 100644
--- a/src/main/org/apache/tools/ant/types/selectors/OwnedBySelector.java
+++ b/src/main/org/apache/tools/ant/types/selectors/OwnedBySelector.java
@@ -31,7 +31,7 @@ import org.apache.tools.ant.BuildException;
* <p>Owner is defined in terms of {@link
* java.nio.file.Files#getOwner}, this means the selector will accept
* any file that exists and is owned by the given user. If the {@code
- * getOwner} method throws an {@code UnsupportedOperattionException}
+ * getOwner} method throws an {@code UnsupportedOperationException}
* the file in question is not included.</p>
*
* @since Ant 1.10.0
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/selectors/PresentSelector.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/selectors/PresentSelector.java b/src/main/org/apache/tools/ant/types/selectors/PresentSelector.java
index 1b39d22..a45c1cc 100644
--- a/src/main/org/apache/tools/ant/types/selectors/PresentSelector.java
+++ b/src/main/org/apache/tools/ant/types/selectors/PresentSelector.java
@@ -112,7 +112,7 @@ public class PresentSelector extends BaseSelector {
* that already exist in the source directory, hence the lack of
* a <code>destonly</code> option.
*
- * @param fp An attribute set to either <code>srconly</code or
+ * @param fp An attribute set to either <code>srconly</code> or
* <code>both</code>.
*/
public void setPresent(final FilePresence fp) {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/selectors/SizeSelector.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/selectors/SizeSelector.java b/src/main/org/apache/tools/ant/types/selectors/SizeSelector.java
index f62880b..8022fa6 100644
--- a/src/main/org/apache/tools/ant/types/selectors/SizeSelector.java
+++ b/src/main/org/apache/tools/ant/types/selectors/SizeSelector.java
@@ -63,8 +63,8 @@ public class SizeSelector extends BaseExtendSelector {
/**
* Returns a <code>String</code> object representing the specified
- * SizeSelector. This is "{sizeselector value: " + <"compare",
- * "less", "more", "equal"> + "}".
+ * SizeSelector. This is "{sizeselector value: " + <"compare",
+ * "less", "more", "equal"> + "}".
* @return a string describing this object
*/
public String toString() {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/selectors/TokenizedPath.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/selectors/TokenizedPath.java b/src/main/org/apache/tools/ant/types/selectors/TokenizedPath.java
index 48e4ce7..3eae584 100644
--- a/src/main/org/apache/tools/ant/types/selectors/TokenizedPath.java
+++ b/src/main/org/apache/tools/ant/types/selectors/TokenizedPath.java
@@ -94,12 +94,14 @@ public class TokenizedPath {
/**
* The depth (or length) of a path.
+ * @return int
*/
public int depth() {
return tokenizedPath.length;
}
- /* package */ String[] getTokens() {
+ /* package */
+ String[] getTokens() {
return tokenizedPath;
}
@@ -136,6 +138,7 @@ public class TokenizedPath {
* Do we have to traverse a symlink when trying to reach path from
* basedir?
* @param base base File (dir).
+ * @return boolean
*/
public boolean isSymlink(File base) {
for (int i = 0; i < tokenizedPath.length; i++) {
@@ -161,6 +164,7 @@ public class TokenizedPath {
/**
* true if the original paths are equal.
+ * @return boolean
*/
@Override
public boolean equals(Object o) {
@@ -215,6 +219,8 @@ public class TokenizedPath {
/**
* Creates a TokenizedPattern from the same tokens that make up
* this path.
+ *
+ * @return TokenizedPattern
*/
public TokenizedPattern toPattern() {
return new TokenizedPattern(path, tokenizedPath);
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/selectors/TokenizedPattern.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/selectors/TokenizedPattern.java b/src/main/org/apache/tools/ant/types/selectors/TokenizedPattern.java
index e9413df..03d5e3b 100644
--- a/src/main/org/apache/tools/ant/types/selectors/TokenizedPattern.java
+++ b/src/main/org/apache/tools/ant/types/selectors/TokenizedPattern.java
@@ -75,6 +75,10 @@ public class TokenizedPattern {
/**
* Tests whether or not this pattern matches the start of
* a path.
+ *
+ * @param path TokenizedPath
+ * @param caseSensitive boolean
+ * @return boolean
*/
public boolean matchStartOf(TokenizedPath path,
boolean caseSensitive) {
@@ -95,6 +99,8 @@ public class TokenizedPattern {
/**
* true if the original patterns are equal.
+ *
+ * @param o Object
*/
public boolean equals(Object o) {
return o instanceof TokenizedPattern
@@ -107,6 +113,8 @@ public class TokenizedPattern {
/**
* The depth (or length) of a pattern.
+ *
+ * @return int
*/
public int depth() {
return tokenizedPattern.length;
@@ -114,6 +122,9 @@ public class TokenizedPattern {
/**
* Does the tokenized pattern contain the given string?
+ *
+ * @param pat String
+ * @return boolean
*/
public boolean containsPattern(String pat) {
return Stream.of(tokenizedPattern).anyMatch(Predicate.isEqual(pat));
@@ -122,6 +133,7 @@ public class TokenizedPattern {
/**
* Returns a new TokenizedPath where all tokens of this pattern to
* the right containing wildcards have been removed
+ *
* @return the leftmost part of the pattern without wildcards
*/
public TokenizedPath rtrimWildcardTokens() {
@@ -147,6 +159,9 @@ public class TokenizedPattern {
/**
* true if the last token equals the given string.
+ *
+ * @param s String
+ * @return boolean
*/
public boolean endsWith(String s) {
return tokenizedPattern.length > 0
@@ -155,6 +170,8 @@ public class TokenizedPattern {
/**
* Returns a new pattern without the last token of this pattern.
+ *
+ * @return TokenizedPattern
*/
public TokenizedPattern withoutLastToken() {
if (tokenizedPattern.length == 0) {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ChecksumAlgorithm.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ChecksumAlgorithm.java b/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ChecksumAlgorithm.java
index a660caf..417b52c 100644
--- a/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ChecksumAlgorithm.java
+++ b/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ChecksumAlgorithm.java
@@ -34,17 +34,18 @@ import org.apache.tools.ant.BuildException;
/**
* Computes a 'checksum' for the content of file using
* java.util.zip.CRC32 and java.util.zip.Adler32.
- * Use of this algorithm doesn't require any additional nested <param>s.
- * Supported <param>s are:
+ * Use of this algorithm doesn't require any additional nested <param>s.
+ * Supported <param>s are:
* <table>
+ * <caption>Checksum algorithm parameters</caption>
* <tr>
* <th>name</th><th>values</th><th>description</th><th>required</th>
* </tr>
* <tr>
- * <td> algorithm.algorithm </td>
- * <td> ADLER | CRC ( default ) </td>
- * <td> name of the algorithm the checksum should use </td>
- * <td> no, defaults to CRC </td>
+ * <td>algorithm.algorithm</td>
+ * <td>ADLER | CRC (default)</td>
+ * <td>name of the algorithm the checksum should use</td>
+ * <td>no, defaults to CRC</td>
* </tr>
* </table>
*
@@ -124,8 +125,8 @@ public class ChecksumAlgorithm implements Algorithm {
try (CheckedInputStream check = new CheckedInputStream(
new BufferedInputStream(Files.newInputStream(file.toPath())), checksum)) {
// Read the file
- while (check.read() != -1)
- ;
+ while (check.read() != -1) {
+ }
return Long.toString(check.getChecksum().getValue());
} catch (Exception e) {
}
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.java b/src/main/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.java
index cc9a66c..55077a3 100644
--- a/src/main/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.java
+++ b/src/main/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.java
@@ -33,23 +33,24 @@ import org.apache.tools.ant.BuildException;
/**
* Computes a 'hashvalue' for the content of file using
* java.security.MessageDigest.
- * Use of this algorithm doesn't require any additional nested <param>s.
- * Supported <param>s are:
+ * Use of this algorithm doesn't require any additional nested <param>s.
+ * Supported <param>s are:
* <table>
+ * <caption>Digest algorithm parameters</caption>
* <tr>
* <th>name</th><th>values</th><th>description</th><th>required</th>
* </tr>
* <tr>
- * <td> algorithm.algorithm </td>
- * <td> MD5 | SHA (default provider) </td>
- * <td> name of the algorithm the provider should use </td>
- * <td> no, defaults to MD5 </td>
+ * <td>algorithm.algorithm</td>
+ * <td>MD5 | SHA (default provider)</td>
+ * <td>name of the algorithm the provider should use</td>
+ * <td>no, defaults to MD5</td>
* </tr>
* <tr>
- * <td> algorithm.provider </td>
- * <td> </td>
- * <td> name of the provider to use </td>
- * <td> no, defaults to <i>null</i> </td>
+ * <td> algorithm.provider</td>
+ * <td></td>
+ * <td>name of the provider to use</td>
+ * <td>no, defaults to <i>null</i></td>
* </tr>
* </table>
*
@@ -159,8 +160,8 @@ public class DigestAlgorithm implements Algorithm {
try (DigestInputStream dis = new DigestInputStream(
Files.newInputStream(file.toPath()), messageDigest)) {
// read the whole stream
- while (dis.read(buf, 0, readBufferSize) != -1)
- ;
+ while (dis.read(buf, 0, readBufferSize) != -1) {
+ }
byte[] fileDigest = messageDigest.digest();
StringBuilder checksumSb = new StringBuilder();
for (int i = 0; i < fileDigest.length; i++) {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/selectors/modifiedselector/HashvalueAlgorithm.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/selectors/modifiedselector/HashvalueAlgorithm.java b/src/main/org/apache/tools/ant/types/selectors/modifiedselector/HashvalueAlgorithm.java
index 8af9d12..ab8849d 100644
--- a/src/main/org/apache/tools/ant/types/selectors/modifiedselector/HashvalueAlgorithm.java
+++ b/src/main/org/apache/tools/ant/types/selectors/modifiedselector/HashvalueAlgorithm.java
@@ -26,7 +26,7 @@ import org.apache.tools.ant.util.FileUtils;
/**
* Computes a 'hashvalue' for the content of file using String.hashValue().
- * Use of this algorithm doesn't require any additional nested <param>s and
+ * Use of this algorithm doesn't require any additional nested <param>s and
* doesn't support any.
*
* @version 2003-09-13
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java b/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java
index f2097fd..331888b 100644
--- a/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java
+++ b/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java
@@ -52,16 +52,16 @@ import org.apache.tools.ant.util.ResourceUtils;
* in a persistent manner.</p>
*
* <p>The ModifiedSelector is implemented as a <b>CoreSelector</b> and uses default
- * values for all its attributes therefore the simplest example is <pre>
+ * values for all its attributes therefore the simplest example is</p><pre>
* <copy todir="dest">
* <filelist dir="src">
* <modified/>
* </filelist>
* </copy>
- * </pre></p>
+ * </pre>
*
* <p>The same example rewritten as CoreSelector with setting the all values
- * (same as defaults are) would be <pre>
+ * (same as defaults are) would be</p><pre>
* <copy todir="dest">
* <filelist dir="src">
* <modified update="true"
@@ -73,9 +73,9 @@ import org.apache.tools.ant.util.ResourceUtils;
* </modified>
* </filelist>
* </copy>
- * </pre></p>
+ * </pre>
*
- * <p>And the same rewritten as CustomSelector would be<pre>
+ * <p>And the same rewritten as CustomSelector would be</p><pre>
* <copy todir="dest">
* <filelist dir="src">
* <custom class="org.apache.tools.ant.type.selectors.ModifiedSelector">
@@ -88,18 +88,18 @@ import org.apache.tools.ant.util.ResourceUtils;
* </custom>
* </filelist>
* </copy>
- * </pre></p>
+ * </pre>
*
* <p>If you want to provide your own interface implementation you can do
* that via the *classname attributes. If the classes are not on Ant's core
* classpath, you will have to provide the path via nested <classpath>
- * element, so that the selector can find the classes. <pre>
+ * element, so that the selector can find the classes.</p><pre>
* <modified cacheclassname="com.mycompany.MyCache">
* <classpath>
* <pathelement location="lib/mycompany-antutil.jar"/>
* </classpath>
* </modified>
- * </pre></p>
+ * </pre>
*
* <p>All these three examples copy the files from <i>src</i> to <i>dest</i>
* using the ModifiedSelector. The ModifiedSelector uses the <i>PropertyfileCache
@@ -116,7 +116,7 @@ import org.apache.tools.ant.util.ResourceUtils;
*
* <p>A useful scenario for this selector is inside a build environment
* for homepage generation (e.g. with <a href="http://forrest.apache.org/">
- * Apache Forrest</a>). <pre>
+ * Apache Forrest</a>).</p><pre>
* <target name="generate-and-upload-site">
* <echo> generate the site using forrest </echo>
* <antcall target="site"/>
@@ -128,7 +128,7 @@ import org.apache.tools.ant.util.ResourceUtils;
* </fileset>
* </ftp>
* </target>
- * </pre> Here all <b>changed</b> files are uploaded to the server. The
+ * </pre><p>Here all <b>changed</b> files are uploaded to the server. The
* ModifiedSelector saves therefore much upload time.</p>
*
*
@@ -179,7 +179,7 @@ public class ModifiedSelector extends BaseExtendSelector
private boolean selectDirectories = true;
/**
- * Should Resources whithout an InputStream, and
+ * Should Resources without an InputStream, and
* therefore without checking, be selected?
*/
private boolean selectResourcesWithoutInputStream = true;
@@ -259,14 +259,14 @@ public class ModifiedSelector extends BaseExtendSelector
/**
* Configures this Selector.
* Does this work only once per Selector object.
- * <p>Because some problems while configuring from <custom>Selector
- * the configuration is done in the following order:<ol>
- * <li> collect the configuration data </li>
- * <li> wait for the first isSelected() call </li>
- * <li> set the default values </li>
- * <li> set values for name pattern '*': update, cache, algorithm, comparator </li>
- * <li> set values for name pattern '*.*: cache.cachefile, ... </li>
- * </ol></p>
+ * <p>Because some problems while configuring from <custom>Selector
+ * the configuration is done in the following order:</p><ol>
+ * <li>collect the configuration data</li>
+ * <li>wait for the first isSelected() call</li>
+ * <li>set the default values</li>
+ * <li>set values for name pattern '*': update, cache, algorithm, comparator</li>
+ * <li>set values for name pattern '*.*: cache.cachefile, ...</li>
+ * </ol>
* <p>This configuration algorithm is needed because you don't know
* the order of arriving config-data. E.g. if you first set the
* <i>cache.cachefilename</i> and after that the <i>cache</i> itself,
@@ -387,6 +387,7 @@ public class ModifiedSelector extends BaseExtendSelector
* Loads the specified class and initializes an object of that class.
* Throws a BuildException using the given message if an error occurs during
* loading/instantiation or if the object is not from the given type.
+ * @param <T> desired type
* @param classname the classname
* @param msg the message-part for the BuildException
* @param type the type to check against
@@ -455,7 +456,7 @@ public class ModifiedSelector extends BaseExtendSelector
log("The resource '"
+ resource.getName()
+ "' does not provide an InputStream, so it is not checked. "
- + "Akkording to 'selres' attribute value it is "
+ + "According to 'selres' attribute value it is "
+ ((selectResourcesWithoutInputStream) ? "" : " not")
+ "selected.", Project.MSG_INFO);
return selectResourcesWithoutInputStream;
@@ -700,7 +701,7 @@ public class ModifiedSelector extends BaseExtendSelector
/**
- * Support for nested <param name="" value=""/> tags.
+ * Support for nested <code><param name="" value=""/></code> tags.
* Parameter named <i>cache</i>, <i>algorithm</i>,
* <i>comparator</i> or <i>update</i> are mapped to
* the respective set-Method.
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/types/selectors/modifiedselector/PropertiesfileCache.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/selectors/modifiedselector/PropertiesfileCache.java b/src/main/org/apache/tools/ant/types/selectors/modifiedselector/PropertiesfileCache.java
index d0de982..f7392d2 100644
--- a/src/main/org/apache/tools/ant/types/selectors/modifiedselector/PropertiesfileCache.java
+++ b/src/main/org/apache/tools/ant/types/selectors/modifiedselector/PropertiesfileCache.java
@@ -30,22 +30,23 @@ import java.util.Properties;
/**
* Use java.util.Properties for storing the values.
* The use of this Cache-implementation requires the use of the parameter
- * <param name="cache.cachefile" .../> for defining, where to store the
+ * <param name="cache.cachefile" .../> for defining, where to store the
* properties file.
*
* The ModifiedSelector sets the <i>cachefile</i> to the default value
* <i>cache.properties</i>.
*
- * Supported <param>s are:
+ * Supported <param>s are:
* <table>
+ * <caption>Cache parameters</caption>
* <tr>
* <th>name</th><th>values</th><th>description</th><th>required</th>
* </tr>
* <tr>
- * <td> cache.cachefile </td>
- * <td> <i>path to file</i> </td>
- * <td> the name of the properties file </td>
- * <td> yes </td>
+ * <td>cache.cachefile</td>
+ * <td><i>path to file</i></td>
+ * <td>the name of the properties file</td>
+ * <td>yes</td>
* </tr>
* </table>
*
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/ClasspathUtils.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/ClasspathUtils.java b/src/main/org/apache/tools/ant/util/ClasspathUtils.java
index 0f7787a..acfd2b0 100644
--- a/src/main/org/apache/tools/ant/util/ClasspathUtils.java
+++ b/src/main/org/apache/tools/ant/util/ClasspathUtils.java
@@ -216,9 +216,8 @@ public class ClasspathUtils {
/**
* Creates a fresh object instance of the specified classname.
*
- * <p> This uses the userDefinedLoader to load the specified class,
- * and then makes an instance using the default no-argument constructor.
- * </p>
+ * <p>This uses the userDefinedLoader to load the specified class,
+ * and then makes an instance using the default no-argument constructor.</p>
*
* @param className the full qualified class name to load.
* @param userDefinedLoader the classloader to use.
@@ -232,10 +231,10 @@ public class ClasspathUtils {
/**
* Creates a fresh object instance of the specified classname.
*
- * <p> This uses the userDefinedLoader to load the specified class,
- * and then makes an instance using the default no-argument constructor.
- * </p>
+ * <p>This uses the userDefinedLoader to load the specified class,
+ * and then makes an instance using the default no-argument constructor.</p>
*
+ * @param <T> desired type
* @param className the full qualified class name to load.
* @param userDefinedLoader the classloader to use.
* @param expectedType the Class that the result should be assignment
@@ -274,7 +273,7 @@ public class ClasspathUtils {
/**
* Obtains a delegate that helps out with classic classpath configuration.
*
- * @param component your projectComponent that needs the assistence
+ * @param component your projectComponent that needs the assistance
* @return the helper, delegate.
* @see ClasspathUtils.Delegate
*/
@@ -301,13 +300,13 @@ public class ClasspathUtils {
* Classes and instantiate them often expose the following ant syntax
* sugar: </p>
*
- * <ul><li> nested <classpath> </li>
- * <li> attribute @classpathref </li>
- * <li> attribute @classname </li></ul>
+ * <ul><li>nested <classpath></li>
+ * <li>attribute @classpathref</li>
+ * <li>attribute @classname</li></ul>
*
- * <p> This class functions as a delegate handling the configuration
+ * <p>This class functions as a delegate handling the configuration
* issues for this recurring pattern. Its usage pattern, as the name
- * suggests, is delegation rather than inheritance. </p>
+ * suggests, is delegation rather than inheritance.</p>
*
* @since Ant 1.6
*/
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/ConcatResourceInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/ConcatResourceInputStream.java b/src/main/org/apache/tools/ant/util/ConcatResourceInputStream.java
index d030a55..d695f12 100644
--- a/src/main/org/apache/tools/ant/util/ConcatResourceInputStream.java
+++ b/src/main/org/apache/tools/ant/util/ConcatResourceInputStream.java
@@ -128,7 +128,7 @@ public class ConcatResourceInputStream extends InputStream {
if (!r.isExists()) {
continue;
}
- log("Concating " + r.toLongString(), Project.MSG_VERBOSE);
+ log("Concatenating " + r.toLongString(), Project.MSG_VERBOSE);
try {
currentStream = new BufferedInputStream(r.getInputStream());
return;
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/DOMElementWriter.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/DOMElementWriter.java b/src/main/org/apache/tools/ant/util/DOMElementWriter.java
index 7f6013a..8aa9b9c 100644
--- a/src/main/org/apache/tools/ant/util/DOMElementWriter.java
+++ b/src/main/org/apache/tools/ant/util/DOMElementWriter.java
@@ -413,7 +413,7 @@ public class DOMElementWriter {
}
/**
- * Escape <, > & ', " as their entities and
+ * Escape <, >, &, ', " as their entities and
* drop characters that are illegal in XML documents.
* @param value the string to encode.
* @return the encoded string.
@@ -423,7 +423,7 @@ public class DOMElementWriter {
}
/**
- * Escape <, > & ', " as their entities, \n,
+ * Escape <, >, &, ', " as their entities, \n,
* \r and \t as numeric entities and drop characters that are
* illegal in XML documents.
* @param value the string to encode.
@@ -513,6 +513,7 @@ public class DOMElementWriter {
* href="http://www.w3.org/TR/1998/REC-xml-19980210#sec-cdata-sect">http://www.w3.org/TR/1998/REC-xml-19980210#sec-cdata-sect</a>.</p>
* @param value the value to be encoded.
* @param out where to write the encoded data to.
+ * @throws IOException if data cannot be written
*/
public void encodedata(final Writer out, final String value) throws IOException {
final int len = value.length();
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/DateUtils.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/DateUtils.java b/src/main/org/apache/tools/ant/util/DateUtils.java
index 70e9013..14d530a 100644
--- a/src/main/org/apache/tools/ant/util/DateUtils.java
+++ b/src/main/org/apache/tools/ant/util/DateUtils.java
@@ -153,7 +153,7 @@ public final class DateUtils {
/**
- * Format an elapsed time into a plurialization correct string.
+ * Format an elapsed time into a pluralization correct string.
* It is limited only to report elapsed time in minutes and
* seconds and has the following behavior.
* <ul>
@@ -196,7 +196,7 @@ public final class DateUtils {
* moon period = 29.53058 days ~= 30, year = 365.2422 days
*
* days moon phase advances on first day of year compared to preceding year
- * = 365.2422 - 12*29.53058 ~= 11
+ * = 365.2422 - 12 * 29.53058 ~= 11
*
* years in Metonic cycle (time until same phases fall on the same days of
* the month) = 18.6 ~= 19
@@ -208,7 +208,7 @@ public final class DateUtils {
*
* 6 moons ~= 177 days
* 177 ~= 8 reported phases * 22
- * + 11/22 for rounding
+ * + 11 / 22 for rounding
* </pre>
*
* @param cal the calendar.
@@ -351,23 +351,32 @@ public final class DateUtils {
* where {a|b} indicates that you must choose one of a or b, and [c]
* indicates that you may use or omit c. ±ZZZZ is the timezone offset, and
* may be literally "Z" to mean GMT.
+ *
+ * @param dateStr String
+ * @return Date
+ * @throws ParseException if date string does not match ISO 8601
* @since Ant 1.10.2
*/
public static Date parseLenientDateTime(String dateStr) throws ParseException {
try {
return new Date(Long.parseLong(dateStr));
- } catch (NumberFormatException nfe) {}
+ } catch (NumberFormatException ignored) {
+ }
try {
return EN_US_DATE_FORMAT_MIN.get().parse(dateStr);
- } catch (ParseException pe) {}
+ } catch (ParseException ignored) {
+ }
try {
return EN_US_DATE_FORMAT_SEC.get().parse(dateStr);
- } catch (ParseException pe) {}
+ } catch (ParseException ignored) {
+ }
Matcher m = iso8601normalizer.matcher(dateStr);
- if (!m.find()) throw new ParseException(dateStr, 0);
+ if (!m.find()) {
+ throw new ParseException(dateStr, 0);
+ }
String normISO = m.group(1) + " "
+ (m.group(3) == null ? m.group(2) + ":00" : m.group(2))
+ (m.group(4) == null ? ".000 " : " ")
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/FileUtils.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/FileUtils.java b/src/main/org/apache/tools/ant/util/FileUtils.java
index 8bbdf91..9c6e59f 100644
--- a/src/main/org/apache/tools/ant/util/FileUtils.java
+++ b/src/main/org/apache/tools/ant/util/FileUtils.java
@@ -97,7 +97,7 @@ public class FileUtils {
/**
* A one item cache for fromUri.
- * fromUri is called for each element when parseing ant build
+ * fromUri is called for each element when parsing ant build
* files. It is a costly operation. This just caches the result
* of the last call.
*/
@@ -1268,6 +1268,11 @@ public class FileUtils {
/**
* Are the two File instances pointing to the same object on the
* file system?
+ *
+ * @param f1 File
+ * @param f2 File
+ * @return boolean
+ * @throws IOException if file name canonicalization fails
* @since Ant 1.8.2
*/
public boolean areSame(File f1, File f2) throws IOException {
@@ -1294,11 +1299,9 @@ public class FileUtils {
*
* @param from the file to move.
* @param to the new file name.
- *
* @throws IOException if anything bad happens during this
* process. Note that <code>to</code> may have been deleted
* already when this happens.
- *
* @since Ant 1.6
*/
public void rename(File from, File to) throws IOException {
@@ -1355,18 +1358,20 @@ public class FileUtils {
* test whether a file or directory exists, with an error in the
* upper/lower case spelling of the name.
* Using this method is only interesting on case insensitive file systems
- * (Windows).<br>
- * It will return true only if 3 conditions are met :
- * <br>
+ * (Windows).
+ * <p>
+ * It will return true only if 3 conditions are met:
+ * </p>
* <ul>
* <li>operating system is case insensitive</li>
* <li>file exists</li>
* <li>actual name from directory reading is different from the
* supplied argument</li>
* </ul>
- * <br>
- * the purpose is to identify files or directories on case-insensitive
- * filesystems whose case is not what is expected.<br>
+ * <p>
+ * The purpose is to identify files or directories on case-insensitive
+ * filesystems whose case is not what is expected.
+ * </p>
* Possibly to rename them afterwards to the desired upper/lowercase
* combination.
*
@@ -1552,6 +1557,7 @@ public class FileUtils {
* Others possible. If the delete does not work, call System.gc(),
* wait a little and try again.
*
+ * @param f File
* @return whether deletion was successful
* @since Ant 1.8.0
*/
@@ -1563,6 +1569,8 @@ public class FileUtils {
* If delete does not work, call System.gc() if asked to, wait a
* little and try again.
*
+ * @param f File
+ * @param runGC boolean
* @return whether deletion was successful
* @since Ant 1.8.3
*/
@@ -1671,7 +1679,7 @@ public class FileUtils {
/**
* Gets path from a <code>List</code> of <code>String</code>s.
*
- * @param pathStack <code>List</code> of <code>String</code>s to be concated as a path.
+ * @param pathStack <code>List</code> of <code>String</code>s to be concatenated as a path.
* @param separatorChar <code>char</code> to be used as separator between names in path
* @return <code>String</code>, never <code>null</code>
*
@@ -1707,8 +1715,9 @@ public class FileUtils {
/**
* Opens a new OutputStream for the given Path.
* @param path the path of the file
- * @param whether to append to or a replace an existing file
+ * @param append whether to append to or a replace an existing file
* @return a stream ready to write to the file
+ * @throws IOException if stream creation fails
* @since Ant 1.10.2
*/
public static OutputStream newOutputStream(Path path, boolean append) throws IOException {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/GlobPatternMapper.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/GlobPatternMapper.java b/src/main/org/apache/tools/ant/util/GlobPatternMapper.java
index 4d2d5cc..8469e9c 100644
--- a/src/main/org/apache/tools/ant/util/GlobPatternMapper.java
+++ b/src/main/org/apache/tools/ant/util/GlobPatternMapper.java
@@ -86,6 +86,7 @@ public class GlobPatternMapper implements FileNameMapper {
/**
* Attribute specifying whether to ignore the difference
* between / and \ (the two common directory characters).
+ * @return boolean
* @since Ant 1.8.3
*/
public boolean getHandleDirSep() {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/IdentityStack.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/IdentityStack.java b/src/main/org/apache/tools/ant/util/IdentityStack.java
index 56e9f7b..caf2fe9 100644
--- a/src/main/org/apache/tools/ant/util/IdentityStack.java
+++ b/src/main/org/apache/tools/ant/util/IdentityStack.java
@@ -33,6 +33,7 @@ public class IdentityStack<E> extends Stack<E> {
/**
* Get an IdentityStack containing the contents of the specified Stack.
+ * @param <E> desired type
* @param s the Stack to copy; ignored if null.
* @return an IdentityStack instance.
*/
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/JavaEnvUtils.java b/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
index e8e01ea..b110461 100644
--- a/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
+++ b/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
@@ -132,7 +132,7 @@ public final class JavaEnvUtils {
/** Whether this is the Kaffe VM */
private static boolean kaffeDetected;
- /** Wheter this is a GNU Classpath based VM */
+ /** Whether this is a GNU Classpath based VM */
private static boolean classpathDetected;
/** Whether this is the GNU VM (gcj/gij) */
@@ -566,20 +566,19 @@ public final class JavaEnvUtils {
}
/**
- *
* Writes the command into a temporary DCL script and returns the
* corresponding File object.
* It is the job of the caller to delete the file on exit.
- * @param cmd the command.
+ * @param cmds the command.
* @return the file containing the command.
* @throws IOException if there is an error writing to the file.
*/
- public static File createVmsJavaOptionFile(String[] cmd)
+ public static File createVmsJavaOptionFile(String[] cmds)
throws IOException {
File script = FILE_UTILS.createTempFile("ANT", ".JAVA_OPTS", null, false, true);
try (BufferedWriter out = new BufferedWriter(new FileWriter(script))) {
- for (int i = 0; i < cmd.length; i++) {
- out.write(cmd[i]);
+ for (int i = 0; i < cmds.length; i++) {
+ out.write(cmds[i]);
out.newLine();
}
}
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/KeepAliveInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/KeepAliveInputStream.java b/src/main/org/apache/tools/ant/util/KeepAliveInputStream.java
index debde59..58332b5 100644
--- a/src/main/org/apache/tools/ant/util/KeepAliveInputStream.java
+++ b/src/main/org/apache/tools/ant/util/KeepAliveInputStream.java
@@ -58,6 +58,7 @@ public class KeepAliveInputStream extends FilterInputStream {
* Convenience factory method that returns a non-closing
* InputStream around System.in.
*
+ * @return InputStream
* @since Ant 1.8.0
*/
public static InputStream wrapSystemIn() {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/KeepAliveOutputStream.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/KeepAliveOutputStream.java b/src/main/org/apache/tools/ant/util/KeepAliveOutputStream.java
index 27f3d7e..352b0ba 100644
--- a/src/main/org/apache/tools/ant/util/KeepAliveOutputStream.java
+++ b/src/main/org/apache/tools/ant/util/KeepAliveOutputStream.java
@@ -58,6 +58,7 @@ public class KeepAliveOutputStream extends FilterOutputStream {
* Convenience factory method that returns a non-closing
* PrintStream around System.out.
*
+ * @return PrintStream
* @since Ant 1.8.0
*/
public static PrintStream wrapSystemOut() {
@@ -68,6 +69,7 @@ public class KeepAliveOutputStream extends FilterOutputStream {
* Convenience factory method that returns a non-closing
* PrintStream around System.err.
*
+ * @return PrintStream
* @since Ant 1.8.0
*/
public static PrintStream wrapSystemErr() {
@@ -75,6 +77,7 @@ public class KeepAliveOutputStream extends FilterOutputStream {
}
/**
+ * @return PrintStream
* @since Ant 1.8.0
*/
private static PrintStream wrap(PrintStream ps) {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/LayoutPreservingProperties.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/LayoutPreservingProperties.java b/src/main/org/apache/tools/ant/util/LayoutPreservingProperties.java
index f4f2fe7..47f0784 100644
--- a/src/main/org/apache/tools/ant/util/LayoutPreservingProperties.java
+++ b/src/main/org/apache/tools/ant/util/LayoutPreservingProperties.java
@@ -250,6 +250,7 @@ public class LayoutPreservingProperties extends Properties {
/**
* Save the properties to a file.
* @param dest the file to write to
+ * @throws IOException if save fails
*/
public void saveAs(final File dest) throws IOException {
final OutputStream fos = Files.newOutputStream(dest.toPath());
@@ -273,7 +274,7 @@ public class LayoutPreservingProperties extends Properties {
}
}
- // we may be updatiung a file written by this class, replace
+ // we may be updating a file written by this class, replace
// the date comment instead of adding a new one and preserving
// the one written last time
if (totalLines > skipLines
@@ -308,7 +309,7 @@ public class LayoutPreservingProperties extends Properties {
/**
* Reads a properties file into an internally maintained
- * collection of logical lines (possibly spanning physcial lines),
+ * collection of logical lines (possibly spanning physical lines),
* which make up the comments, blank lines and properties of the
* file.
* @param is the stream from which to read the data
@@ -432,7 +433,7 @@ public class LayoutPreservingProperties extends Properties {
}
/**
- * Unescape the string according to the rules for a Properites
+ * Unescape the string according to the rules for a Properties
* file, as laid out in the docs for <a
* href="http://java.sun.com/j2se/1.3/docs/api/java/util/Properties.html">java.util.Properties</a>.
* @param s the string to unescape (coming from the source file)
@@ -442,7 +443,7 @@ public class LayoutPreservingProperties extends Properties {
/*
* The following combinations are converted:
* \n newline
- * \r carraige return
+ * \r carriage return
* \f form feed
* \t tab
* \\ backslash
@@ -575,7 +576,7 @@ public class LayoutPreservingProperties extends Properties {
}
/**
- * Remove the comments in the leading up the {@link logicalLines}
+ * Remove the comments in the leading up the {@link #logicalLines}
* list leading up to line <code>pos</code>.
* @param pos the line number to which the comments lead
*/
@@ -662,7 +663,7 @@ public class LayoutPreservingProperties extends Properties {
/**
* A key-value pair from the input stream. This may span more than
- * one physical line, but it is constitutes as a single logical
+ * one physical line, but it is constitues as a single logical
* line.
*/
private static class Pair extends LogicalLine implements Cloneable {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/MergingMapper.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/MergingMapper.java b/src/main/org/apache/tools/ant/util/MergingMapper.java
index 9298a73..5d2a1e9 100644
--- a/src/main/org/apache/tools/ant/util/MergingMapper.java
+++ b/src/main/org/apache/tools/ant/util/MergingMapper.java
@@ -34,6 +34,7 @@ public class MergingMapper implements FileNameMapper {
public MergingMapper() {}
/**
+ * @param to String
* @since Ant 1.8.0
*/
public MergingMapper(String to) {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/PermissionUtils.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/PermissionUtils.java b/src/main/org/apache/tools/ant/util/PermissionUtils.java
index ad363f0..a6664fb 100644
--- a/src/main/org/apache/tools/ant/util/PermissionUtils.java
+++ b/src/main/org/apache/tools/ant/util/PermissionUtils.java
@@ -44,7 +44,7 @@ public class PermissionUtils {
private PermissionUtils() { }
/**
- * Translates a set of permissons into a Unix stat(2) {@code
+ * Translates a set of permissions into a Unix stat(2) {@code
* st_mode} result.
* @param permissions the permissions
* @param type the file type
@@ -102,12 +102,13 @@ public class PermissionUtils {
* <li>{@link ArchiveResource}</li>
* </ul>
*
- * @param resource the resource to set permissions for
+ * @param r the resource to set permissions for
* @param permissions the permissions
* @param posixNotSupportedCallback optional callback that is
* invoked for a file provider resource if the file-system holding
* the file doesn't support PosixFilePermissions. The Path
* corresponding to the file is passed to the callback.
+ * @throws IOException if something goes wrong
*/
public static void setPermissions(Resource r, Set<PosixFilePermission> permissions,
Consumer<Path> posixNotSupportedCallback)
@@ -140,12 +141,13 @@ public class PermissionUtils {
* <li>{@link ArchiveResource}</li>
* </ul>
*
- * @param resource the resource to read permissions from
+ * @param r the resource to read permissions from
* @param posixNotSupportedFallback optional fallback function to provide
* permissions for file system that don't support
* PosixFilePermissions. The Path corresponding to the file is
* passed to the callback.
* @return the permissions
+ * @throws IOException if something goes wrong
*/
public static Set<PosixFilePermission> getPermissions(Resource r,
Function<Path, Set<PosixFilePermission>> posixNotSupportedFallback)
@@ -210,6 +212,10 @@ public class PermissionUtils {
/**
* Determines the file type of a {@link Path}.
+ *
+ * @param p Path
+ * @return FileType
+ * @throws IOException if file attributes cannot be read
*/
public static FileType of(Path p) throws IOException {
BasicFileAttributes attrs =
@@ -226,6 +232,9 @@ public class PermissionUtils {
/**
* Determines the file type of a {@link Resource}.
+ *
+ * @param r Resource
+ * @return FileType
*/
public static FileType of(Resource r) {
if (r.isDirectory()) {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/ProcessUtil.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/ProcessUtil.java b/src/main/org/apache/tools/ant/util/ProcessUtil.java
index f6e71b1..998c713 100644
--- a/src/main/org/apache/tools/ant/util/ProcessUtil.java
+++ b/src/main/org/apache/tools/ant/util/ProcessUtil.java
@@ -30,7 +30,7 @@ public class ProcessUtil {
/**
* provide id of the current process
- * @param fallback
+ * @param fallback fallback id
* @return current process id
*/
public static String getProcessId(final String fallback) {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/ReflectUtil.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/ReflectUtil.java b/src/main/org/apache/tools/ant/util/ReflectUtil.java
index 27ba8ce..cd06c08 100644
--- a/src/main/org/apache/tools/ant/util/ReflectUtil.java
+++ b/src/main/org/apache/tools/ant/util/ReflectUtil.java
@@ -42,6 +42,11 @@ public class ReflectUtil {
/**
* Create an instance of a class using the constructor matching
* the given arguments.
+ * @param <T> desired type
+ * @param ofClass Class<T>
+ * @param argTypes Class<?>[]
+ * @param args Object[]
+ * @return class instance
* @since Ant 1.8.0
*/
public static <T> T newInstance(Class<T> ofClass,
@@ -58,6 +63,7 @@ public class ReflectUtil {
/**
* Call a method on the object with no parameters.
+ * @param <T> desired type
* @param obj the object to invoke the method on.
* @param methodName the name of the method to call
* @return the object returned by the method
@@ -77,6 +83,7 @@ public class ReflectUtil {
* Call a method on the object with no parameters.
* Note: Unlike the invoke method above, this
* calls class or static methods, not instance methods.
+ * @param <T> desired type
* @param obj the object to invoke the method on.
* @param methodName the name of the method to call
* @return the object returned by the method
@@ -94,6 +101,7 @@ public class ReflectUtil {
/**
* Call a method on the object with one argument.
+ * @param <T> desired type
* @param obj the object to invoke the method on.
* @param methodName the name of the method to call
* @param argType the type of argument.
@@ -114,6 +122,7 @@ public class ReflectUtil {
/**
* Call a method on the object with two argument.
+ * @param <T> desired type
* @param obj the object to invoke the method on.
* @param methodName the name of the method to call
* @param argType1 the type of the first argument.
@@ -138,6 +147,7 @@ public class ReflectUtil {
/**
* Get the value of a field in an object.
+ * @param <T> desired type
* @param obj the object to look at.
* @param fieldName the name of the field in the object.
* @return the value of the field.
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/ReflectWrapper.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/ReflectWrapper.java b/src/main/org/apache/tools/ant/util/ReflectWrapper.java
index f803c88..2001516 100644
--- a/src/main/org/apache/tools/ant/util/ReflectWrapper.java
+++ b/src/main/org/apache/tools/ant/util/ReflectWrapper.java
@@ -53,6 +53,7 @@ public class ReflectWrapper {
}
/**
+ * @param <T> desired type
* @return the wrapped object.
*/
@SuppressWarnings("unchecked")
@@ -62,6 +63,7 @@ public class ReflectWrapper {
/**
* Call a method on the object with no parameters.
+ * @param <T> desired type
* @param methodName the name of the method to call
* @return the object returned by the method
*/
@@ -71,6 +73,7 @@ public class ReflectWrapper {
/**
* Call a method on the object with one argument.
+ * @param <T> desired type
* @param methodName the name of the method to call
* @param argType the type of argument.
* @param arg the value of the argument.
@@ -82,6 +85,7 @@ public class ReflectWrapper {
/**
* Call a method on the object with one argument.
+ * @param <T> desired type
* @param methodName the name of the method to call
* @param argType1 the type of the first argument.
* @param arg1 the value of the first argument.
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java b/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
index 374da29..a788aa1 100644
--- a/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
+++ b/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
@@ -190,7 +190,7 @@ public abstract class ScriptRunnerBase {
}
/**
- * Whether to use script compilation if available.
+ * Whether to use script compilation if available.
* @since Ant 1.10.2
* @param compiled if true, compile the script if possible.
*/
@@ -236,7 +236,7 @@ public abstract class ScriptRunnerBase {
/**
* Read some source in from the given reader
- * @param reader the reader; this is closed afterwards.
+ * @param in the input stream to pass into a buffered reader.
* @param name the name to use in error messages
* @param charset the encoding for the reader, may be null.
*/
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/ScriptRunnerCreator.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/ScriptRunnerCreator.java b/src/main/org/apache/tools/ant/util/ScriptRunnerCreator.java
index 6ce3c7e..bf3c2c9 100644
--- a/src/main/org/apache/tools/ant/util/ScriptRunnerCreator.java
+++ b/src/main/org/apache/tools/ant/util/ScriptRunnerCreator.java
@@ -101,7 +101,7 @@ public class ScriptRunnerCreator {
* in manager.
* This checks if the script manager exists in the scriptLoader
* classloader and if so it creates and returns the script runner.
- * @param checkManager check if the manager matchs this value.
+ * @param checkManager check if the manager matches this value.
* @param managerClass the name of the script manager class.
* @param runnerClass the name of ant's script runner for this manager.
* @return the script runner class.
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java b/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java
index fc1be2a..efdb1b0 100644
--- a/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java
+++ b/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java
@@ -107,7 +107,7 @@ public class ScriptRunnerHelper {
}
/**
- * Load the script from an external file ; optional.
+ * Load the script from an external file; optional.
*
* @param file the file containing the script source.
*/
@@ -116,7 +116,7 @@ public class ScriptRunnerHelper {
}
/**
- * Get the external script file ; optional.
+ * Get the external script file; optional.
* @return the file containing the script source.
* @since Ant 1.10.2
*/
@@ -125,7 +125,7 @@ public class ScriptRunnerHelper {
}
/**
- * Set the encoding of the script from an external file ; optional.
+ * Set the encoding of the script from an external file; optional.
*
* @param encoding the encoding of the file containing the script source.
* @since Ant 1.10.2
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/SplitClassLoader.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/SplitClassLoader.java b/src/main/org/apache/tools/ant/util/SplitClassLoader.java
index f2b5232..c3f61e3 100644
--- a/src/main/org/apache/tools/ant/util/SplitClassLoader.java
+++ b/src/main/org/apache/tools/ant/util/SplitClassLoader.java
@@ -31,7 +31,10 @@ public final class SplitClassLoader extends AntClassLoader {
private final String[] splitClasses;
/**
- * @param splitClasses classes contained herin will not be loaded
+ * @param parent ClassLoader
+ * @param path Path
+ * @param project Project
+ * @param splitClasses classes contained herein will not be loaded
* via Ant's classloader
*/
public SplitClassLoader(ClassLoader parent, Path path, Project project,
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/StringUtils.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/StringUtils.java b/src/main/org/apache/tools/ant/util/StringUtils.java
index 93b4f90..87157ca 100644
--- a/src/main/org/apache/tools/ant/util/StringUtils.java
+++ b/src/main/org/apache/tools/ant/util/StringUtils.java
@@ -272,9 +272,9 @@ public final class StringUtils {
}
return string;
}
-
+
/**
- * Joins the string representation of the elements of a collection to
+ * Joins the string representation of the elements of a collection to
* a joined string with a given separator.
* @param collection Collection of the data to be joined (may be null)
* @param separator Separator between elements (may be null)
@@ -289,7 +289,7 @@ public final class StringUtils {
}
/**
- * Joins the string representation of the elements of an array to
+ * Joins the string representation of the elements of an array to
* a joined string with a given separator.
* @param array Array of the data to be joined (may be null)
* @param separator Separator between elements (may be null)
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/SymbolicLinkUtils.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/SymbolicLinkUtils.java b/src/main/org/apache/tools/ant/util/SymbolicLinkUtils.java
index 37a74be..46ddf77 100644
--- a/src/main/org/apache/tools/ant/util/SymbolicLinkUtils.java
+++ b/src/main/org/apache/tools/ant/util/SymbolicLinkUtils.java
@@ -120,7 +120,7 @@ public class SymbolicLinkUtils {
*
* <p>Note that #isSymbolicLink returns false if this method
* returns true since Java won't produce a canonical name
- * different from the abolute one if the link is broken.</p>
+ * different from the absolute one if the link is broken.</p>
*
* @param name the name of the file to test.
*
@@ -141,7 +141,7 @@ public class SymbolicLinkUtils {
*
* <p>Note that #isSymbolicLink returns false if this method
* returns true since Java won't produce a canonical name
- * different from the abolute one if the link is broken.</p>
+ * different from the absolute one if the link is broken.</p>
*
* @param file the file to test.
*
@@ -162,7 +162,7 @@ public class SymbolicLinkUtils {
*
* <p>Note that #isSymbolicLink returns false if this method
* returns true since Java won't produce a canonical name
- * different from the abolute one if the link is broken.</p>
+ * different from the absolute one if the link is broken.</p>
*
* @param parent the parent directory of the file to test
* @param name the name of the file to test.
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/TimeoutObserver.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/TimeoutObserver.java b/src/main/org/apache/tools/ant/util/TimeoutObserver.java
index ba2e0c7..c142d3c 100644
--- a/src/main/org/apache/tools/ant/util/TimeoutObserver.java
+++ b/src/main/org/apache/tools/ant/util/TimeoutObserver.java
@@ -29,7 +29,7 @@ package org.apache.tools.ant.util;
public interface TimeoutObserver {
/**
- * Called when the watchdow times out.
+ * Called when the watchdog times out.
*
* @param w the watchdog that timed out.
*/
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/UUEncoder.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/UUEncoder.java b/src/main/org/apache/tools/ant/util/UUEncoder.java
index c42dcab..b0c6737 100644
--- a/src/main/org/apache/tools/ant/util/UUEncoder.java
+++ b/src/main/org/apache/tools/ant/util/UUEncoder.java
@@ -99,11 +99,10 @@ public class UUEncoder {
* Encode a single line of data (less than or equal to 45 characters).
*
* @param data The array of byte data.
- * @param off The starting offset within the data.
+ * @param offset The starting offset within the data.
* @param length Length of the data to encode.
* @param out The output stream the encoded data is written to.
- *
- * @exception IOException
+ * @exception IOException if something goes wrong
*/
private void encodeLine(
byte[] data, int offset, int length, OutputStream out)
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/UnicodeUtil.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/UnicodeUtil.java b/src/main/org/apache/tools/ant/util/UnicodeUtil.java
index d3e5eec..86199d4 100644
--- a/src/main/org/apache/tools/ant/util/UnicodeUtil.java
+++ b/src/main/org/apache/tools/ant/util/UnicodeUtil.java
@@ -29,7 +29,7 @@ public class UnicodeUtil {
/**
* returns the unicode representation of a char without the leading backslash
- * @param ch
+ * @param ch a character
* @return unicode representation of a char for property files
*/
public static StringBuffer EscapeUnicode(char ch) {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/WeakishReference.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/WeakishReference.java b/src/main/org/apache/tools/ant/util/WeakishReference.java
index 1c00102..d7c15b0 100644
--- a/src/main/org/apache/tools/ant/util/WeakishReference.java
+++ b/src/main/org/apache/tools/ant/util/WeakishReference.java
@@ -44,7 +44,7 @@ public class WeakishReference {
* create a new soft reference, which is bound to a
* Weak reference inside
*
- * @param reference
+ * @param reference ditto
* @see java.lang.ref.WeakReference
*/
WeakishReference(Object reference) {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/WorkerAnt.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/WorkerAnt.java b/src/main/org/apache/tools/ant/util/WorkerAnt.java
index 768f387..b22be50 100644
--- a/src/main/org/apache/tools/ant/util/WorkerAnt.java
+++ b/src/main/org/apache/tools/ant/util/WorkerAnt.java
@@ -23,12 +23,12 @@ import org.apache.tools.ant.Task;
/**
* A worker ant executes a single task in a background thread.
- * After the run, any exception thrown is turned into a buildexception, which can be
+ * After the run, any exception thrown is turned into a BuildException, which can be
* rethrown, the finished attribute is set, then notifyAll() is called,
* so that anyone waiting on the same notify object gets woken up.
* <p>
* This class is effectively a superset of
- * {@link org.apache.tools.ant.taskdefs.Parallel.TaskRunnable}
+ * <code>org.apache.tools.ant.taskdefs.Parallel.TaskRunnable</code>
*
* @since Ant 1.8
*/
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/depend/AbstractAnalyzer.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/depend/AbstractAnalyzer.java b/src/main/org/apache/tools/ant/util/depend/AbstractAnalyzer.java
index 3ec4146..d2f0323 100644
--- a/src/main/org/apache/tools/ant/util/depend/AbstractAnalyzer.java
+++ b/src/main/org/apache/tools/ant/util/depend/AbstractAnalyzer.java
@@ -38,7 +38,7 @@ public abstract class AbstractAnalyzer implements DependencyAnalyzer {
/** The source path for the source files */
private Path sourcePath = new Path(null);
- /** The classpath containg dirs and jars of class files */
+ /** The classpath containing dirs and jars of class files */
private Path classPath = new Path(null);
/** The list of root classes */
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/regexp/JakartaOroRegexp.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/regexp/JakartaOroRegexp.java b/src/main/org/apache/tools/ant/util/regexp/JakartaOroRegexp.java
index 928939f..f837d86 100644
--- a/src/main/org/apache/tools/ant/util/regexp/JakartaOroRegexp.java
+++ b/src/main/org/apache/tools/ant/util/regexp/JakartaOroRegexp.java
@@ -79,7 +79,7 @@ public class JakartaOroRegexp extends JakartaOroMatcher implements Regexp {
* Convert ant regexp substitution option to oro options.
*
* @param options the ant regexp options
- * @return the oro substition options
+ * @return the oro substitution options
*/
protected int getSubsOptions(final int options) {
return RegexpUtil.hasFlag(options, REPLACE_ALL) ? Util.SUBSTITUTE_ALL
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java b/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java
index b497b78..781ecf4 100644
--- a/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java
+++ b/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java
@@ -33,7 +33,7 @@ public class JakartaRegexpRegexp extends JakartaRegexpMatcher
* Convert ant regexp substitution option to apache regex options.
*
* @param options the ant regexp options
- * @return the apache regex substition options
+ * @return the apache regex substitution options
*/
protected int getSubsOptions(int options) {
int subsOptions = RE.REPLACE_FIRSTONLY;
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java b/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java
index 76d2789..55fe893 100644
--- a/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java
+++ b/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java
@@ -33,7 +33,7 @@ public class Jdk14RegexpRegexp extends Jdk14RegexpMatcher implements Regexp {
* Convert ant regexp substitution option to jdk1.4 options.
*
* @param options the ant regexp options
- * @return the jdk14 substition options
+ * @return the jdk14 substitution options
*/
protected int getSubsOptions(int options) {
int subsOptions = REPLACE_FIRST;
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java b/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java
index 22d5888..b34645c 100644
--- a/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java
+++ b/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java
@@ -100,7 +100,7 @@ public class RegexpMatcherFactory {
public static boolean regexpMatcherPresent(Project project) {
try {
// The factory throws a BuildException if no usable matcher
- // cannot be instantiated. We dont need the matcher itself here.
+ // cannot be instantiated. We don't need the matcher itself here.
new RegexpMatcherFactory().newRegexpMatcher(project);
return true;
} catch (Throwable ex) {
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/ant/util/regexp/RegexpUtil.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/regexp/RegexpUtil.java b/src/main/org/apache/tools/ant/util/regexp/RegexpUtil.java
index df2b2fd..dcd00b4 100644
--- a/src/main/org/apache/tools/ant/util/regexp/RegexpUtil.java
+++ b/src/main/org/apache/tools/ant/util/regexp/RegexpUtil.java
@@ -50,10 +50,10 @@ public class RegexpUtil {
/**
* convert regex option flag characters to regex options
* <dl>
- * <li>g - Regexp.REPLACE_ALL</li>
- * <li>i - RegexpMatcher.MATCH_CASE_INSENSITIVE</li>
- * <li>m - RegexpMatcher.MATCH_MULTILINE</li>
- * <li>s - RegexpMatcher.MATCH_SINGLELINE</li>
+ * <dt>g</dt><dd>Regexp.REPLACE_ALL</dd>
+ * <dt>i</dt><dd>RegexpMatcher.MATCH_CASE_INSENSITIVE</dd>
+ * <dt>m</dt><dd>RegexpMatcher.MATCH_MULTILINE</dd>
+ * <dt>s</dt><dd>RegexpMatcher.MATCH_SINGLELINE</dd>
* </dl>
* @param flags the string containing the flags
* @return the Regexp option bits
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/bzip2/BlockSort.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/bzip2/BlockSort.java b/src/main/org/apache/tools/bzip2/BlockSort.java
index 46c6a5c..0a50fdf 100644
--- a/src/main/org/apache/tools/bzip2/BlockSort.java
+++ b/src/main/org/apache/tools/bzip2/BlockSort.java
@@ -141,7 +141,7 @@ class BlockSort {
/**
* Array instance identical to Data's sfmap, both are used only
- * temporarily and indepently, so we do not need to allocate
+ * temporarily and independently, so we do not need to allocate
* additional memory.
*/
private final char[] quadrant;
@@ -467,7 +467,6 @@ class BlockSort {
* partially sorted order
* @param block the original data
* @param nblock size of the block
- * @param off offset of first byte to sort in block
*/
final void fallbackSort(int[] fmap, byte[] block, int nblock) {
final int[] ftab = new int[257];
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/bzip2/CBZip2InputStream.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/bzip2/CBZip2InputStream.java b/src/main/org/apache/tools/bzip2/CBZip2InputStream.java
index 73b6aa1..7563a40 100644
--- a/src/main/org/apache/tools/bzip2/CBZip2InputStream.java
+++ b/src/main/org/apache/tools/bzip2/CBZip2InputStream.java
@@ -108,7 +108,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants {
/**
* Constructs a new CBZip2InputStream which decompresses bytes read from
- * the specified stream. This doesn't suppprt decompressing
+ * the specified stream. This doesn't support decompressing
* concatenated .bz2 files.
*
* <p>Although BZip2 headers are marked with the magic
@@ -117,6 +117,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants {
* to skip the first two bytes. Otherwise this constructor will
* throw an exception. </p>
*
+ * @param in InputStream
* @throws IOException
* if the stream content is malformed or an I/O error occurs.
* @throws NullPointerException
@@ -691,7 +692,6 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants {
if (thech >= 0) {
bsBuffShadow = (bsBuffShadow << 8) | thech;
bsLiveShadow += 8;
- continue;
} else {
throw new IOException("unexpected end of stream");
}
@@ -706,7 +706,6 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants {
if (thech >= 0) {
bsBuffShadow = (bsBuffShadow << 8) | thech;
bsLiveShadow += 8;
- continue;
} else {
throw new IOException("unexpected end of stream");
}
@@ -771,7 +770,6 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants {
if (thech >= 0) {
bsBuffShadow = (bsBuffShadow << 8) | thech;
bsLiveShadow += 8;
- continue;
} else {
throw new IOException("unexpected end of stream");
}
@@ -786,7 +784,6 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants {
if (thech >= 0) {
bsBuffShadow = (bsBuffShadow << 8) | thech;
bsLiveShadow += 8;
- continue;
} else {
throw new IOException("unexpected end of stream");
}
@@ -822,7 +819,6 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants {
if (thech >= 0) {
bsBuffShadow = (bsBuffShadow << 8) | thech;
bsLiveShadow += 8;
- continue;
} else {
throw new IOException("unexpected end of stream");
}
http://git-wip-us.apache.org/repos/asf/ant/blob/6656db28/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java b/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java
index 01e2342..dd118ea 100644
--- a/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java
+++ b/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java
@@ -37,36 +37,32 @@ import java.io.OutputStream;
* <tt>CBZip2OutputStream</tt> to release the allocated memory.
* </p>
*
- * <p> You can shrink the amount of allocated memory and maybe raise
+ * <p>You can shrink the amount of allocated memory and maybe raise
* the compression speed by choosing a lower blocksize, which in turn
* may cause a lower compression ratio. You can avoid unnecessary
* memory allocation by avoiding using a blocksize which is bigger
- * than the size of the input. </p>
+ * than the size of the input.</p>
*
- * <p> You can compute the memory usage for compressing by the
- * following formula: </p>
+ * <p>You can compute the memory usage for compressing by the
+ * following formula:</p>
*
* <pre>
* <code>400k + (9 * blocksize)</code>.
* </pre>
*
- * <p> To get the memory required for decompression by {@link
- * CBZip2InputStream CBZip2InputStream} use </p>
+ * <p>To get the memory required for decompression by {@link
+ * CBZip2InputStream CBZip2InputStream} use</p>
*
* <pre>
* <code>65k + (5 * blocksize)</code>.
* </pre>
*
- * <table width="100%" border="1">
- * <colgroup> <col width="33%" /> <col width="33%" /> <col width="33%" />
- * </colgroup>
+ * <table border="1">
+ * <caption>Memory usage by blocksize</caption>
* <tr>
- * <th colspan="3">Memory usage by blocksize</th>
- * </tr>
- * <tr>
- * <th align="right">Blocksize</th> <th align="right">Compression<br>
- * memory usage</th> <th align="right">Decompression<br>
- * memory usage</th>
+ * <th align="right">Blocksize</th>
+ * <th align="right">Compression<br>memory usage</th>
+ * <th align="right">Decompression<br>memory usage</th>
* </tr>
* <tr>
* <td align="right">100k</td>
@@ -195,10 +191,10 @@ public class CBZip2OutputStream extends OutputStream
* This constant is accessible by subclasses for historical
* purposes. If you don't know what it means then you don't need
* it.
- * <p> If you are ever unlucky/improbable enough to get a stack
+ * <p>If you are ever unlucky/improbable enough to get a stack
* overflow whilst sorting, increase the following constant and
* try again. In practice I have never seen the stack go above 27
- * elems, so the following limit seems very generous. </p>
+ * elems, so the following limit seems very generous.</p>
*/
protected static final int QSORT_STACK_SIZE = 1000;
@@ -215,6 +211,11 @@ public class CBZip2OutputStream extends OutputStream
* This method is accessible by subclasses for historical
* purposes. If you don't know what it does then you don't need
* it.
+ *
+ * @param len char[]
+ * @param freq char[]
+ * @param alphaSize int
+ * @param maxLen int
*/
protected static void hbMakeCodeLengths(char[] len, int[] freq,
int alphaSize, int maxLen) {
@@ -560,14 +561,13 @@ public class CBZip2OutputStream extends OutputStream
/**
* Chooses a blocksize based on the given length of the data to compress.
*
+ * @param inputLength
+ * The length of the data which will be compressed by
+ * <tt>CBZip2OutputStream</tt>.
* @return The blocksize, between {@link #MIN_BLOCKSIZE} and
* {@link #MAX_BLOCKSIZE} both inclusive. For a negative
* <tt>inputLength</tt> this method returns <tt>MAX_BLOCKSIZE</tt>
* always.
- *
- * @param inputLength
- * The length of the data which will be compressed by
- * <tt>CBZip2OutputStream</tt>.
*/
public static int chooseBlockSize(long inputLength) {
return (inputLength > 0) ? (int) Math
@@ -814,7 +814,7 @@ public class CBZip2OutputStream extends OutputStream
* is about 2.0e-3 for 32 bits, 1.0e-5 for 40 bits and 4.0e-8 for 48
* bits. For a compressed file of size 100Gb -- about 100000 blocks --
* only a 48-bit marker will do. NB: normal compression/ decompression
- * donot rely on these statistical properties. They are only important
+ * do not rely on these statistical properties. They are only important
* when trying to recover blocks from damaged files.
*/
bsPutUByte(0x31);
@@ -854,6 +854,8 @@ public class CBZip2OutputStream extends OutputStream
/**
* Returns the blocksize parameter specified at construction time.
+ *
+ * @return int
*/
public final int getBlockSize() {
return this.blockSize100k;