From 67f29ce0c2ad332570c0a1382c79532cee66dce8 Mon Sep 17 00:00:00 2001 From: Gintas Grigelionis Date: Sun, 10 Dec 2017 07:12:42 +0100 Subject: [PATCH 1/3] =?UTF-8?q?Let=E2=80=99s=20use=20doclint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.xml | 11 +- .../org/apache/tools/ant/AntClassLoader.java | 10 +- .../apache/tools/ant/ArgumentProcessor.java | 16 +++ .../org/apache/tools/ant/ComponentHelper.java | 4 +- .../org/apache/tools/ant/Diagnostics.java | 10 +- .../apache/tools/ant/DirectoryScanner.java | 35 +++-- .../apache/tools/ant/IntrospectionHelper.java | 4 +- src/main/org/apache/tools/ant/MagicNames.java | 4 +- src/main/org/apache/tools/ant/Main.java | 3 - src/main/org/apache/tools/ant/Project.java | 33 +++-- .../apache/tools/ant/ProjectComponent.java | 2 +- .../org/apache/tools/ant/ProjectHelper.java | 14 +- .../tools/ant/ProjectHelperRepository.java | 4 +- .../org/apache/tools/ant/PropertyHelper.java | 13 +- .../apache/tools/ant/RuntimeConfigurable.java | 23 ++-- src/main/org/apache/tools/ant/Target.java | 2 + .../org/apache/tools/ant/TaskAdapter.java | 2 +- .../tools/ant/TaskConfigurationChecker.java | 2 +- .../tools/ant/dispatch/DispatchTask.java | 3 +- .../ant/filters/BaseParamFilterReader.java | 2 +- .../tools/ant/filters/ClassConstants.java | 5 +- .../tools/ant/filters/ExpandProperties.java | 3 +- .../tools/ant/filters/FixCrLfFilter.java | 25 ++-- .../tools/ant/filters/LineContainsRegExp.java | 4 +- .../tools/ant/filters/ReplaceTokens.java | 1 + .../apache/tools/ant/filters/SortFilter.java | 14 +- .../tools/ant/helper/AntXMLContext.java | 11 +- .../tools/ant/helper/ProjectHelper2.java | 16 +-- .../tools/ant/helper/ProjectHelperImpl.java | 4 +- .../tools/ant/helper/SingleCheckExecutor.java | 2 - .../org/apache/tools/ant/launch/Launcher.java | 5 +- .../org/apache/tools/ant/launch/Locator.java | 4 +- .../tools/ant/listener/AnsiColorLogger.java | 2 +- .../tools/ant/listener/BigProjectLogger.java | 8 +- .../ant/listener/CommonsLoggingListener.java | 10 +- .../tools/ant/listener/Log4jListener.java | 13 +- .../apache/tools/ant/listener/MailLogger.java | 2 - .../tools/ant/taskdefs/AbstractCvsTask.java | 19 ++- .../ant/taskdefs/AbstractJarSignerTask.java | 4 +- .../org/apache/tools/ant/taskdefs/Ant.java | 5 +- .../ant/taskdefs/AttributeNamespaceDef.java | 2 +- .../apache/tools/ant/taskdefs/Available.java | 2 +- .../tools/ant/taskdefs/BuildNumber.java | 2 +- .../org/apache/tools/ant/taskdefs/Concat.java | 3 +- .../org/apache/tools/ant/taskdefs/Copy.java | 6 +- .../org/apache/tools/ant/taskdefs/Delete.java | 26 +++- .../apache/tools/ant/taskdefs/DependSet.java | 1 + .../org/apache/tools/ant/taskdefs/Echo.java | 1 + .../apache/tools/ant/taskdefs/EchoXML.java | 3 +- .../apache/tools/ant/taskdefs/ExecTask.java | 2 + .../apache/tools/ant/taskdefs/Execute.java | 4 +- .../org/apache/tools/ant/taskdefs/Expand.java | 9 ++ .../apache/tools/ant/taskdefs/FixCRLF.java | 2 +- .../org/apache/tools/ant/taskdefs/Get.java | 9 +- .../apache/tools/ant/taskdefs/ImportTask.java | 7 + .../apache/tools/ant/taskdefs/JDBCTask.java | 4 +- .../org/apache/tools/ant/taskdefs/Jar.java | 5 +- .../org/apache/tools/ant/taskdefs/Javac.java | 4 + .../apache/tools/ant/taskdefs/Javadoc.java | 12 +- .../tools/ant/taskdefs/LoadProperties.java | 1 + .../tools/ant/taskdefs/LogOutputStream.java | 2 +- .../apache/tools/ant/taskdefs/MakeUrl.java | 2 +- .../apache/tools/ant/taskdefs/Manifest.java | 4 +- .../tools/ant/taskdefs/ManifestTask.java | 2 + .../tools/ant/taskdefs/MatchingTask.java | 2 +- .../org/apache/tools/ant/taskdefs/Move.java | 9 +- .../org/apache/tools/ant/taskdefs/Pack.java | 2 +- .../apache/tools/ant/taskdefs/Property.java | 6 +- .../tools/ant/taskdefs/PumpStreamHandler.java | 1 + .../apache/tools/ant/taskdefs/Recorder.java | 3 +- .../tools/ant/taskdefs/RecorderEntry.java | 27 ++-- .../apache/tools/ant/taskdefs/Redirector.java | 2 + .../apache/tools/ant/taskdefs/Replace.java | 12 +- .../org/apache/tools/ant/taskdefs/Rmic.java | 10 +- .../apache/tools/ant/taskdefs/SQLExec.java | 13 ++ .../apache/tools/ant/taskdefs/Sequential.java | 3 +- .../apache/tools/ant/taskdefs/SignJar.java | 8 +- .../org/apache/tools/ant/taskdefs/SubAnt.java | 18 ++- .../org/apache/tools/ant/taskdefs/Sync.java | 8 +- .../apache/tools/ant/taskdefs/TempFile.java | 2 +- .../org/apache/tools/ant/taskdefs/Tstamp.java | 2 + .../org/apache/tools/ant/taskdefs/Untar.java | 5 +- .../apache/tools/ant/taskdefs/WaitFor.java | 2 +- .../tools/ant/taskdefs/XSLTLiaison.java | 2 +- .../tools/ant/taskdefs/XSLTLiaison2.java | 2 +- .../tools/ant/taskdefs/XSLTProcess.java | 41 +++++- .../tools/ant/taskdefs/XmlProperty.java | 8 +- .../org/apache/tools/ant/taskdefs/Zip.java | 22 ++- .../compilers/DefaultCompilerAdapter.java | 2 +- .../ant/taskdefs/compilers/JavacExternal.java | 6 +- .../tools/ant/taskdefs/condition/Http.java | 4 +- .../taskdefs/condition/IsLastModified.java | 4 +- .../ant/taskdefs/condition/IsReachable.java | 2 +- .../tools/ant/taskdefs/condition/Os.java | 8 +- .../taskdefs/condition/ResourceExists.java | 2 + .../ant/taskdefs/cvslib/ChangeLogTask.java | 49 +++---- .../tools/ant/taskdefs/cvslib/CvsTagDiff.java | 16 +-- .../ant/taskdefs/email/EmailAddress.java | 6 +- .../tools/ant/taskdefs/email/EmailTask.java | 5 + .../tools/ant/taskdefs/email/Mailer.java | 11 +- .../taskdefs/launcher/CommandLauncher.java | 12 ++ .../tools/ant/taskdefs/optional/ANTLR.java | 2 +- .../ant/taskdefs/optional/EchoProperties.java | 129 +++++++++--------- .../tools/ant/taskdefs/optional/Javah.java | 3 + .../ant/taskdefs/optional/Native2Ascii.java | 10 +- .../tools/ant/taskdefs/optional/NetRexxC.java | 8 +- .../ant/taskdefs/optional/PropertyFile.java | 31 +++-- .../ant/taskdefs/optional/ReplaceRegExp.java | 24 ++-- .../tools/ant/taskdefs/optional/Rpm.java | 2 +- .../ant/taskdefs/optional/SchemaValidate.java | 4 +- .../tools/ant/taskdefs/optional/Script.java | 2 +- .../ant/taskdefs/optional/TraXLiaison.java | 1 - .../taskdefs/optional/XMLValidateTask.java | 6 +- .../taskdefs/optional/ccm/CCMCreateTask.java | 14 +- .../taskdefs/optional/ccm/CCMReconfigure.java | 4 +- .../optional/clearcase/CCCheckin.java | 1 + .../optional/clearcase/CCCheckout.java | 1 + .../taskdefs/optional/clearcase/CCLock.java | 1 + .../taskdefs/optional/clearcase/CCMkattr.java | 1 + .../taskdefs/optional/clearcase/CCMkbl.java | 1 + .../taskdefs/optional/clearcase/CCMkdir.java | 1 + .../taskdefs/optional/clearcase/CCMkelem.java | 1 + .../optional/clearcase/CCMklabel.java | 1 + .../optional/clearcase/CCMklbtype.java | 1 + .../taskdefs/optional/clearcase/CCRmtype.java | 3 +- .../optional/clearcase/CCUnCheckout.java | 1 + .../taskdefs/optional/clearcase/CCUnlock.java | 1 + .../taskdefs/optional/clearcase/CCUpdate.java | 1 + .../ant/taskdefs/optional/depend/Depend.java | 2 +- .../constantpool/MethodHandleCPInfo.java | 2 +- .../optional/ejb/DescriptorHandler.java | 2 +- .../ant/taskdefs/optional/ejb/EjbJar.java | 8 +- .../optional/ejb/GenericDeploymentTool.java | 6 +- .../optional/ejb/IPlanetDeploymentTool.java | 12 +- .../taskdefs/optional/ejb/IPlanetEjbc.java | 34 ++--- .../optional/ejb/JbossDeploymentTool.java | 1 - .../optional/ejb/OrionDeploymentTool.java | 7 +- .../optional/ejb/WebsphereDeploymentTool.java | 8 +- .../optional/extension/Compatability.java | 2 +- .../optional/extension/Compatibility.java | 2 +- .../optional/extension/ExtensionUtil.java | 6 +- .../extension/JarLibAvailableTask.java | 2 +- .../optional/extension/JarLibDisplayTask.java | 2 +- .../extension/JarLibManifestTask.java | 4 +- .../optional/extension/JarLibResolveTask.java | 2 +- .../optional/extension/LibFileSet.java | 2 +- .../optional/extension/LibraryDisplayer.java | 2 +- .../optional/extension/Specification.java | 6 +- .../ant/taskdefs/optional/i18n/Translate.java | 6 +- .../ant/taskdefs/optional/image/Image.java | 5 + .../j2ee/AbstractHotDeploymentTool.java | 10 +- .../optional/j2ee/JonasHotDeploymentTool.java | 14 +- .../j2ee/WebLogicHotDeploymentTool.java | 27 ++-- .../ant/taskdefs/optional/javacc/JJTree.java | 8 +- .../optional/jdepend/JDependTask.java | 2 +- .../taskdefs/optional/jlink/JlinkTask.java | 4 +- .../tools/ant/taskdefs/optional/jsp/JspC.java | 18 +-- .../compilers/DefaultJspCompilerAdapter.java | 2 +- .../jsp/compilers/JspCompilerAdapter.java | 2 +- .../ant/taskdefs/optional/junit/BaseTest.java | 2 + .../taskdefs/optional/junit/BatchTest.java | 8 +- .../junit/BriefJUnitResultFormatter.java | 4 +- .../optional/junit/FailureRecorder.java | 8 +- .../optional/junit/FormatterElement.java | 54 ++++---- .../optional/junit/IgnoredTestListener.java | 6 +- .../taskdefs/optional/junit/JUnitTask.java | 74 +++++----- .../taskdefs/optional/junit/JUnitTest.java | 6 +- .../optional/junit/JUnitTestRunner.java | 77 ++++++----- .../junit/PlainJUnitResultFormatter.java | 2 +- .../taskdefs/optional/junit/XMLConstants.java | 10 +- .../junit/XMLJUnitResultFormatter.java | 4 +- .../optional/junit/XMLResultAggregator.java | 17 +-- .../native2ascii/DefaultNative2Ascii.java | 2 +- .../tools/ant/taskdefs/optional/net/FTP.java | 21 +-- .../ant/taskdefs/optional/net/FTPTask.java | 1 + .../optional/net/FTPTaskMirrorImpl.java | 10 +- .../ant/taskdefs/optional/pvcs/Pvcs.java | 4 +- .../tools/ant/taskdefs/optional/sos/SOS.java | 8 +- .../ant/taskdefs/optional/sos/SOSCheckin.java | 7 +- .../taskdefs/optional/sos/SOSCheckout.java | 7 +- .../ant/taskdefs/optional/sos/SOSGet.java | 7 +- .../ant/taskdefs/optional/sos/SOSLabel.java | 8 +- .../ant/taskdefs/optional/sos/package.html | 8 +- .../optional/ssh/AbstractSshMessage.java | 5 +- .../ant/taskdefs/optional/ssh/SSHBase.java | 6 +- .../ant/taskdefs/optional/ssh/SSHExec.java | 12 +- .../ant/taskdefs/optional/ssh/SSHSession.java | 5 +- .../tools/ant/taskdefs/optional/ssh/Scp.java | 27 ++-- .../taskdefs/optional/ssh/ScpToMessage.java | 5 + .../optional/ssh/ScpToMessageBySftp.java | 2 +- .../taskdefs/optional/testing/Funtest.java | 19 +-- .../optional/unix/AbstractAccessTask.java | 4 +- .../ant/taskdefs/optional/unix/Chgrp.java | 4 +- .../ant/taskdefs/optional/unix/Chown.java | 4 +- .../ant/taskdefs/optional/unix/Symlink.java | 36 ++--- .../ant/taskdefs/optional/vss/MSVSS.java | 11 +- .../ant/taskdefs/optional/vss/MSVSSADD.java | 2 +- .../taskdefs/optional/vss/MSVSSCHECKOUT.java | 2 +- .../ant/taskdefs/optional/vss/MSVSSCP.java | 2 +- .../taskdefs/optional/vss/MSVSSCREATE.java | 2 +- .../ant/taskdefs/optional/vss/MSVSSGET.java | 2 +- .../taskdefs/optional/vss/MSVSSHISTORY.java | 2 +- .../ant/taskdefs/optional/vss/MSVSSLABEL.java | 2 +- .../tools/ant/types/AbstractFileSet.java | 4 + .../apache/tools/ant/types/Assertions.java | 6 +- .../apache/tools/ant/types/Commandline.java | 38 +++--- .../tools/ant/types/CommandlineJava.java | 2 +- .../org/apache/tools/ant/types/DataType.java | 4 +- .../tools/ant/types/EnumeratedAttribute.java | 2 +- .../org/apache/tools/ant/types/FileList.java | 2 +- src/main/org/apache/tools/ant/types/Path.java | 32 ++--- .../apache/tools/ant/types/Quantifier.java | 24 ++-- .../tools/ant/types/RedirectorElement.java | 1 + .../org/apache/tools/ant/types/Resource.java | 6 +- .../tools/ant/types/ResourceLocation.java | 5 +- .../apache/tools/ant/types/Substitution.java | 1 - .../apache/tools/ant/types/XMLCatalog.java | 32 ++--- .../ant/types/mappers/CutDirsMapper.java | 1 + .../optional/AbstractScriptComponent.java | 2 +- .../ant/types/optional/ScriptFilter.java | 4 +- .../ant/types/optional/ScriptMapper.java | 2 +- .../ant/types/optional/ScriptSelector.java | 4 +- .../types/optional/depend/DependScanner.java | 14 +- .../types/optional/image/DrawOperation.java | 2 +- .../ant/types/optional/image/Ellipse.java | 2 +- .../ant/types/optional/image/Rotate.java | 6 +- .../ant/types/resolver/ApacheCatalog.java | 4 +- .../types/resolver/ApacheCatalogResolver.java | 4 +- .../resources/AbstractClasspathResource.java | 13 +- .../ant/types/resources/ArchiveResource.java | 2 +- .../tools/ant/types/resources/Archives.java | 17 +++ .../BaseResourceCollectionContainer.java | 1 + .../ContentTransformingResource.java | 6 +- .../LazyResourceCollectionWrapper.java | 2 +- .../types/resources/LogOutputResource.java | 2 +- .../resources/MappedResourceCollection.java | 1 + .../types/resources/ResourceDecorator.java | 1 + .../ant/types/resources/ResourceList.java | 19 ++- .../tools/ant/types/resources/Resources.java | 1 + .../types/resources/SizeLimitCollection.java | 6 +- .../ant/types/resources/URLResource.java | 2 + .../tools/ant/types/resources/Union.java | 5 +- .../ant/types/resources/ZipResource.java | 1 + .../types/resources/comparators/Content.java | 2 +- .../ant/types/resources/selectors/Name.java | 2 +- .../selectors/ResourceSelectorContainer.java | 8 +- .../ant/types/selectors/BaseSelector.java | 1 + .../ant/types/selectors/DateSelector.java | 1 - .../types/selectors/DifferentSelector.java | 5 +- .../ant/types/selectors/PresentSelector.java | 2 +- .../ant/types/selectors/SizeSelector.java | 4 +- .../ant/types/selectors/TokenizedPath.java | 8 +- .../ant/types/selectors/TokenizedPattern.java | 17 +++ .../modifiedselector/ChecksumAlgorithm.java | 13 +- .../modifiedselector/DigestAlgorithm.java | 21 +-- .../modifiedselector/HashvalueAlgorithm.java | 2 +- .../modifiedselector/ModifiedSelector.java | 45 +++--- .../modifiedselector/PropertiesfileCache.java | 13 +- .../apache/tools/ant/util/ClasspathUtils.java | 22 ++- .../ant/util/ConcatResourceInputStream.java | 2 +- .../tools/ant/util/DOMElementWriter.java | 5 +- .../org/apache/tools/ant/util/DateUtils.java | 23 +++- .../org/apache/tools/ant/util/FileUtils.java | 28 ++-- .../tools/ant/util/GlobPatternMapper.java | 1 + .../apache/tools/ant/util/IdentityStack.java | 1 + .../apache/tools/ant/util/JavaEnvUtils.java | 11 +- .../tools/ant/util/KeepAliveInputStream.java | 1 + .../tools/ant/util/KeepAliveOutputStream.java | 3 + .../ant/util/LayoutPreservingProperties.java | 13 +- .../apache/tools/ant/util/MergingMapper.java | 1 + .../apache/tools/ant/util/ProcessUtil.java | 2 +- .../apache/tools/ant/util/ReflectUtil.java | 5 + .../tools/ant/util/ScriptRunnerBase.java | 2 +- .../tools/ant/util/ScriptRunnerCreator.java | 2 +- .../tools/ant/util/ScriptRunnerHelper.java | 2 +- .../tools/ant/util/SplitClassLoader.java | 5 +- .../tools/ant/util/SymbolicLinkUtils.java | 6 +- .../tools/ant/util/TimeoutObserver.java | 2 +- .../org/apache/tools/ant/util/UUEncoder.java | 5 +- .../apache/tools/ant/util/UnicodeUtil.java | 2 +- .../tools/ant/util/WeakishReference.java | 2 +- .../org/apache/tools/ant/util/WorkerAnt.java | 4 +- .../ant/util/depend/AbstractAnalyzer.java | 2 +- .../ant/util/regexp/JakartaOroRegexp.java | 2 +- .../ant/util/regexp/JakartaRegexpRegexp.java | 2 +- .../ant/util/regexp/Jdk14RegexpRegexp.java | 2 +- .../ant/util/regexp/RegexpMatcherFactory.java | 2 +- .../tools/ant/util/regexp/RegexpUtil.java | 8 +- .../org/apache/tools/bzip2/BlockSort.java | 3 +- .../apache/tools/bzip2/CBZip2InputStream.java | 8 +- .../tools/bzip2/CBZip2OutputStream.java | 46 ++++--- .../org/apache/tools/mail/MailMessage.java | 16 ++- .../apache/tools/mail/SmtpResponseReader.java | 4 +- src/main/org/apache/tools/tar/TarEntry.java | 36 +++-- .../org/apache/tools/tar/TarInputStream.java | 7 +- .../org/apache/tools/tar/TarOutputStream.java | 14 +- src/main/org/apache/tools/tar/TarUtils.java | 2 + .../tools/zip/AbstractUnicodeExtraField.java | 2 +- .../org/apache/tools/zip/AsiExtraField.java | 4 +- .../org/apache/tools/zip/ExtraFieldUtils.java | 2 + .../apache/tools/zip/FallbackZipEncoding.java | 11 +- .../apache/tools/zip/GeneralPurposeBit.java | 22 ++- .../org/apache/tools/zip/NioZipEncoding.java | 9 +- .../tools/zip/Simple8BitZipEncoding.java | 9 +- .../tools/zip/UnicodeCommentExtraField.java | 5 +- .../tools/zip/UnicodePathExtraField.java | 7 +- .../tools/zip/UnparseableExtraFieldData.java | 4 +- .../zip/UnsupportedZipFeatureException.java | 4 + .../Zip64ExtendedInformationExtraField.java | 30 +++- .../org/apache/tools/zip/ZipEncoding.java | 4 +- src/main/org/apache/tools/zip/ZipEntry.java | 48 ++++++- src/main/org/apache/tools/zip/ZipFile.java | 9 +- .../org/apache/tools/zip/ZipOutputStream.java | 82 ++++++++++- src/main/org/apache/tools/zip/ZipUtil.java | 18 +++ .../core/uuencode/src/task/BaseTask.java | 1 + .../org/apache/tools/ant/BuildFileRule.java | 7 +- .../org/apache/tools/ant/BuildFileTest.java | 59 +++++--- .../org/apache/tools/ant/ImmutableTest.java | 1 + .../tools/ant/PropertyExpansionTest.java | 3 +- .../apache/tools/ant/taskdefs/AntTest.java | 1 - .../apache/tools/ant/taskdefs/DeleteTest.java | 2 +- .../tools/ant/taskdefs/MacroDefTest.java | 7 + .../ant/taskdefs/ManifestClassPathTest.java | 1 - .../tools/ant/taskdefs/ParallelTest.java | 4 +- .../apache/tools/ant/taskdefs/RenameTest.java | 1 + .../tools/ant/taskdefs/RmicAdvancedTest.java | 5 - .../tools/ant/taskdefs/SQLExecTest.java | 11 +- .../ant/taskdefs/condition/TypeFoundTest.java | 1 - .../optional/AbstractXSLTLiaisonTest.java | 14 +- .../taskdefs/optional/TraXLiaisonTest.java | 4 +- .../taskdefs/optional/XmlValidateTest.java | 1 - .../tools/ant/taskdefs/optional/XsltTest.java | 1 - .../tools/ant/types/AbstractFileSetTest.java | 1 - .../tools/ant/types/CommandlineJavaTest.java | 1 - .../tools/ant/types/CommandlineTest.java | 3 +- .../apache/tools/ant/types/DirSetTest.java | 4 +- .../ant/types/EnumeratedAttributeTest.java | 1 - .../apache/tools/ant/types/FileSetTest.java | 6 +- .../tools/ant/types/FlexIntegerTest.java | 2 +- .../tools/ant/types/PatternSetTest.java | 3 +- .../tools/ant/types/PermissionsTest.java | 3 +- .../tools/ant/types/TarFileSetTest.java | 7 +- .../tools/ant/types/XMLCatalogTest.java | 5 +- .../tools/ant/types/ZipFileSetTest.java | 5 +- .../ant/types/mappers/GlobMapperTest.java | 2 + .../types/resources/MultiRootFileSetTest.java | 1 - .../ant/types/selectors/BaseSelectorRule.java | 8 ++ .../ant/types/selectors/BaseSelectorTest.java | 29 ++-- .../types/selectors/ContainsSelectorTest.java | 4 - .../types/selectors/ModifiedSelectorTest.java | 57 +------- .../ant/types/selectors/SizeSelectorTest.java | 1 + .../tools/ant/util/DeweyDecimalTest.java | 3 +- .../util/LayoutPreservingPropertiesTest.java | 2 +- .../util/LineOrientedOutputStreamTest.java | 2 + .../util/regexp/JakartaOroMatcherTest.java | 4 - .../ant/util/regexp/JakartaOroRegexpTest.java | 4 - .../util/regexp/JakartaRegexpMatcherTest.java | 15 +- .../util/regexp/JakartaRegexpRegexpTest.java | 14 +- .../util/regexp/Jdk14RegexpMatcherTest.java | 20 +-- .../util/regexp/Jdk14RegexpRegexpTest.java | 20 +-- .../ant/util/regexp/RegexpMatcherTest.java | 32 +++-- .../tools/ant/util/regexp/RegexpTest.java | 12 +- .../apache/tools/mail/MailMessageTest.java | 6 - .../apache/tools/zip/ExtraFieldUtilsTest.java | 3 +- .../org/apache/tools/zip/ZipEntryTest.java | 3 +- .../org/apache/tools/zip/ZipShortTest.java | 3 +- 366 files changed, 1915 insertions(+), 1276 deletions(-) diff --git a/build.xml b/build.xml index ffa86f1b8..b14be72e0 100644 --- a/build.xml +++ b/build.xml @@ -1435,16 +1435,15 @@ description="--> creates the API documentation" unless="javadoc.notrequired"> + maxmemory="1000M" + verbose="${javadoc.verbose}"> @@ -1476,8 +1475,7 @@ version="true" locale="en" windowtitle="${Name} Test Utilities" - doctitle="${Name}" - additionalparam="${javadoc.doclint.none}"> + doctitle="${Name}"> @@ -1634,6 +1632,7 @@ ${antunit.reports} fork="${junit.fork}" forkmode="${junit.forkmode}" threads="${junit.threads}" + tempdir="${build.dir}" failureproperty="junit.failed" errorproperty="junit.failed" filtertrace="${junit.filtertrace}"> diff --git a/src/main/org/apache/tools/ant/AntClassLoader.java b/src/main/org/apache/tools/ant/AntClassLoader.java index 9fa9eae2b..9f22011e3 100644 --- a/src/main/org/apache/tools/ant/AntClassLoader.java +++ b/src/main/org/apache/tools/ant/AntClassLoader.java @@ -928,8 +928,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 getNamedResources(final String name) @@ -1561,6 +1561,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, diff --git a/src/main/org/apache/tools/ant/ArgumentProcessor.java b/src/main/org/apache/tools/ant/ArgumentProcessor.java index 07812f2fe..7a547fd2c 100644 --- a/src/main/org/apache/tools/ant/ArgumentProcessor.java +++ b/src/main/org/apache/tools/ant/ArgumentProcessor.java @@ -37,6 +37,11 @@ public interface ArgumentProcessor { *

* If the argument is not supported, returns -1. Else, the position of the * first argument not supported. + *

+ * + * @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 * true 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 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 args); @@ -59,12 +70,17 @@ public interface ArgumentProcessor { * after the project being configured. Returns true 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 arg); /** * Print the usage of the supported arguments * + * @param writer PrintStream * @see org.apache.tools.ant.Main#printUsage() */ void printUsage(PrintStream writer); diff --git a/src/main/org/apache/tools/ant/ComponentHelper.java b/src/main/org/apache/tools/ant/ComponentHelper.java index 4942d2407..9d0af8519 100644 --- a/src/main/org/apache/tools/ant/ComponentHelper.java +++ b/src/main/org/apache/tools/ant/ComponentHelper.java @@ -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 */ @@ -202,7 +202,7 @@ public class ComponentHelper { } /** - * @return A deep copy of the restrictredDefinition + * @return A deep copy of the restrictedDefinition */ private Map> getRestrictedDefinition() { final Map> result = new HashMap>(); diff --git a/src/main/org/apache/tools/ant/Diagnostics.java b/src/main/org/apache/tools/ant/Diagnostics.java index e4a243bb2..74e118233 100644 --- a/src/main/org/apache/tools/ant/Diagnostics.java +++ b/src/main/org/apache/tools/ant/Diagnostics.java @@ -284,7 +284,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) { } @@ -380,7 +380,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 */ @@ -526,7 +526,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(); @@ -538,7 +538,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(); @@ -562,7 +562,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"); diff --git a/src/main/org/apache/tools/ant/DirectoryScanner.java b/src/main/org/apache/tools/ant/DirectoryScanner.java index 6b5289792..f4b8fdca3 100644 --- a/src/main/org/apache/tools/ant/DirectoryScanner.java +++ b/src/main/org/apache/tools/ant/DirectoryScanner.java @@ -52,6 +52,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. + *

*

* 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, @@ -60,11 +61,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. + *

*

* 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. + *

*

* The filename pattern matching is done as follows: * The name to be matched is split up in path segments. A path segment is the @@ -73,41 +76,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. + *

*

* 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. + *

*

* There is a special case regarding the use of File.separators - * at the beginning of the pattern and the string to match:
- * When a pattern starts with a File.separator, the string - * to match must also start with a File.separator. - * When a pattern does not start with a File.separator, the - * string to match may not start with a File.separator. - * When one of these rules is not obeyed, the string will not - * match. + * at the beginning of the pattern and the string to match: + *

+ *
    + *
  • When a pattern starts with a File.separator, the string + * to match must also start with a File.separator.
  • + *
  • When a pattern does not start with a File.separator, the + * string to match may not start with a File.separator.
  • + *
  • When one of the above rules is not obeyed, the string will not + * match.
  • + *
*

* When a name path segment is matched against a pattern path segment, the * following special characters can be used:
* '*' matches zero or more characters
* '?' matches one character. + *

*

* Examples: + *

*

* "**\*.class" matches all .class files/dirs in a directory tree. + *

*

* "test\a??.java" matches all files/dirs which start with an 'a', then two * more characters and then ".java", in a directory called test. + *

*

* "**" matches everything in a directory tree. + *

*

* "**\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"). + *

*

* Case sensitivity may be turned off if necessary. By default, it is * turned on. + *

*

* Example of usage: + *

*
  *   String[] includes = {"**\\*.class"};
  *   String[] excludes = {"modules\\*\\**"};
@@ -701,6 +717,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) {
@@ -790,7 +807,7 @@ public class DirectoryScanner
      * File.separatorChar, so the separator used need not
      * match File.separatorChar.
      *
-     * 

When a pattern ends with a '/' or '\', "**" is appended. + *

When a pattern ends with a '/' or '\', "**" is appended.

* * @since Ant 1.6.3 */ @@ -1378,7 +1395,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 null. + * @param path The tokenized path to match. Must not be null. * @return true when the name matches against at least one * include pattern, or false otherwise. */ diff --git a/src/main/org/apache/tools/ant/IntrospectionHelper.java b/src/main/org/apache/tools/ant/IntrospectionHelper.java index 2b31e432f..9740338fe 100644 --- a/src/main/org/apache/tools/ant/IntrospectionHelper.java +++ b/src/main/org/apache/tools/ant/IntrospectionHelper.java @@ -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) { @@ -1529,7 +1529,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 { diff --git a/src/main/org/apache/tools/ant/MagicNames.java b/src/main/org/apache/tools/ant/MagicNames.java index 67ab8a810..7c17c05c5 100644 --- a/src/main/org/apache/tools/ant/MagicNames.java +++ b/src/main/org/apache/tools/ant/MagicNames.java @@ -252,7 +252,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. * *

Alternatively this is the name of a system property holding * the fully qualified class name of a {@link @@ -266,7 +266,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. * *

Alternatively this is the name of a system property holding * the fully qualified class name of a {@link diff --git a/src/main/org/apache/tools/ant/Main.java b/src/main/org/apache/tools/ant/Main.java index a7d477671..33dae8cb6 100644 --- a/src/main/org/apache/tools/ant/Main.java +++ b/src/main/org/apache/tools/ant/Main.java @@ -1275,9 +1275,6 @@ public class Main implements AntMain { * no descriptions are displayed. * If non-null, this should have * as many elements as names. - * @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 null. * @param maxlen The maximum length of the names of the targets. diff --git a/src/main/org/apache/tools/ant/Project.java b/src/main/org/apache/tools/ant/Project.java index 34dddb26f..b91b83ec9 100644 --- a/src/main/org/apache/tools/ant/Project.java +++ b/src/main/org/apache/tools/ant/Project.java @@ -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 ant.executor.class * 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 ant.executor.class * property, they will have no effect. * @return "keep-going" mode @@ -1803,13 +1803,13 @@ public class Project implements ResourceFactory { /** * Topologically sort a set of targets. * - * @param root String[] 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 null. + * @param roots String[] 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 null. * @param targetTable A map of names to targets (String to Target). - * Must not be null. + * Must not be null. * @param returnAll boolean indicating whether to return all * targets, or the execution sequence only. * @return a Vector of Target objects in sorted order. @@ -1817,7 +1817,7 @@ public class Project implements ResourceFactory { * targets, or if a named target does not exist. * @since Ant 1.6.3 */ - public final Vector topoSort(final String[] root, final Hashtable targetTable, + public final Vector topoSort(final String[] roots, final Hashtable targetTable, final boolean returnAll) throws BuildException { final Vector ret = new VectorSet(); final Hashtable state = new Hashtable(); @@ -1831,19 +1831,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 StringBuffer buf = new StringBuffer("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); @@ -2019,6 +2019,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) { @@ -2041,6 +2043,7 @@ public class Project implements ResourceFactory { /** * Look up a reference by its key (ID). * + * @param desired type * @param key The key for the desired reference. * Must not be null. * diff --git a/src/main/org/apache/tools/ant/ProjectComponent.java b/src/main/org/apache/tools/ant/ProjectComponent.java index ad92a3175..767d0c0c2 100644 --- a/src/main/org/apache/tools/ant/ProjectComponent.java +++ b/src/main/org/apache/tools/ant/ProjectComponent.java @@ -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); diff --git a/src/main/org/apache/tools/ant/ProjectHelper.java b/src/main/org/apache/tools/ant/ProjectHelper.java index ab3936827..0c73b2654 100644 --- a/src/main/org/apache/tools/ant/ProjectHelper.java +++ b/src/main/org/apache/tools/ant/ProjectHelper.java @@ -151,8 +151,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 importStack = new Vector(); private List extensionStack = new LinkedList(); @@ -199,6 +199,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) { @@ -216,6 +217,7 @@ public class ProjectHelper { * *

May be set by <import>'s prefixSeparator attribute.

* + * @return String * @since Ant 1.8.0 */ public static String getCurrentPrefixSeparator() { @@ -225,6 +227,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) { @@ -250,6 +253,7 @@ public class ProjectHelper { * overwritten in the importing build file. The depends list of * the imported targets is not modified at all.

* + * @return boolean * @since Ant 1.8.0 */ public static boolean isInIncludeMode() { @@ -260,6 +264,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) { @@ -591,6 +596,8 @@ public class ProjectHelper { * *

This implementation returns false.

* + * @param r Resource + * @return boolean * @since Ant 1.8.0 */ public boolean canParseAntlibDescriptor(Resource r) { @@ -601,6 +608,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, diff --git a/src/main/org/apache/tools/ant/ProjectHelperRepository.java b/src/main/org/apache/tools/ant/ProjectHelperRepository.java index e370a54c7..df5d1a07c 100644 --- a/src/main/org/apache/tools/ant/ProjectHelperRepository.java +++ b/src/main/org/apache/tools/ant/ProjectHelperRepository.java @@ -79,7 +79,7 @@ public class ProjectHelperRepository { Constructor 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(); @@ -248,6 +248,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 null). */ public ProjectHelper getProjectHelperForBuildFile(Resource buildFile) throws BuildException { @@ -271,6 +272,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 null). */ public ProjectHelper getProjectHelperForAntlib(Resource antlib) throws BuildException { diff --git a/src/main/org/apache/tools/ant/PropertyHelper.java b/src/main/org/apache/tools/ant/PropertyHelper.java index 1dbb280c9..9f94bda75 100644 --- a/src/main/org/apache/tools/ant/PropertyHelper.java +++ b/src/main/org/apache/tools/ant/PropertyHelper.java @@ -72,7 +72,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.

* *

When {@link #getProperty looking up a property value} this class @@ -1111,6 +1111,7 @@ public class PropertyHelper implements GetProperty { /** * Get the Collection of delegates of the specified type. * + * @param desired type. * @param type * delegate type. * @return Collection. @@ -1149,6 +1150,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) { @@ -1172,6 +1175,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) { @@ -1183,6 +1188,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) { @@ -1197,6 +1204,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) { @@ -1207,6 +1216,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) { diff --git a/src/main/org/apache/tools/ant/RuntimeConfigurable.java b/src/main/org/apache/tools/ant/RuntimeConfigurable.java index 0aafccbe2..302d8f6ed 100644 --- a/src/main/org/apache/tools/ant/RuntimeConfigurable.java +++ b/src/main/org/apache/tools/ant/RuntimeConfigurable.java @@ -70,7 +70,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 @@ -172,7 +172,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 */ @@ -267,10 +267,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 null. + * @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++) { @@ -341,10 +342,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 null. + * @deprecated Deprecated since Ant 1.6 in favor of {@link #getAttributeMap}. */ + @Deprecated public synchronized AttributeList getAttributes() { return attributes; } @@ -415,7 +417,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. @@ -449,9 +451,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. - * + *

* If the element has an id attribute, a reference * is added to the project as well. + *

* * @param p The project containing the wrapped element. * Must not be null. @@ -468,18 +471,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. - * + *

* If the element has an id attribute, a reference * is added to the project as well. + *

* * @param p The project containing the wrapped element. * Must not be null. * * @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) @@ -540,7 +543,7 @@ public class RuntimeConfigurable implements Serializable { } catch (BuildException be) { if (name.equals("id")) { // 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; diff --git a/src/main/org/apache/tools/ant/Target.java b/src/main/org/apache/tools/ant/Target.java index b1df2b243..33b8b7233 100644 --- a/src/main/org/apache/tools/ant/Target.java +++ b/src/main/org/apache/tools/ant/Target.java @@ -301,6 +301,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) { @@ -348,6 +349,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) { diff --git a/src/main/org/apache/tools/ant/TaskAdapter.java b/src/main/org/apache/tools/ant/TaskAdapter.java index 3a3001f62..d4d8c3213 100644 --- a/src/main/org/apache/tools/ant/TaskAdapter.java +++ b/src/main/org/apache/tools/ant/TaskAdapter.java @@ -44,7 +44,7 @@ public class TaskAdapter extends Task implements TypeAdapter { * Constructor for given proxy. * So you could write easier code *
-     * myTaskContainer.addTask( new TaskAdapter(myProxy) );
+     * myTaskContainer.addTask(new TaskAdapter(myProxy));
      * 
* * @param proxy The object which Ant should use as task. diff --git a/src/main/org/apache/tools/ant/TaskConfigurationChecker.java b/src/main/org/apache/tools/ant/TaskConfigurationChecker.java index e8e74441a..9a520438c 100644 --- a/src/main/org/apache/tools/ant/TaskConfigurationChecker.java +++ b/src/main/org/apache/tools/ant/TaskConfigurationChecker.java @@ -95,7 +95,7 @@ public class TaskConfigurationChecker { public void checkErrors() throws BuildException { if (!errors.isEmpty()) { StringBuffer sb = new StringBuffer(); - sb.append("Configurationerror on <"); + sb.append("Configuration error on <"); sb.append(task.getTaskName()); sb.append(">:"); sb.append(System.getProperty("line.separator")); diff --git a/src/main/org/apache/tools/ant/dispatch/DispatchTask.java b/src/main/org/apache/tools/ant/dispatch/DispatchTask.java index a848ed138..b88b873be 100644 --- a/src/main/org/apache/tools/ant/dispatch/DispatchTask.java +++ b/src/main/org/apache/tools/ant/dispatch/DispatchTask.java @@ -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. - *
- * Example:
+ *

Example:

* <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, diff --git a/src/main/org/apache/tools/ant/filters/BaseParamFilterReader.java b/src/main/org/apache/tools/ant/filters/BaseParamFilterReader.java index 54bc9ff92..f3a8e5e03 100644 --- a/src/main/org/apache/tools/ant/filters/BaseParamFilterReader.java +++ b/src/main/org/apache/tools/ant/filters/BaseParamFilterReader.java @@ -58,7 +58,7 @@ public abstract class BaseParamFilterReader * @param parameters The parameters to be used by this filter. * Should not be null. */ - public final void setParameters(final Parameter[] parameters) { + public final void setParameters(final Parameter... parameters) { this.parameters = parameters; setInitialized(false); } diff --git a/src/main/org/apache/tools/ant/filters/ClassConstants.java b/src/main/org/apache/tools/ant/filters/ClassConstants.java index 354430123..b6894f96a 100644 --- a/src/main/org/apache/tools/ant/filters/ClassConstants.java +++ b/src/main/org/apache/tools/ant/filters/ClassConstants.java @@ -29,8 +29,7 @@ import org.apache.tools.ant.util.ResourceUtils; * Assembles the constants declared in a Java class in * key1=value1(line separator)key2=value2 * format. - *

- * Notes: + *

Notes:

*
    *
  1. This filter uses the BCEL external toolkit. *
  2. This assembles only those constants that are not created @@ -39,7 +38,7 @@ import org.apache.tools.ant.util.ResourceUtils; * and String only.
  3. *
  4. The access modifiers of the declared constants do not matter.
  5. *
- * Example:
+ *

Example:

*
<classconstants/>
* Or: *
<filterreader
diff --git a/src/main/org/apache/tools/ant/filters/ExpandProperties.java b/src/main/org/apache/tools/ant/filters/ExpandProperties.java
index 524a799b1..48d9ffe19 100644
--- a/src/main/org/apache/tools/ant/filters/ExpandProperties.java
+++ b/src/main/org/apache/tools/ant/filters/ExpandProperties.java
@@ -30,8 +30,7 @@ import org.apache.tools.ant.types.PropertySet;
 
 /**
  * Expands Ant properties, if any, in the data.
- * 

- * Example:
+ *

Example:

*
<expandproperties/>
* Or: *
<filterreader
diff --git a/src/main/org/apache/tools/ant/filters/FixCrLfFilter.java b/src/main/org/apache/tools/ant/filters/FixCrLfFilter.java
index 8a37924c7..b5a0ad2c3 100644
--- a/src/main/org/apache/tools/ant/filters/FixCrLfFilter.java
+++ b/src/main/org/apache/tools/ant/filters/FixCrLfFilter.java
@@ -29,13 +29,14 @@ import org.apache.tools.ant.types.EnumeratedAttribute;
  * damaged by misconfigured or misguided editors or file transfer programs.
  * 

* This filter can take the following arguments: + *

*
    - *
  • eof - *
  • eol - *
  • fixlast - *
  • javafiles - *
  • tab - *
  • tablength + *
  • eof
  • + *
  • eol
  • + *
  • fixlast
  • + *
  • javafiles
  • + *
  • tab
  • + *
  • tablength
  • *
* None of which are required. *

@@ -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. + *

*

* Caution: 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. - * - *

+ *

+ *

* Example: - * + *

*
  * <<fixcrlf tab="add" eol="crlf" eof="asis"/>
  * 
- * * Or: - * *
  * <filterreader classname="org.apache.tools.ant.filters.FixCrLfFilter">
  *   <param eol="crlf" tab="asis"/>
  *  </filterreader>
  * 
- * */ 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"}; } diff --git a/src/main/org/apache/tools/ant/filters/LineContainsRegExp.java b/src/main/org/apache/tools/ant/filters/LineContainsRegExp.java index 09dce7759..5d144c2b3 100644 --- a/src/main/org/apache/tools/ant/filters/LineContainsRegExp.java +++ b/src/main/org/apache/tools/ant/filters/LineContainsRegExp.java @@ -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.9.10 */ public void setRegexp(String pattern) { diff --git a/src/main/org/apache/tools/ant/filters/ReplaceTokens.java b/src/main/org/apache/tools/ant/filters/ReplaceTokens.java index bcbc312cd..f033b6f81 100644 --- a/src/main/org/apache/tools/ant/filters/ReplaceTokens.java +++ b/src/main/org/apache/tools/ant/filters/ReplaceTokens.java @@ -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) { diff --git a/src/main/org/apache/tools/ant/filters/SortFilter.java b/src/main/org/apache/tools/ant/filters/SortFilter.java index 44e8d72ed..056ad6a74 100644 --- a/src/main/org/apache/tools/ant/filters/SortFilter.java +++ b/src/main/org/apache/tools/ant/filters/SortFilter.java @@ -82,10 +82,10 @@ import org.apache.tools.ant.types.Parameter; * *

* Sort all files *.txt from src location using as - * sorting criterium EvenFirstCmp class, that sorts the file + * sorting criterion EvenFirstCmp class, that sorts the file * lines putting even lines first then odd lines for example. The modified files * are copied into build location. The EvenFirstCmp, - * has to an instanciable class via Class.newInstance(), + * has to an instantiable class via Class.newInstance(), * therefore in case of inner class has to be static. It also has to * implement java.util.Comparator interface, for example: *

@@ -102,7 +102,7 @@ import org.apache.tools.ant.types.Parameter; * *

The example above is equivalent to:

* - *
+ * 
  *   <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>
- * 
+ *
* - *

If parameter comparator is present, then - * reverse parameter will not be taken into account.

+ *

If parameter comparator is present, then + * reverse parameter will not be taken into account.

* * @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 diff --git a/src/main/org/apache/tools/ant/helper/AntXMLContext.java b/src/main/org/apache/tools/ant/helper/AntXMLContext.java index 99e3d1a1e..393ad5cfe 100644 --- a/src/main/org/apache/tools/ant/helper/AntXMLContext.java +++ b/src/main/org/apache/tools/ant/helper/AntXMLContext.java @@ -84,8 +84,8 @@ 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 @@ -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() { diff --git a/src/main/org/apache/tools/ant/helper/ProjectHelper2.java b/src/main/org/apache/tools/ant/helper/ProjectHelper2.java index 2e9c7254a..6ae2d3236 100644 --- a/src/main/org/apache/tools/ant/helper/ProjectHelper2.java +++ b/src/main/org/apache/tools/ant/helper/ProjectHelper2.java @@ -483,8 +483,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 antHandlers = new Stack(); @@ -706,11 +706,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++) { @@ -760,7 +760,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); @@ -1081,7 +1081,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 { @@ -1136,7 +1136,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); } diff --git a/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java b/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java index 97c42a028..ebed3a279 100644 --- a/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java +++ b/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java @@ -187,8 +187,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; diff --git a/src/main/org/apache/tools/ant/helper/SingleCheckExecutor.java b/src/main/org/apache/tools/ant/helper/SingleCheckExecutor.java index 1960ed033..6577c941a 100644 --- a/src/main/org/apache/tools/ant/helper/SingleCheckExecutor.java +++ b/src/main/org/apache/tools/ant/helper/SingleCheckExecutor.java @@ -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 diff --git a/src/main/org/apache/tools/ant/launch/Launcher.java b/src/main/org/apache/tools/ant/launch/Launcher.java index 534bbfb3d..5c4f6f490 100644 --- a/src/main/org/apache/tools/ant/launch/Launcher.java +++ b/src/main/org/apache/tools/ant/launch/Launcher.java @@ -69,10 +69,9 @@ public class Launcher { /** * The location of a per-user library directory. - *

- * It's value is the concatenation of {@link #ANT_PRIVATEDIR} + *

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 .ant/lib. + * in between. For example, on Unix, it's .ant/lib.

*/ public static final String USER_LIBDIR = ANT_PRIVATEDIR + File.separatorChar + ANT_PRIVATELIB; diff --git a/src/main/org/apache/tools/ant/launch/Locator.java b/src/main/org/apache/tools/ant/launch/Locator.java index 4640e700f..7ea070ec2 100644 --- a/src/main/org/apache/tools/ant/launch/Locator.java +++ b/src/main/org/apache/tools/ant/launch/Locator.java @@ -391,14 +391,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) - * 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 FileUtils.getFileURL(File) */ @Deprecated public static URL fileToURL(File file) diff --git a/src/main/org/apache/tools/ant/listener/AnsiColorLogger.java b/src/main/org/apache/tools/ant/listener/AnsiColorLogger.java index 7519a7e8d..fb22f75da 100644 --- a/src/main/org/apache/tools/ant/listener/AnsiColorLogger.java +++ b/src/main/org/apache/tools/ant/listener/AnsiColorLogger.java @@ -200,8 +200,8 @@ public class AnsiColorLogger extends DefaultLogger { /** * @see DefaultLogger#printMessage + * {@inheritDoc}. */ - /** {@inheritDoc}. */ @Override protected void printMessage(final String message, final PrintStream stream, diff --git a/src/main/org/apache/tools/ant/listener/BigProjectLogger.java b/src/main/org/apache/tools/ant/listener/BigProjectLogger.java index 865127d29..7d618bcf2 100644 --- a/src/main/org/apache/tools/ant/listener/BigProjectLogger.java +++ b/src/main/org/apache/tools/ant/listener/BigProjectLogger.java @@ -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); diff --git a/src/main/org/apache/tools/ant/listener/CommonsLoggingListener.java b/src/main/org/apache/tools/ant/listener/CommonsLoggingListener.java index 32474eea3..86fd6847a 100644 --- a/src/main/org/apache/tools/ant/listener/CommonsLoggingListener.java +++ b/src/main/org/apache/tools/ant/listener/CommonsLoggingListener.java @@ -128,8 +128,8 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { /** * @see BuildListener#targetStarted + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public void targetStarted(final BuildEvent event) { if (initialized) { final Log log = getLog(TARGET_LOG, @@ -143,8 +143,8 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { /** * @see BuildListener#targetFinished + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public void targetFinished(final BuildEvent event) { if (initialized) { final String targetName = event.getTarget().getName(); @@ -162,8 +162,8 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { /** * @see BuildListener#taskStarted + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public void taskStarted(final BuildEvent event) { if (initialized) { final Task task = event.getTask(); @@ -184,8 +184,8 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { /** * @see BuildListener#taskFinished + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public void taskFinished(final BuildEvent event) { if (initialized) { final Task task = event.getTask(); @@ -213,8 +213,8 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { /** * @see BuildListener#messageLogged + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public void messageLogged(final BuildEvent event) { if (initialized) { Object categoryObject = event.getTask(); diff --git a/src/main/org/apache/tools/ant/listener/Log4jListener.java b/src/main/org/apache/tools/ant/listener/Log4jListener.java index 829f11834..501b511d3 100644 --- a/src/main/org/apache/tools/ant/listener/Log4jListener.java +++ b/src/main/org/apache/tools/ant/listener/Log4jListener.java @@ -55,8 +55,8 @@ public class Log4jListener implements BuildListener { /** * @see BuildListener#buildStarted + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public void buildStarted(final BuildEvent event) { if (initialized) { final Logger log = Logger.getLogger(Project.class.getName()); @@ -66,8 +66,8 @@ public class Log4jListener implements BuildListener { /** * @see BuildListener#buildFinished + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public void buildFinished(final BuildEvent event) { if (initialized) { final Logger log = Logger.getLogger(Project.class.getName()); @@ -81,8 +81,8 @@ public class Log4jListener implements BuildListener { /** * @see BuildListener#targetStarted + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public void targetStarted(final BuildEvent event) { if (initialized) { final Logger log = Logger.getLogger(Target.class.getName()); @@ -92,8 +92,8 @@ public class Log4jListener implements BuildListener { /** * @see BuildListener#targetFinished + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public void targetFinished(final BuildEvent event) { if (initialized) { final String targetName = event.getTarget().getName(); @@ -109,8 +109,8 @@ public class Log4jListener implements BuildListener { /** * @see BuildListener#taskStarted + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public void taskStarted(final BuildEvent event) { if (initialized) { final Task task = event.getTask(); @@ -121,8 +121,8 @@ public class Log4jListener implements BuildListener { /** * @see BuildListener#taskFinished + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public void taskFinished(final BuildEvent event) { if (initialized) { final Task task = event.getTask(); @@ -138,6 +138,7 @@ public class Log4jListener implements BuildListener { /** * @see BuildListener#messageLogged + * {@inheritDoc}. */ /** {@inheritDoc}. */ public void messageLogged(final BuildEvent event) { diff --git a/src/main/org/apache/tools/ant/listener/MailLogger.java b/src/main/org/apache/tools/ant/listener/MailLogger.java index 45289a1c4..2de55bf9f 100644 --- a/src/main/org/apache/tools/ant/listener/MailLogger.java +++ b/src/main/org/apache/tools/ant/listener/MailLogger.java @@ -323,8 +323,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(Hashtable properties, String name, String defaultValue) { diff --git a/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java b/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java index 1ce81166f..09b9b4a74 100644 --- a/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java @@ -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. + *

+ * 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. + *

* * @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; /** @@ -848,6 +854,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) { diff --git a/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java b/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java index c93173b34..b2fe8d441 100644 --- a/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java @@ -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; diff --git a/src/main/org/apache/tools/ant/taskdefs/Ant.java b/src/main/org/apache/tools/ant/taskdefs/Ant.java index 793d16c98..dbf8a225e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Ant.java +++ b/src/main/org/apache/tools/ant/taskdefs/Ant.java @@ -137,6 +137,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) { @@ -466,7 +467,7 @@ public class Ant extends Task { /** * Get the default build file name to use when launching the task. *

- * 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 Hashtable 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 */ diff --git a/src/main/org/apache/tools/ant/taskdefs/AttributeNamespaceDef.java b/src/main/org/apache/tools/ant/taskdefs/AttributeNamespaceDef.java index 150b7288b..c374d6f36 100644 --- a/src/main/org/apache/tools/ant/taskdefs/AttributeNamespaceDef.java +++ b/src/main/org/apache/tools/ant/taskdefs/AttributeNamespaceDef.java @@ -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() { diff --git a/src/main/org/apache/tools/ant/taskdefs/Available.java b/src/main/org/apache/tools/ant/taskdefs/Available.java index f4919a16c..d8eb82fdc 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Available.java +++ b/src/main/org/apache/tools/ant/taskdefs/Available.java @@ -492,8 +492,8 @@ public class Available extends Task implements Condition { /** * @see EnumeratedAttribute#getValues + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public String[] getValues() { return VALUES; } diff --git a/src/main/org/apache/tools/ant/taskdefs/BuildNumber.java b/src/main/org/apache/tools/ant/taskdefs/BuildNumber.java index aee071d31..7a661256c 100644 --- a/src/main/org/apache/tools/ant/taskdefs/BuildNumber.java +++ b/src/main/org/apache/tools/ant/taskdefs/BuildNumber.java @@ -140,7 +140,7 @@ public class BuildNumber * Utility method to load properties from file. * * @return the loaded properties - * @throws BuildException + * @throws BuildException if something goes wrong */ private Properties loadProperties() throws BuildException { diff --git a/src/main/org/apache/tools/ant/taskdefs/Concat.java b/src/main/org/apache/tools/ant/taskdefs/Concat.java index 1af0143cd..93560ce06 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Concat.java +++ b/src/main/org/apache/tools/ant/taskdefs/Concat.java @@ -361,7 +361,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) { @@ -614,6 +614,7 @@ public class Concat extends Task implements ResourceCollection { * *

Defaults to false

* + * @param f boolean * @since Ant 1.8.2 */ public void setForceReadOnly(boolean f) { diff --git a/src/main/org/apache/tools/ant/taskdefs/Copy.java b/src/main/org/apache/tools/ant/taskdefs/Copy.java index 2394b8f43..31901a6d8 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Copy.java +++ b/src/main/org/apache/tools/ant/taskdefs/Copy.java @@ -240,6 +240,7 @@ public class Copy extends Task { * *

Defaults to false

* + * @param f boolean * @since Ant 1.8.2 */ public void setForce(final boolean f) { @@ -249,6 +250,7 @@ public class Copy extends Task { /** * Whether read-only destinations will be overwritten. * + * @return boolean * @since Ant 1.8.2 */ public boolean getForce() { @@ -465,7 +467,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 @@ -1044,7 +1046,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; diff --git a/src/main/org/apache/tools/ant/taskdefs/Delete.java b/src/main/org/apache/tools/ant/taskdefs/Delete.java index 6c34ccf2f..3329318e2 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Delete.java +++ b/src/main/org/apache/tools/ant/taskdefs/Delete.java @@ -206,6 +206,7 @@ public class Delete extends MatchingTask { * default) but also on other operating systems, for example when * deleting directories from an NFS share.

* + * @param b boolean * @since Ant 1.8.3 */ public void setPerformGcOnFailedDelete(boolean b) { @@ -246,7 +247,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 */ public PatternSet.NameEntry createIncludesFile() { usedMatchingTask = true; @@ -255,7 +256,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 */ public PatternSet.NameEntry createExclude() { usedMatchingTask = true; @@ -264,7 +265,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 */ public PatternSet.NameEntry createExcludesFile() { usedMatchingTask = true; @@ -361,6 +362,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) { @@ -369,6 +371,7 @@ public class Delete extends MatchingTask { /** * add a "Select" selector entry on the selector list + * * @param selector the selector to be added */ public void addSelector(SelectSelector selector) { @@ -378,6 +381,7 @@ public class Delete extends MatchingTask { /** * add an "And" selector entry on the selector list + * * @param selector the selector to be added */ public void addAnd(AndSelector selector) { @@ -387,6 +391,7 @@ public class Delete extends MatchingTask { /** * add an "Or" selector entry on the selector list + * * @param selector the selector to be added */ public void addOr(OrSelector selector) { @@ -396,6 +401,7 @@ public class Delete extends MatchingTask { /** * add a "Not" selector entry on the selector list + * * @param selector the selector to be added */ public void addNot(NotSelector selector) { @@ -405,6 +411,7 @@ public class Delete extends MatchingTask { /** * add a "None" selector entry on the selector list + * * @param selector the selector to be added */ public void addNone(NoneSelector selector) { @@ -414,6 +421,7 @@ public class Delete extends MatchingTask { /** * add a majority selector entry on the selector list + * * @param selector the selector to be added */ public void addMajority(MajoritySelector selector) { @@ -423,6 +431,7 @@ public class Delete extends MatchingTask { /** * add a selector date entry on the selector list + * * @param selector the selector to be added */ public void addDate(DateSelector selector) { @@ -432,6 +441,7 @@ public class Delete extends MatchingTask { /** * add a selector size entry on the selector list + * * @param selector the selector to be added */ public void addSize(SizeSelector selector) { @@ -441,6 +451,7 @@ public class Delete extends MatchingTask { /** * add a selector filename entry on the selector list + * * @param selector the selector to be added */ public void addFilename(FilenameSelector selector) { @@ -450,6 +461,7 @@ public class Delete extends MatchingTask { /** * add an extended selector entry on the selector list + * * @param selector the selector to be added */ public void addCustom(ExtendSelector selector) { @@ -459,6 +471,7 @@ public class Delete extends MatchingTask { /** * add a contains selector entry on the selector list + * * @param selector the selector to be added */ public void addContains(ContainsSelector selector) { @@ -468,6 +481,7 @@ public class Delete extends MatchingTask { /** * add a present selector entry on the selector list + * * @param selector the selector to be added */ public void addPresent(PresentSelector selector) { @@ -477,6 +491,7 @@ public class Delete extends MatchingTask { /** * add a depth selector entry on the selector list + * * @param selector the selector to be added */ public void addDepth(DepthSelector selector) { @@ -486,6 +501,7 @@ public class Delete extends MatchingTask { /** * add a depends selector entry on the selector list + * * @param selector the selector to be added */ public void addDepend(DependSelector selector) { @@ -495,6 +511,7 @@ public class Delete extends MatchingTask { /** * add a regular expression selector entry on the selector list + * * @param selector the selector to be added */ public void addContainsRegexp(ContainsRegexpSelector selector) { @@ -504,6 +521,7 @@ public class Delete extends MatchingTask { /** * add the modified selector + * * @param selector the selector to add * @since ant 1.6 */ @@ -514,6 +532,7 @@ public class Delete extends MatchingTask { /** * add an arbitrary selector + * * @param selector the selector to be added * @since Ant 1.6 */ @@ -524,6 +543,7 @@ public class Delete extends MatchingTask { /** * Delete the file(s). + * * @exception BuildException if an error occurs */ public void execute() throws BuildException { diff --git a/src/main/org/apache/tools/ant/taskdefs/DependSet.java b/src/main/org/apache/tools/ant/taskdefs/DependSet.java index dc42beb1a..549e0ffb5 100644 --- a/src/main/org/apache/tools/ant/taskdefs/DependSet.java +++ b/src/main/org/apache/tools/ant/taskdefs/DependSet.java @@ -180,6 +180,7 @@ public class DependSet extends MatchingTask { * *

All deleted files will be logged as well.

* + * @param b boolean * @since Ant 1.8.0 */ public void setVerbose(boolean b) { diff --git a/src/main/org/apache/tools/ant/taskdefs/Echo.java b/src/main/org/apache/tools/ant/taskdefs/Echo.java index ac31ee329..f1e13c87c 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Echo.java +++ b/src/main/org/apache/tools/ant/taskdefs/Echo.java @@ -156,6 +156,7 @@ public class Echo extends Task { * *

Defaults to false

* + * @param f boolean * @since Ant 1.8.2 */ public void setForce(boolean f) { diff --git a/src/main/org/apache/tools/ant/taskdefs/EchoXML.java b/src/main/org/apache/tools/ant/taskdefs/EchoXML.java index 4a4fda292..40939e42f 100644 --- a/src/main/org/apache/tools/ant/taskdefs/EchoXML.java +++ b/src/main/org/apache/tools/ant/taskdefs/EchoXML.java @@ -59,8 +59,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; diff --git a/src/main/org/apache/tools/ant/taskdefs/ExecTask.java b/src/main/org/apache/tools/ant/taskdefs/ExecTask.java index dd93978fe..b9eb963be 100644 --- a/src/main/org/apache/tools/ant/taskdefs/ExecTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/ExecTask.java @@ -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() { @@ -405,6 +406,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() { diff --git a/src/main/org/apache/tools/ant/taskdefs/Execute.java b/src/main/org/apache/tools/ant/taskdefs/Execute.java index 956309a6d..d9923e8cb 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Execute.java +++ b/src/main/org/apache/tools/ant/taskdefs/Execute.java @@ -625,14 +625,14 @@ public class Execute { for (String osEnvItem : osEnv.keySet()) { // Nb: using default locale as key is a env name if (osEnvItem.toLowerCase().equals(key.toLowerCase())) { - // 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)); } diff --git a/src/main/org/apache/tools/ant/taskdefs/Expand.java b/src/main/org/apache/tools/ant/taskdefs/Expand.java index 0ec233308..a586556bd 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Expand.java +++ b/src/main/org/apache/tools/ant/taskdefs/Expand.java @@ -88,6 +88,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) { @@ -97,6 +98,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) { @@ -106,6 +108,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() { @@ -472,6 +475,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) { @@ -482,6 +486,7 @@ public class Expand extends Task { } /** + * @return String * @since Ant 1.8.0 */ public String getEncoding() { @@ -491,6 +496,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) { @@ -500,6 +506,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) { @@ -511,6 +518,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) { @@ -518,6 +526,7 @@ public class Expand extends Task { } /** + * @return boolean * @since Ant 1.8.0 */ public boolean getScanForUnicodeExtraFields() { diff --git a/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java b/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java index 465bf462b..236b125d8 100644 --- a/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java +++ b/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java @@ -684,8 +684,8 @@ public class FixCRLF extends MatchingTask implements ChainableReader { public static class CrLf extends EnumeratedAttribute { /** * @see EnumeratedAttribute#getValues + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public String[] getValues() { return new String[] {"asis", "cr", "lf", "crlf", "mac", "unix", "dos"}; diff --git a/src/main/org/apache/tools/ant/taskdefs/Get.java b/src/main/org/apache/tools/ant/taskdefs/Get.java index 83f3b6bf0..26a20e4aa 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Get.java +++ b/src/main/org/apache/tools/ant/taskdefs/Get.java @@ -318,6 +318,7 @@ public class Get extends Task { /** * Adds URLs to get. + * @param rc ResourceCollection * @since Ant 1.8.0 */ public void add(final ResourceCollection rc) { @@ -406,6 +407,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) { @@ -420,7 +422,6 @@ public class Get extends Task { * reach the URI at all.

* * @param r number of attempts to make - * * @since Ant 1.8.0 */ public void setRetries(final int r) { @@ -436,7 +437,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) { @@ -449,6 +449,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) { @@ -463,6 +464,7 @@ public class Get extends Task { *

Defaults to true (allow caching, which is also the * HttpUrlConnection default value.

* + * @param httpUseCache boolean * @since Ant 1.8.0 */ public void setHttpUseCaches(final boolean httpUseCache) { @@ -476,6 +478,7 @@ public class Get extends Task { *

Setting this to true also means Ant will uncompress * .tar.gz and similar files automatically.

* + * @param b boolean * @since Ant 1.9.5 */ public void setTryGzipEncoding(boolean b) { @@ -864,7 +867,7 @@ public class Get extends Task { /** * Has the download completed successfully? * - *

Re-throws any exception caught during executaion.

+ *

Re-throws any exception caught during execution.

*/ boolean wasSuccessful() throws IOException, BuildException { if (ioexception != null) { diff --git a/src/main/org/apache/tools/ant/taskdefs/ImportTask.java b/src/main/org/apache/tools/ant/taskdefs/ImportTask.java index 63adf718d..0ddd59747 100644 --- a/src/main/org/apache/tools/ant/taskdefs/ImportTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/ImportTask.java @@ -98,6 +98,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) { @@ -108,6 +109,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) { @@ -117,6 +119,7 @@ public class ImportTask extends Task { /** * The resource to import. * + * @param r ResourceCollection * @since Ant 1.8.0 */ public void add(ResourceCollection r) { @@ -327,6 +330,7 @@ public class ImportTask extends Task { * overwritten in the importing build file. The depends list of * the imported targets is not modified at all.

* + * @return boolean * @since Ant 1.8.0 */ protected final boolean isInIncludeMode() { @@ -336,6 +340,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, diff --git a/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java b/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java index 2ca6e22ab..0954e7069 100644 --- a/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java @@ -246,6 +246,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) { @@ -314,6 +315,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) { @@ -388,7 +390,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) { diff --git a/src/main/org/apache/tools/ant/taskdefs/Jar.java b/src/main/org/apache/tools/ant/taskdefs/Jar.java index 330b5dd7d..791fd0dbd 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Jar.java +++ b/src/main/org/apache/tools/ant/taskdefs/Jar.java @@ -150,7 +150,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 */ private StrictMode strict = new StrictMode("ignore"); @@ -481,6 +481,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) { @@ -491,6 +492,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) { @@ -1032,7 +1034,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 dirs, List files, diff --git a/src/main/org/apache/tools/ant/taskdefs/Javac.java b/src/main/org/apache/tools/ant/taskdefs/Javac.java index 18e4941c5..7ccc5a1ae 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Javac.java +++ b/src/main/org/apache/tools/ant/taskdefs/Javac.java @@ -1076,6 +1076,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() { @@ -1084,6 +1085,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) { @@ -1099,6 +1102,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) { diff --git a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java index ebdce4965..d5e77fda0 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java +++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java @@ -64,9 +64,9 @@ import org.apache.tools.ant.util.StringUtils; * Generates Javadoc documentation for a collection * of source code. * - *

Current known limitations are: + *

Current known limitations are:

* - *

    + *
      *
    • patterns must be of the form "xxx.*", every other pattern doesn't * work. *
    • there is no control on arguments sanity since they are left @@ -74,10 +74,10 @@ import org.apache.tools.ant.util.StringUtils; *
    * *

    If no doclet is set, then the version and - * author are by default "yes". + * author are by default "yes".

    * *

    Note: This task is run on another VM because the Javadoc code calls - * System.exit() which would break Ant functionality. + * System.exit() which would break Ant functionality.

    * * @since Ant 1.1 * @@ -1673,6 +1673,7 @@ public class Javadoc extends Task { /** * Enables deep-copying of doc-files directories. * + * @param b boolean * @since Ant 1.8.0 */ public void setDocFilesSubDirs(final boolean b) { @@ -1683,6 +1684,7 @@ public class Javadoc extends Task { * Colon-separated list of doc-files subdirectories * to skip if {@link #setDocFilesSubDirs docFilesSubDirs is true}. * + * @param s String * @since Ant 1.8.0 */ public void setExcludeDocFilesSubDir(final String s) { @@ -1691,6 +1693,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) { diff --git a/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java b/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java index 4c20c7c90..608631829 100644 --- a/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java +++ b/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java @@ -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) { diff --git a/src/main/org/apache/tools/ant/taskdefs/LogOutputStream.java b/src/main/org/apache/tools/ant/taskdefs/LogOutputStream.java index 23bb6bd15..370bcdd7a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/LogOutputStream.java +++ b/src/main/org/apache/tools/ant/taskdefs/LogOutputStream.java @@ -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.
    + *

    Tries to be smart about line separators.

    * * @since Ant 1.2 */ diff --git a/src/main/org/apache/tools/ant/taskdefs/MakeUrl.java b/src/main/org/apache/tools/ant/taskdefs/MakeUrl.java index e23c02537..9fc94bc6a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/MakeUrl.java +++ b/src/main/org/apache/tools/ant/taskdefs/MakeUrl.java @@ -283,7 +283,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) { diff --git a/src/main/org/apache/tools/ant/taskdefs/Manifest.java b/src/main/org/apache/tools/ant/taskdefs/Manifest.java index 0d7c05e61..1daf52f60 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Manifest.java +++ b/src/main/org/apache/tools/ant/taskdefs/Manifest.java @@ -40,8 +40,8 @@ import org.apache.tools.ant.util.FileUtils; * Holds the data of a jar manifest. * * Manifests are processed according to the - * {@link Jar - * file specification.}. + * Jar + * file specification. * 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 diff --git a/src/main/org/apache/tools/ant/taskdefs/ManifestTask.java b/src/main/org/apache/tools/ant/taskdefs/ManifestTask.java index 9b600db55..ff6961ba5 100644 --- a/src/main/org/apache/tools/ant/taskdefs/ManifestTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/ManifestTask.java @@ -196,6 +196,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) { @@ -206,6 +207,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) { diff --git a/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java b/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java index 113ff5ebd..c35af03a2 100644 --- a/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java @@ -154,7 +154,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. */ diff --git a/src/main/org/apache/tools/ant/taskdefs/Move.java b/src/main/org/apache/tools/ant/taskdefs/Move.java index 7f5d9680d..c549d1b71 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Move.java +++ b/src/main/org/apache/tools/ant/taskdefs/Move.java @@ -72,6 +72,7 @@ public class Move extends Copy { * default) but also on other operating systems, for example when * deleting directories from an NFS share.

    * + * @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 { diff --git a/src/main/org/apache/tools/ant/taskdefs/Pack.java b/src/main/org/apache/tools/ant/taskdefs/Pack.java index daabd6ba6..63dfe05e2 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Pack.java +++ b/src/main/org/apache/tools/ant/taskdefs/Pack.java @@ -146,7 +146,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 { diff --git a/src/main/org/apache/tools/ant/taskdefs/Property.java b/src/main/org/apache/tools/ant/taskdefs/Property.java index ccfb35623..64a637620 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Property.java +++ b/src/main/org/apache/tools/ant/taskdefs/Property.java @@ -295,6 +295,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) { @@ -305,6 +306,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() { @@ -362,10 +364,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 ;).
    + * this functionality is supported on ;). + *

    * 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" diff --git a/src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java b/src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java index 0f64544ac..9a2394721 100644 --- a/src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java +++ b/src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java @@ -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) { diff --git a/src/main/org/apache/tools/ant/taskdefs/Recorder.java b/src/main/org/apache/tools/ant/taskdefs/Recorder.java index cc3b432ae..a6f6a883c 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Recorder.java +++ b/src/main/org/apache/tools/ant/taskdefs/Recorder.java @@ -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); } } - diff --git a/src/main/org/apache/tools/ant/taskdefs/RecorderEntry.java b/src/main/org/apache/tools/ant/taskdefs/RecorderEntry.java index a49593681..adbb26554 100644 --- a/src/main/org/apache/tools/ant/taskdefs/RecorderEntry.java +++ b/src/main/org/apache/tools/ant/taskdefs/RecorderEntry.java @@ -90,16 +90,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); @@ -144,8 +144,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() + ":", @@ -155,8 +155,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); @@ -168,16 +168,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(); @@ -185,8 +185,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); @@ -231,8 +231,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; @@ -241,8 +241,8 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { /** * @see BuildLogger#setOutputPrintStream(PrintStream) + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public void setOutputPrintStream(PrintStream output) { closeFile(); out = output; @@ -251,8 +251,8 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { /** * @see BuildLogger#setEmacsMode(boolean) + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public void setEmacsMode(boolean emacsMode) { this.emacsMode = emacsMode; } @@ -260,8 +260,8 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { /** * @see BuildLogger#setErrorPrintStream(PrintStream) + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public void setErrorPrintStream(PrintStream err) { setOutputPrintStream(err); } @@ -302,6 +302,7 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { /** * Get the project associated with this recorder entry. * + * @return Project * @since 1.8.0 */ public Project getProject() { @@ -324,7 +325,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 { @@ -346,7 +347,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 { diff --git a/src/main/org/apache/tools/ant/taskdefs/Redirector.java b/src/main/org/apache/tools/ant/taskdefs/Redirector.java index 5b99d34d3..9871d168b 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Redirector.java +++ b/src/main/org/apache/tools/ant/taskdefs/Redirector.java @@ -534,6 +534,8 @@ public class Redirector { *

    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.

    + * + * @param b boolean * @since 1.9.4 */ public void setBinaryOutput(final boolean b) { diff --git a/src/main/org/apache/tools/ant/taskdefs/Replace.java b/src/main/org/apache/tools/ant/taskdefs/Replace.java index 4b6819815..b2474a5f7 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Replace.java +++ b/src/main/org/apache/tools/ant/taskdefs/Replace.java @@ -102,6 +102,7 @@ public class Replace extends MatchingTask { * expanded already so you do not want to set this to * true.

    * + * @param b boolean * @since Ant 1.8.0 */ public void setExpandProperties(boolean b) { @@ -290,7 +291,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) { @@ -900,6 +901,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) { @@ -916,6 +918,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) { @@ -925,6 +928,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) { @@ -944,6 +948,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(StringBuffer str, String str1, String str2) { int found = str.indexOf(str1); @@ -958,6 +966,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 getOrderedIterator(Properties props) { List keys = new ArrayList(props.keySet()); diff --git a/src/main/org/apache/tools/ant/taskdefs/Rmic.java b/src/main/org/apache/tools/ant/taskdefs/Rmic.java index 6935f9e30..d72c39e68 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Rmic.java +++ b/src/main/org/apache/tools/ant/taskdefs/Rmic.java @@ -72,11 +72,11 @@ import org.apache.tools.ant.util.facade.FacadeTaskHelper; *
      *
    • sun (the standard compiler of the JDK)
    • *
    • kaffe (the standard compiler of - * {@link Kaffe})
    • + * Kaffe) *
    • weblogic
    • *
    * - *

    The miniRMI + *

    The miniRMI * project contains a compiler implementation for this task as well, * please consult miniRMI's documentation to learn how to use it.

    * @@ -535,6 +535,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) { @@ -545,6 +546,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() { @@ -555,6 +557,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() { @@ -563,6 +566,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 */ @@ -572,6 +576,8 @@ public class Rmic extends MatchingTask { /** * Set the compiler adapter explicitly. + * + * @param adapter RmicAdapter * @since Ant 1.8.0 */ public void add(RmicAdapter adapter) { diff --git a/src/main/org/apache/tools/ant/taskdefs/SQLExec.java b/src/main/org/apache/tools/ant/taskdefs/SQLExec.java index d91356665..2f247c999 100644 --- a/src/main/org/apache/tools/ant/taskdefs/SQLExec.java +++ b/src/main/org/apache/tools/ant/taskdefs/SQLExec.java @@ -501,6 +501,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) { @@ -509,6 +511,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) { @@ -517,6 +521,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) { @@ -528,6 +534,7 @@ public class SQLExec extends JDBCTask { * *

    Defaults to ","

    * + * @param s String * @since Ant 1.8.0 */ public void setCsvColumnSeparator(String s) { @@ -550,6 +557,7 @@ public class SQLExec extends JDBCTask { * *

    Defaults to "not set"

    * + * @param s String * @since Ant 1.8.0 */ public void setCsvQuoteCharacter(String s) { @@ -585,6 +593,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) { @@ -593,6 +602,7 @@ public class SQLExec extends JDBCTask { /** * Force the csv quote character + * @param forceCsvQuoteChar boolean */ public void setForceCsvQuoteChar(boolean forceCsvQuoteChar) { this.forceCsvQuoteChar = forceCsvQuoteChar; @@ -986,6 +996,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.

    + * + * @return Statement + * @throws SQLException if statement creation or processing fails */ protected Statement getStatement() throws SQLException { if (statement == null) { diff --git a/src/main/org/apache/tools/ant/taskdefs/Sequential.java b/src/main/org/apache/tools/ant/taskdefs/Sequential.java index 468ac148c..f2f88a925 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Sequential.java +++ b/src/main/org/apache/tools/ant/taskdefs/Sequential.java @@ -45,9 +45,8 @@ public class Sequential extends Task implements TaskContainer { /** * Add a nested task to Sequential. - *

    + * * @param nestedTask Nested task to execute Sequential - *

    */ public void addTask(Task nestedTask) { nestedTasks.addElement(nestedTask); diff --git a/src/main/org/apache/tools/ant/taskdefs/SignJar.java b/src/main/org/apache/tools/ant/taskdefs/SignJar.java index fc31b1d3d..bb17174bd 100644 --- a/src/main/org/apache/tools/ant/taskdefs/SignJar.java +++ b/src/main/org/apache/tools/ant/taskdefs/SignJar.java @@ -315,6 +315,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) { @@ -324,6 +325,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() { @@ -341,6 +343,8 @@ public class SignJar extends AbstractJarSignerTask { /** * Signature Algorithm; optional + * + * @return String */ public String getSigAlg() { return sigAlg; @@ -357,6 +361,8 @@ public class SignJar extends AbstractJarSignerTask { /** * Digest Algorithm; optional + * + * @return String */ public String getDigestAlg() { return digestAlg; @@ -461,7 +467,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 { diff --git a/src/main/org/apache/tools/ant/taskdefs/SubAnt.java b/src/main/org/apache/tools/ant/taskdefs/SubAnt.java index c374d8326..f3207aa29 100644 --- a/src/main/org/apache/tools/ant/taskdefs/SubAnt.java +++ b/src/main/org/apache/tools/ant/taskdefs/SubAnt.java @@ -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. - *

    - *

    Use with directories

    + * + *

    Use with directories

    *

    * 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. *

    - * 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. + *

    * * @return the name of the default file * @since Ant 1.8.0 @@ -378,10 +379,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 - *

    */ - // 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; } @@ -473,6 +474,7 @@ public class SubAnt extends Task { * 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! + *

    * * @param set the directory set to add. */ @@ -486,6 +488,7 @@ public class SubAnt extends Task { * 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! + *

    * * @param set the file set to add. */ @@ -498,6 +501,7 @@ public class SubAnt extends Task { *

    * Note that contrary to file and directory sets, file lists * can reference non-existent files or directories! + *

    * * @param list the file list to add. */ @@ -639,4 +643,4 @@ public class SubAnt extends Task { } } -} // END class SubAnt +} diff --git a/src/main/org/apache/tools/ant/taskdefs/Sync.java b/src/main/org/apache/tools/ant/taskdefs/Sync.java index bcdfd525c..e99bafd7f 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Sync.java +++ b/src/main/org/apache/tools/ant/taskdefs/Sync.java @@ -177,7 +177,7 @@ public class Sync extends Task { *

    If the directory is an orphan, it will also be removed.

    * * @param nonOrphans the table of all non-orphan Files. - * @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 @@ -465,8 +465,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) { @@ -484,8 +484,8 @@ public class Sync extends Task { /** * @see Copy#scan(Resource[], File) + * {@inheritDoc} */ - /** {@inheritDoc} */ @Override protected Map scan(Resource[] resources, File toDir) { assertTrue("No mapper", mapperElement == null); @@ -559,6 +559,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) { @@ -569,6 +570,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() { diff --git a/src/main/org/apache/tools/ant/taskdefs/TempFile.java b/src/main/org/apache/tools/ant/taskdefs/TempFile.java index 5f55a3767..9756fbc66 100644 --- a/src/main/org/apache/tools/ant/taskdefs/TempFile.java +++ b/src/main/org/apache/tools/ant/taskdefs/TempFile.java @@ -105,7 +105,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; diff --git a/src/main/org/apache/tools/ant/taskdefs/Tstamp.java b/src/main/org/apache/tools/ant/taskdefs/Tstamp.java index a6a35d7b4..f86ed0300 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Tstamp.java +++ b/src/main/org/apache/tools/ant/taskdefs/Tstamp.java @@ -112,6 +112,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() { String magicNow = getProject().getProperty(MagicNames.TSTAMP_NOW); diff --git a/src/main/org/apache/tools/ant/taskdefs/Untar.java b/src/main/org/apache/tools/ant/taskdefs/Untar.java index 8343aec52..53b8239d1 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Untar.java +++ b/src/main/org/apache/tools/ant/taskdefs/Untar.java @@ -91,8 +91,8 @@ public class Untar extends Expand { /** * @see Expand#expandFile(FileUtils, File, File) + * {@inheritDoc} */ - /** {@inheritDoc} */ protected void expandFile(FileUtils fileUtils, File srcF, File dir) { FileInputStream fis = null; if (!srcF.exists()) { @@ -231,8 +231,7 @@ public class Untar extends Expand { final char[] magic = new char[] {'B', 'Z'}; for (int i = 0; i < magic.length; i++) { if (istream.read() != magic[i]) { - throw new BuildException( - "Invalid bz2 file." + name); + throw new BuildException("Invalid bz2 file." + name); } } return new CBZip2InputStream(istream); diff --git a/src/main/org/apache/tools/ant/taskdefs/WaitFor.java b/src/main/org/apache/tools/ant/taskdefs/WaitFor.java index d23beabc3..3f94d6fe2 100644 --- a/src/main/org/apache/tools/ant/taskdefs/WaitFor.java +++ b/src/main/org/apache/tools/ant/taskdefs/WaitFor.java @@ -268,8 +268,8 @@ public class WaitFor extends ConditionBase { /** * @see EnumeratedAttribute#getValues() + * {@inheritDoc} */ - /** {@inheritDoc} */ public String[] getValues() { return UNITS; } diff --git a/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison.java b/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison.java index 5976bce9e..617790a4a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison.java +++ b/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison.java @@ -66,4 +66,4 @@ public interface XSLTLiaison { */ void transform(File infile, File outfile) throws Exception; //NOSONAR -} //-- XSLTLiaison +} diff --git a/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison2.java b/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison2.java index f41f91511..0653b40a4 100644 --- a/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison2.java +++ b/src/main/org/apache/tools/ant/taskdefs/XSLTLiaison2.java @@ -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); diff --git a/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java b/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java index 8fce71eeb..676f6ae9a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java +++ b/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java @@ -607,6 +607,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) { @@ -616,6 +617,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() { @@ -625,6 +627,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) { @@ -634,6 +637,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) { @@ -643,6 +647,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) { @@ -652,6 +657,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) { @@ -661,6 +667,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) { @@ -674,6 +681,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { * processor other than trax or if the Transformer is not Xalan2's * transformer implementation.

    * + * @return TraceConfiguration * @since Ant 1.8.0 */ public TraceConfiguration createTrace() { @@ -688,6 +696,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { /** * Configuration for Xalan2 traces. * + * @return TraceConfiguration * @since Ant 1.8.0 */ public TraceConfiguration getTraceConfiguration() { @@ -719,7 +728,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(); @@ -753,7 +761,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { /** * specifies a single XML document to be styled. Should be used - * with the out attribute; ; required if out is set + * with the out attribute; required if out is set * * @param inFile the input file */ @@ -1021,6 +1029,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { } /** + * @param type String * @see ParamType * @since Ant 1.9.3 */ @@ -1056,6 +1065,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { } /** + * @return String * @see ParamType * @since Ant 1.9.3 */ @@ -1412,6 +1422,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) { @@ -1427,6 +1438,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) { @@ -1442,6 +1454,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) { @@ -1515,6 +1528,8 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { /** * The configured features. * @since Ant 1.9.8 + * + * @return Iterable<Feature> */ public Iterable getFeatures() { return features; @@ -1678,6 +1693,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; @@ -1686,6 +1703,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; @@ -1694,6 +1713,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; @@ -1702,6 +1723,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; @@ -1710,6 +1733,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; @@ -1718,6 +1743,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; @@ -1726,6 +1753,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; @@ -1734,6 +1763,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; @@ -1742,6 +1773,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; @@ -1750,6 +1783,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; @@ -1757,6 +1792,8 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { /** * The stream to write traces to. + * + * @return OutputStream */ public java.io.OutputStream getOutputStream() { return new LogOutputStream(XSLTProcess.this); diff --git a/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java b/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java index ffd89d1c1..c919d3365 100644 --- a/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java +++ b/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java @@ -140,7 +140,7 @@ import org.xml.sax.SAXException; * </classpath> * * - *

    This task requires the following attributes:

    + *

    This task requires the following attributes:

    * *
      *
    • file: The name of the file to load.
    • @@ -732,10 +732,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; } diff --git a/src/main/org/apache/tools/ant/taskdefs/Zip.java b/src/main/org/apache/tools/ant/taskdefs/Zip.java index d1e10654b..bc965e15a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Zip.java +++ b/src/main/org/apache/tools/ant/taskdefs/Zip.java @@ -505,6 +505,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) { @@ -513,6 +514,7 @@ public class Zip extends MatchingTask { /** * Assume 0 Unix mode is intentional. + * @return boolean * @since Ant 1.8.0 */ public boolean getPreserve0Permissions() { @@ -521,6 +523,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) { @@ -529,6 +532,7 @@ public class Zip extends MatchingTask { /** * Whether the language encoding flag will be used. + * @return boolean * @since Ant 1.8.0 */ public boolean getUseLanguageEnodingFlag() { @@ -537,6 +541,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) { @@ -545,6 +550,7 @@ public class Zip extends MatchingTask { /** * Whether Unicode extra fields will be created. + * @return boolean * @since Ant 1.8.0 */ public UnicodeExtraField getCreateUnicodeExtraFields() { @@ -557,6 +563,7 @@ public class Zip extends MatchingTask { * *

      Defaults to false.

      * + * @param b boolean * @since Ant 1.8.0 */ public void setFallBackToUTF8(final boolean b) { @@ -567,6 +574,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() { @@ -575,6 +583,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) { @@ -583,6 +592,7 @@ public class Zip extends MatchingTask { /** * Whether Zip64 extensions will be used. + * @return boolean * @since Ant 1.9.1 */ public Zip64ModeAttribute getZip64Mode() { @@ -606,6 +616,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.9.10 */ public String getModificationtime() { @@ -1691,7 +1702,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. @@ -1786,6 +1797,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() { @@ -1795,6 +1807,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) { @@ -2115,6 +2128,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 */ @@ -2141,6 +2155,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) { @@ -2156,8 +2172,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"}; @@ -2215,7 +2231,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 diff --git a/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java b/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java index 350dbe560..7b291f5e9 100644 --- a/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java +++ b/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java @@ -299,7 +299,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); diff --git a/src/main/org/apache/tools/ant/taskdefs/compilers/JavacExternal.java b/src/main/org/apache/tools/ant/taskdefs/compilers/JavacExternal.java index ab2845442..e227ecf24 100644 --- a/src/main/org/apache/tools/ant/taskdefs/compilers/JavacExternal.java +++ b/src/main/org/apache/tools/ant/taskdefs/compilers/JavacExternal.java @@ -66,9 +66,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; diff --git a/src/main/org/apache/tools/ant/taskdefs/condition/Http.java b/src/main/org/apache/tools/ant/taskdefs/condition/Http.java index 4c0427886..0958c2df6 100644 --- a/src/main/org/apache/tools/ant/taskdefs/condition/Http.java +++ b/src/main/org/apache/tools/ant/taskdefs/condition/Http.java @@ -67,7 +67,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". * @@ -82,6 +82,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) { diff --git a/src/main/org/apache/tools/ant/taskdefs/condition/IsLastModified.java b/src/main/org/apache/tools/ant/taskdefs/condition/IsLastModified.java index ddacd9987..a8bdbba81 100644 --- a/src/main/org/apache/tools/ant/taskdefs/condition/IsLastModified.java +++ b/src/main/org/apache/tools/ant/taskdefs/condition/IsLastModified.java @@ -153,8 +153,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 */ public boolean eval() throws BuildException { validate(); diff --git a/src/main/org/apache/tools/ant/taskdefs/condition/IsReachable.java b/src/main/org/apache/tools/ant/taskdefs/condition/IsReachable.java index e699da115..e673b828b 100644 --- a/src/main/org/apache/tools/ant/taskdefs/condition/IsReachable.java +++ b/src/main/org/apache/tools/ant/taskdefs/condition/IsReachable.java @@ -187,7 +187,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. diff --git a/src/main/org/apache/tools/ant/taskdefs/condition/Os.java b/src/main/org/apache/tools/ant/taskdefs/condition/Os.java index 974c396fb..7bd5b0123 100644 --- a/src/main/org/apache/tools/ant/taskdefs/condition/Os.java +++ b/src/main/org/apache/tools/ant/taskdefs/condition/Os.java @@ -102,8 +102,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 Bugzilla + * @see Jira */ private static final String DARWIN = "darwin"; @@ -126,8 +126,8 @@ public class Os implements Condition { /** * Sets the desired OS family type * - * @param f The OS family type desired
      - * Possible values:
      + * @param f The OS family type desired + *

      Possible values:

      *
        *
      • dos
      • *
      • mac
      • diff --git a/src/main/org/apache/tools/ant/taskdefs/condition/ResourceExists.java b/src/main/org/apache/tools/ant/taskdefs/condition/ResourceExists.java index feda65b24..0e4de586a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/condition/ResourceExists.java +++ b/src/main/org/apache/tools/ant/taskdefs/condition/ResourceExists.java @@ -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) { diff --git a/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java b/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java index b4b51ced2..81dadfd71 100644 --- a/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java @@ -42,36 +42,24 @@ import org.apache.tools.ant.util.FileUtils; * * It produces an XML output representing the list of changes. *
        - * <!-- 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)>
        + * <!-- 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)>
          * 
        * * @since Ant 1.5 @@ -191,6 +179,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) { diff --git a/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java b/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java index 6f17402d8..79111bd4c 100644 --- a/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java +++ b/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java @@ -45,9 +45,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. - *
        + * 
          * <!-- Root element -->
        - * <!ELEMENT tagdiff ( entry+ ) >
        + * <!ELEMENT tagdiff (entry+) >
          * <!-- Start tag of the report -->
          * <!ATTLIST tagdiff startTag NMTOKEN #IMPLIED >
          * <!-- End tag of the report -->
        @@ -58,16 +58,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 ) >
        - * 
        + * <!ELEMENT prevrevision (#PCDATA) > + *
        * * @since Ant 1.5 * @ant.task name="cvstagdiff" diff --git a/src/main/org/apache/tools/ant/taskdefs/email/EmailAddress.java b/src/main/org/apache/tools/ant/taskdefs/email/EmailAddress.java index edc9c9dcd..25e355566 100644 --- a/src/main/org/apache/tools/ant/taskdefs/email/EmailAddress.java +++ b/src/main/org/apache/tools/ant/taskdefs/email/EmailAddress.java @@ -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); diff --git a/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java b/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java index 0a5bc6817..7657794ee 100644 --- a/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java @@ -111,6 +111,7 @@ public class EmailTask extends Task { /** * Set the user for SMTP auth; this requires JavaMail. + * * @param user the String username. * @since Ant 1.6 */ @@ -120,6 +121,7 @@ public class EmailTask extends Task { /** * Set the password for SMTP auth; this requires JavaMail. + * * @param password the String password. * @since Ant 1.6 */ @@ -129,6 +131,7 @@ public class EmailTask extends Task { /** * Set whether to send data over SSL. + * * @param ssl boolean; if true SSL will be used. * @since Ant 1.6 */ @@ -139,6 +142,7 @@ public class EmailTask extends Task { /** * Set whether to allow authentication to switch to a TLS * connection via STARTTLS. + * * @param b boolean; if true STARTTLS will be supported. * @since Ant 1.8.0 */ @@ -425,6 +429,7 @@ public class EmailTask extends Task { *

        Even with this property set to true the task will still fail * if the mail couldn't be sent to any recipient at all.

        * + * @param b boolean * @since Ant 1.8.0 */ public void setIgnoreInvalidRecipients(boolean b) { diff --git a/src/main/org/apache/tools/ant/taskdefs/email/Mailer.java b/src/main/org/apache/tools/ant/taskdefs/email/Mailer.java index 4aaa9823c..352ae0b57 100644 --- a/src/main/org/apache/tools/ant/taskdefs/email/Mailer.java +++ b/src/main/org/apache/tools/ant/taskdefs/email/Mailer.java @@ -74,6 +74,8 @@ public abstract class Mailer { /** * Whether the port has been explicitly specified by the user. + * + * @param explicit boolean * @since Ant 1.8.2 */ public void setPortExplicitlySpecified(boolean explicit) { @@ -82,6 +84,8 @@ public abstract class Mailer { /** * Whether the port has been explicitly specified by the user. + * + * @return boolean * @since Ant 1.8.2 */ protected boolean isPortExplicitlySpecified() { @@ -151,9 +155,9 @@ public abstract class Mailer { } /** - * Set the replyto addresses. + * Set the replyTo addresses. * - * @param list a vector of reployTo addresses. + * @param list a vector of replyTo addresses. * @since Ant 1.6 */ public void setReplyToList(Vector list) { @@ -247,6 +251,7 @@ public abstract class Mailer { *

        Even with this property set to true the task will still fail * if the mail couldn't be sent to any recipient at all.

        * + * @param b boolean * @since Ant 1.8.0 */ public void setIgnoreInvalidRecipients(boolean b) { @@ -256,6 +261,7 @@ public abstract class Mailer { /** * Whether invalid recipients should be ignored. * + * @return boolean * @since Ant 1.8.0 */ protected boolean shouldIgnoreInvalidRecipients() { @@ -267,7 +273,6 @@ public abstract class Mailer { * header. * * @return the current date in SMTP suitable format. - * * @since Ant 1.5 */ protected final String getDate() { diff --git a/src/main/org/apache/tools/ant/taskdefs/launcher/CommandLauncher.java b/src/main/org/apache/tools/ant/taskdefs/launcher/CommandLauncher.java index f39fff046..cc9fb886f 100644 --- a/src/main/org/apache/tools/ant/taskdefs/launcher/CommandLauncher.java +++ b/src/main/org/apache/tools/ant/taskdefs/launcher/CommandLauncher.java @@ -131,6 +131,9 @@ public class CommandLauncher { /** * Obtains the shell launcher configured for the given project or * the default shell launcher. + * + * @param project Project + * @return CommandLauncher */ public static CommandLauncher getShellLauncher(Project project) { CommandLauncher launcher = extractLauncher(ANT_SHELL_LAUNCHER_REF_ID, @@ -145,6 +148,9 @@ public class CommandLauncher { /** * Obtains the VM launcher configured for the given project or * the default VM launcher. + * + * @param project Project + * @return CommandLauncher */ public static CommandLauncher getVMLauncher(Project project) { CommandLauncher launcher = extractLauncher(ANT_VM_LAUNCHER_REF_ID, @@ -192,6 +198,9 @@ public class CommandLauncher { /** * Sets the VM launcher to use for the given project. + * + * @param project Project + * @param launcher CommandLauncher */ public static void setVMLauncher(Project project, CommandLauncher launcher) { @@ -202,6 +211,9 @@ public class CommandLauncher { /** * Sets the shell launcher to use for the given project. + * + * @param project Project + * @param launcher CommandLauncher */ public static void setShellLauncher(Project project, CommandLauncher launcher) { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java b/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java index 605b33684..ba8afd275 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java @@ -96,7 +96,7 @@ public class ANTLR extends Task { /** * The grammar file to process. - * @param target the gramer file + * @param target the grammar file */ public void setTarget(File target) { log("Setting target to: " + target.toString(), Project.MSG_VERBOSE); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java b/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java index 30bcc759c..141ed17ff 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java @@ -55,35 +55,38 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; /** - * Displays all the current properties in the build. The output can be sent to - * a file if desired.

        - * - * Attribute "destfile" defines a file to send the properties to. This can be - * processed as a standard property file later.

        - * - * Attribute "prefix" defines a prefix which is used to filter the properties - * only those properties starting with this prefix will be echoed.

        - * - * By default, the "failonerror" attribute is enabled. If an error occurs while - * writing the properties to a file, and this attribute is enabled, then a - * BuildException will be thrown. If disabled, then IO errors will be reported - * as a log statement, but no error will be thrown.

        - * - * Examples:

        + * Displays all the current properties in the build. The output can be sent to
        + * a file if desired.
        + * 

        + * Attribute "destfile" defines a file to send the properties to. This can be + * processed as a standard property file later. + *

        + *

        + * Attribute "prefix" defines a prefix which is used to filter the properties + * only those properties starting with this prefix will be echoed. + *

        + *

        + * By default, the "failonerror" attribute is enabled. If an error occurs while + * writing the properties to a file, and this attribute is enabled, then a + * BuildException will be thrown. If disabled, then IO errors will be reported + * as a log statement, but no error will be thrown. + *

        + *

        Examples:

          *  <echoproperties  />
        - * 
        Report the current properties to the log.

        - * - *

        + * 
        + * Report the current properties to the log. + *
          *  <echoproperties destfile="my.properties" />
        - * 
        Report the current properties to the file "my.properties", and will - * fail the build if the file could not be created or written to.

        - * - *

        + * 
        + * Report the current properties to the file "my.properties", and will + * fail the build if the file could not be created or written to. + *
          *  <echoproperties destfile="my.properties" failonerror="false"
          *      prefix="ant" />
        - * 
        Report all properties beginning with 'ant' to the file - * "my.properties", and will log a message if the file could not be created or - * written to, but will still allow the build to continue. + *
        + * Report all properties beginning with 'ant' to the file + * "my.properties", and will log a message if the file could not be created or + * written to, but will still allow the build to continue. * *@since Ant 1.5 */ @@ -115,15 +118,15 @@ public class EchoProperties extends Task { private File inFile = null; /** - * File object pointing to the output file. If this is null, then - * we output to the project log, not to a file. + * File object pointing to the output file. If this is null, then + * we output to the project log, not to a file. */ private File destfile = null; /** - * If this is true, then errors generated during file output will become - * build errors, and if false, then such errors will be logged, but not - * thrown. + * If this is true, then errors generated during file output will become + * build errors, and if false, then such errors will be logged, but not + * thrown. */ private boolean failonerror = true; @@ -151,7 +154,7 @@ public class EchoProperties extends Task { * Set a file to store the property output. If this is never specified, * then the output will be sent to the Ant log. * - *@param destfile file to store the property output + * @param destfile file to store the property output */ public void setDestfile(File destfile) { this.destfile = destfile; @@ -162,7 +165,7 @@ public class EchoProperties extends Task { * If true, the task will fail if an error occurs writing the properties * file, otherwise errors are just logged. * - *@param failonerror true if IO exceptions are reported as build + * @param failonerror true if IO exceptions are reported as build * exceptions, or false if IO exceptions are ignored. */ public void setFailOnError(boolean failonerror) { @@ -171,15 +174,15 @@ public class EchoProperties extends Task { /** - * If the prefix is set, then only properties which start with this - * prefix string will be recorded. If regex is not set and if this - * is never set, or it is set to an empty string or null, - * then all properties will be recorded.

        + * If the prefix is set, then only properties which start with this + * prefix string will be recorded. If regex is not set and if this + * is never set, or it is set to an empty string or null, + * then all properties will be recorded. * - * For example, if the attribute is set as: - *

        <echoproperties  prefix="ant." />
        - * then the property "ant.home" will be recorded, but "ant-example" - * will not. + *

        For example, if the attribute is set as:

        + *
        <echoproperties  prefix="ant." />
        + * then the property "ant.home" will be recorded, but "ant-example" + * will not. * * @param prefix The new prefix value */ @@ -194,15 +197,15 @@ public class EchoProperties extends Task { } /** - * If the regex is set, then only properties whose names match it - * will be recorded. If prefix is not set and if this is never set, - * or it is set to an empty string or null, then all - * properties will be recorded.

        + * If the regex is set, then only properties whose names match it + * will be recorded. If prefix is not set and if this is never set, + * or it is set to an empty string or null, then all + * properties will be recorded. * - * For example, if the attribute is set as: - *

        <echoproperties  prefix=".*ant.*" />
        - * then the properties "ant.home" and "user.variant" will be recorded, - * but "ant-example" will not. + *

        For example, if the attribute is set as:

        + *
        <echoproperties  prefix=".*ant.*" />
        + * then the properties "ant.home" and "user.variant" will be recorded, + * but "ant-example" will not. * * @param regex The new regex value * @@ -252,9 +255,9 @@ public class EchoProperties extends Task { } /** - * Run the task. + * Run the task. * - *@exception BuildException trouble, probably file IO + * @exception BuildException trouble, probably file IO */ public void execute() throws BuildException { if (prefix != null && regex != null) { @@ -368,10 +371,10 @@ public class EchoProperties extends Task { /** - * Send the key/value pairs in the hashtable to the given output stream. - * Only those properties matching the prefix constraint will be - * sent to the output stream. - * The output stream will be closed when this method returns. + * Send the key/value pairs in the hashtable to the given output stream. + * Only those properties matching the prefix constraint will be + * sent to the output stream. + * The output stream will be closed when this method returns. * * @param allProps propfile to save * @param os output stream @@ -461,7 +464,7 @@ public class EchoProperties extends Task { } private List sortProperties(Properties props) { - //sort the list. Makes SCM and manual diffs easier. + // sort the list. Makes SCM and manual diffs easier. List sorted = new ArrayList(props.size()); Enumeration e = props.propertyNames(); while (e.hasMoreElements()) { @@ -511,14 +514,14 @@ public class EchoProperties extends Task { } /** - * JDK 1.2 allows for the safer method - * Properties.store(OutputStream, String), which throws an - * IOException on an output error. + * JDK 1.2 allows for the safer method + * Properties.store(OutputStream, String), which throws an + * IOException on an output error. * - *@param props the properties to record - *@param os record the properties to this output stream - *@param header prepend this header to the property output - *@exception IOException on an I/O error during a write. + * @param props the properties to record + * @param os record the properties to this output stream + * @param header prepend this header to the property output + * @exception IOException on an I/O error during a write. */ protected void jdkSaveProperties(Properties props, OutputStream os, String header) throws IOException { @@ -542,7 +545,7 @@ public class EchoProperties extends Task { /** * Uses the DocumentBuilderFactory to get a DocumentBuilder instance. * - * @return The DocumentBuilder instance + * @return The DocumentBuilder instance */ private static DocumentBuilder getDocumentBuilder() { try { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java b/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java index 06e1d110d..bf2d679a1 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java @@ -411,6 +411,7 @@ public class Javah extends Task { * The classpath to use when loading the javah implementation * if it is not a built-in one. * + * @return Path * @since Ant 1.8.0 */ public Path createImplementationClasspath() { @@ -419,6 +420,8 @@ public class Javah extends Task { /** * Set the adapter explicitly. + * + * @param adapter JavahAdapter * @since Ant 1.8.0 */ public void add(JavahAdapter adapter) { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java b/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java index 81a386fd2..2221e3985 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java @@ -69,6 +69,7 @@ public class Native2Ascii extends MatchingTask { /** * The value of the reverse attribute. + * * @return the reverse attribute. * @since Ant 1.6.3 */ @@ -89,6 +90,7 @@ public class Native2Ascii extends MatchingTask { /** * The value of the encoding attribute. + * * @return the encoding attribute. * @since Ant 1.6.3 */ @@ -127,6 +129,7 @@ public class Native2Ascii extends MatchingTask { /** * Choose the implementation for this particular task. + * * @param impl the name of the implementation * @since Ant 1.6.3 */ @@ -142,7 +145,6 @@ public class Native2Ascii extends MatchingTask { * Defines the FileNameMapper to use (nested mapper element). * * @return the mapper to use for file name translations. - * * @throws BuildException if more than one mapper is defined. */ public Mapper createMapper() throws BuildException { @@ -156,6 +158,7 @@ public class Native2Ascii extends MatchingTask { /** * A nested filenamemapper + * * @param fileNameMapper the mapper to add * @since Ant 1.6.3 */ @@ -165,8 +168,8 @@ public class Native2Ascii extends MatchingTask { /** * Adds an implementation specific command-line argument. - * @return a ImplementationSpecificArgument to be configured * + * @return a ImplementationSpecificArgument to be configured * @since Ant 1.6.3 */ public ImplementationSpecificArgument createArg() { @@ -180,6 +183,7 @@ public class Native2Ascii extends MatchingTask { * The classpath to use when loading the native2ascii * implementation if it is not a built-in one. * + * @return Path * @since Ant 1.8.0 */ public Path createImplementationClasspath() { @@ -188,6 +192,8 @@ public class Native2Ascii extends MatchingTask { /** * Set the adapter explicitly. + * + * @param adapter Native2AsciiAdapter * @since Ant 1.8.0 */ public void add(Native2AsciiAdapter adapter) { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java b/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java index dff24bc9b..3f85ed749 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java @@ -81,16 +81,15 @@ import org.apache.tools.ant.util.FileUtils; * *

        When this task executes, it will recursively scan the srcdir * looking for NetRexx source files to compile. This task makes its - * compile decision based on timestamp. + * compile decision based on timestamp.

        *

        Before files are compiled they and any other file in the * srcdir will be copied to the destdir allowing support files to be * located properly in the classpath. The reason for copying the source files - * before the compile is that NetRexxC has only two destinations for classfiles: + * before the compile is that NetRexxC has only two destinations for classfiles:

        *
          *
        1. The current directory, and,
        2. *
        3. The directory the source is in (see sourcedir option) *
        - * */ public class NetRexxC extends MatchingTask { @@ -565,7 +564,8 @@ public class NetRexxC extends MatchingTask { /** * Tells whether the trailing .keep in nocompile-mode should be removed * so that the resulting java source really ends on .java. - * This facilitates the use of the javadoc tool lateron. + * This facilitates the use of the javadoc tool later on. + * @param removeKeepExtension boolean */ public void setRemoveKeepExtension(boolean removeKeepExtension) { this.removeKeepExtension = removeKeepExtension; diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/PropertyFile.java b/src/main/org/apache/tools/ant/taskdefs/optional/PropertyFile.java index 02106a97d..f9f317c01 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/PropertyFile.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/PropertyFile.java @@ -56,16 +56,17 @@ import org.apache.tools.ant.util.LayoutPreservingProperties; * <entry key="product.version.major" type="int" value="5"/> * <entry key="product.version.minor" type="int" value="0"/> * <entry key="product.build.major" type="int" value="0" /> - * <entry key="product.build.minor" type="int" operation="+" /> - * <entry key="product.build.date" type="date" value="now" /> + * <entry key="product.build.minor" type="int" operation="+"/> + * <entry key="product.build.date" type="date" value="now"/> * <entry key="intSet" type="int" operation="=" value="681"/> * <entry key="intDec" type="int" operation="-"/> * <entry key="StringEquals" type="string" value="testValue"/> * </propertyfile> * </target> * - * + *

        * The <propertyfile> task must have: + *

        *
          *
        • file
        • *
        @@ -77,8 +78,9 @@ import org.apache.tools.ant.util.LayoutPreservingProperties; *
      • type
      • *
      • value (the final four being eliminated shortly)
      • *
      - * + *

      * The <entry> task must have: + *

      *
        *
      • key
      • *
      @@ -90,24 +92,29 @@ import org.apache.tools.ant.util.LayoutPreservingProperties; *
    • default
    • *
    • unit
    • *
    - * + *

    * If type is unspecified, it defaults to string. - * + *

    * Parameter values: - *
      - *
    • operation:
    • + *
      + *
      operation:
      + *
      *
        *
      • "=" (set -- default)
      • *
      • "-" (dec)
      • *
      • "+" (inc)
      • *
      - *
    • type:
    • + *
      + *
      type:
      + *
      *
        *
      • "int"
      • *
      • "date"
      • *
      • "string"
      • *
      - *
    • value:
    • + *
      + *
      value:
      + *
      *
        *
      • holds the default value, if the property * was not found in property file
      • @@ -116,7 +123,8 @@ import org.apache.tools.ant.util.LayoutPreservingProperties; * date/time and used even if a valid date was * found in the property file. *
      - *
    + * + * * *

    String property types can only use the "=" operation. * Int property types can only use the "=", "-" or "+" operations.

    @@ -246,6 +254,7 @@ public class PropertyFile extends Task { /** * optional flag to use original Java properties (as opposed to * layout preserving properties) + * @param val boolean */ public void setJDKProperties(boolean val) { useJDKProperties = val; diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java b/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java index d088096ab..cf07885d7 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java @@ -148,6 +148,7 @@ public class ReplaceRegExp extends Task { /** * file for which the regular expression should be replaced; * required unless a nested fileset is supplied. + * * @param file The file for which the reg exp should be replaced. */ public void setFile(File file) { @@ -158,6 +159,7 @@ public class ReplaceRegExp extends Task { /** * the regular expression pattern to match in the file(s); * required if no nested <regexp> is used + * * @param match the match attribute. */ public void setMatch(String match) { @@ -174,6 +176,7 @@ public class ReplaceRegExp extends Task { * The substitution pattern to place in the file(s) in place * of the regular expression. * Required if no nested <substitution> is used + * * @param replace the replace attribute */ @@ -191,15 +194,16 @@ public class ReplaceRegExp extends Task { * The flags to use when matching the regular expression. For more * information, consult the Perl5 syntax. *

      - *
    • g : Global replacement. Replace all occurrences found - *
    • i : Case Insensitive. Do not consider case in the match + *
    • g : Global replacement. Replace all occurrences found
    • + *
    • i : Case Insensitive. Do not consider case in the match
    • *
    • m : Multiline. Treat the string as multiple lines of input, * using "^" and "$" as the start or end of any line, respectively, - * rather than start or end of string. - *
    • s : Singleline. Treat the string as a single line of input, using + * rather than start or end of string.
    • + *
    • s : Singleline. Treat the string as a single line of input, using * "." to match any character, including a newline, which normally, - * it would not match. - *
    + * it would not match. + * + * * @param flags the flags attribute */ public void setFlags(String flags) { @@ -244,8 +248,8 @@ public class ReplaceRegExp extends Task { /** * Specifies the encoding Ant expects the files to be in - * defaults to the platforms default encoding. - * @param encoding the encoding attribute * + * @param encoding the encoding attribute * @since Ant 1.6 */ public void setEncoding(String encoding) { @@ -254,6 +258,7 @@ public class ReplaceRegExp extends Task { /** * list files to apply the replacement to + * * @param set the fileset element */ public void addFileset(FileSet set) { @@ -263,6 +268,7 @@ public class ReplaceRegExp extends Task { /** * Support arbitrary file system based resource collections. * + * @param rc ResourceCollection * @since Ant 1.8.0 */ public void addConfigured(ResourceCollection rc) { @@ -294,6 +300,7 @@ public class ReplaceRegExp extends Task { /** * A substitution pattern. You can use this element to refer to a previously * defined substitution pattern datatype instance. + * * @return the substitution pattern object to be configured as an element */ public Substitution createSubstitution() { @@ -310,6 +317,7 @@ public class ReplaceRegExp extends Task { * 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) { @@ -344,7 +352,7 @@ public class ReplaceRegExp extends Task { /** - * Perform the replacement on a file + * Perform the replacement on a file * * @param f the file to perform the replacement on * @param options the regular expressions options diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java b/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java index 765841d60..d58238b57 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java @@ -203,7 +203,7 @@ public class Rpm extends Task { /** * The directory which will have the expected - * subdirectories, SPECS, SOURCES, BUILD, SRPMS ; optional. + * subdirectories, SPECS, SOURCES, BUILD, SRPMS; optional. * If this isn't specified, * the baseDir value is used * diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/SchemaValidate.java b/src/main/org/apache/tools/ant/taskdefs/optional/SchemaValidate.java index e57d6d226..30801deb9 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/SchemaValidate.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/SchemaValidate.java @@ -224,7 +224,7 @@ public class SchemaValidate extends XMLValidateTask { //setFeature(XmlConstants.FEATURE_VALIDATION, false); setFeature(XmlConstants.FEATURE_NAMESPACES, true); if (!enableXercesSchemaValidation() && !enableJAXP12SchemaValidation()) { - //couldnt use the xerces or jaxp calls + //could not use xerces or jaxp calls throw new BuildException(ERROR_NO_XSD_SUPPORT); } @@ -306,7 +306,7 @@ public class SchemaValidate extends XMLValidateTask { try { getXmlReader().setFeature(feature, value); } catch (SAXNotRecognizedException e) { - log("Not recognizied: " + feature, Project.MSG_VERBOSE); + log("Not recognized: " + feature, Project.MSG_VERBOSE); } catch (SAXNotSupportedException e) { log("Not supported: " + feature, Project.MSG_VERBOSE); } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/Script.java b/src/main/org/apache/tools/ant/taskdefs/optional/Script.java index 2b8d9f65d..a29347f68 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/Script.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/Script.java @@ -72,7 +72,7 @@ public class Script extends Task { } /** - * Load the script from an external file ; optional. + * Load the script from an external file; optional. * * @param fileName the name of the file containing the script source. */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java b/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java index 605aba969..569f5ed73 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java @@ -317,7 +317,6 @@ public class TraXLiaison implements XSLTLiaison4, ErrorListener, XSLTLoggerAware /** * Create a new transformer based on the liaison settings - * @throws Exception thrown if there is an error during creation. * @see #setStylesheet(java.io.File) * @see #addParam(java.lang.String, java.lang.String) * @see #setOutputProperty(java.lang.String, java.lang.String) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java index 05c043df0..7b9d3bb85 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java @@ -145,10 +145,10 @@ public class XMLValidateTask extends Task { * Specify the class name of the SAX parser to be used. (optional) * @param className should be an implementation of SAX2 * org.xml.sax.XMLReader or SAX2 org.xml.sax.Parser. - *

    if className is an implementation of + *

    If className is an implementation of * org.xml.sax.Parser, {@link #setLenient(boolean)}, - * will be ignored. - *

    if not set, the default will be used. + * will be ignored.

    + *

    If not set, the default will be used.

    * @see org.xml.sax.XMLReader * @see org.xml.sax.Parser */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.java index 350d673c7..7777718a4 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.java @@ -109,22 +109,22 @@ public class CCMCreateTask extends Continuus implements ExecuteStreamHandler { if (getPlatform() != null) { cmd.createArgument().setValue(FLAG_PLATFORM); cmd.createArgument().setValue(getPlatform()); - } // end of if () + } if (getResolver() != null) { cmd.createArgument().setValue(FLAG_RESOLVER); cmd.createArgument().setValue(getResolver()); - } // end of if () + } if (getSubSystem() != null) { cmd.createArgument().setValue(FLAG_SUBSYSTEM); cmd.createArgument().setValue("\"" + getSubSystem() + "\""); - } // end of if () + } if (getRelease() != null) { cmd.createArgument().setValue(FLAG_RELEASE); cmd.createArgument().setValue(getRelease()); - } // end of if () + } } @@ -319,15 +319,15 @@ public class CCMCreateTask extends Continuus implements ExecuteStreamHandler { taskstring = taskstring.substring(0, taskstring.lastIndexOf(' ')).trim(); setTask(taskstring); log("task is " + getTask(), Project.MSG_DEBUG); - } // end of if () + } } catch (NullPointerException npe) { - log("error procession stream , null pointer exception", Project.MSG_ERR); + log("error procession stream, null pointer exception", Project.MSG_ERR); log(StringUtils.getStackTrace(npe), Project.MSG_ERR); throw new BuildException(npe.getClass().getName()); } catch (Exception e) { log("error procession stream " + e.getMessage(), Project.MSG_ERR); throw new BuildException(e.getMessage()); - } // end of try-catch + } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java index 28f806459..35a08343b 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java @@ -74,11 +74,11 @@ public class CCMReconfigure extends Continuus { if (isRecurse()) { cmd.createArgument().setValue(FLAG_RECURSE); - } // end of if () + } if (isVerbose()) { cmd.createArgument().setValue(FLAG_VERBOSE); - } // end of if () + } if (getCcmProject() != null) { cmd.createArgument().setValue(FLAG_PROJECT); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java index 371d418bd..f7c4a5fa3 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java @@ -29,6 +29,7 @@ import org.apache.tools.ant.types.Commandline; *

    * The following attributes are interpreted: * + * * * * diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java index 0eaf09acc..e60bfc966 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java @@ -30,6 +30,7 @@ import org.apache.tools.ant.types.Commandline; *

    * The following attributes are interpreted: *

    Task attributes
    AttributeValues
    + * * * * diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCLock.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCLock.java index c273554e7..ba7def72e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCLock.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCLock.java @@ -37,6 +37,7 @@ import org.apache.tools.ant.types.Commandline; *

    * The following attributes are interpreted: *

    Task attributes
    AttributeValues
    + * * * * diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkattr.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkattr.java index 128ea16b7..89b55f970 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkattr.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkattr.java @@ -29,6 +29,7 @@ import org.apache.tools.ant.types.Commandline; *

    * The following attributes are interpreted: *

    Task attributes
    AttributeValues
    + * * * * diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkbl.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkbl.java index 82c960051..ac0f42b06 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkbl.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkbl.java @@ -28,6 +28,7 @@ import org.apache.tools.ant.types.Commandline; *

    * The following attributes are interpreted: *

    Task attributes
    AttributeValues
    + * * * * diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkdir.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkdir.java index 4c89539fe..441ff52f0 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkdir.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkdir.java @@ -29,6 +29,7 @@ import org.apache.tools.ant.types.Commandline; *

    * The following attributes are interpreted: *

    Task attributes
    AttributeValues
    + * * * * diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkelem.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkelem.java index 94faa5a6c..53d2f0bf1 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkelem.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkelem.java @@ -29,6 +29,7 @@ import org.apache.tools.ant.types.Commandline; *

    * The following attributes are interpreted: *

    Task attributes
    AttributeValues
    + * * * * diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklabel.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklabel.java index e3d288df5..b1a96868f 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklabel.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklabel.java @@ -28,6 +28,7 @@ import org.apache.tools.ant.types.Commandline; *

    * The following attributes are interpreted: *

    Task attributes
    AttributeValues
    + * * * * diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklbtype.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklbtype.java index 7bb7192e8..04db9cda4 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklbtype.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklbtype.java @@ -28,6 +28,7 @@ import org.apache.tools.ant.types.Commandline; *

    * The following attributes are interpreted: *

    Task attributes
    AttributeValues
    + * * * * diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCRmtype.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCRmtype.java index cef0c3a57..82a9e6399 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCRmtype.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCRmtype.java @@ -28,6 +28,7 @@ import org.apache.tools.ant.types.Commandline; *

    * The following attributes are interpreted: *

    Task attributes
    AttributeValues
    + * * * * @@ -41,7 +42,7 @@ import org.apache.tools.ant.types.Commandline; * eltype element type
    * hltype hyperlink type
    * lbtype label type
    - * trtype trigger type
    + * trtype trigger type * * * diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java index 3c00e1af1..6d7e4883f 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java @@ -29,6 +29,7 @@ import org.apache.tools.ant.types.Commandline; *

    * The following attributes are interpreted: *

    Task attributes
    AttributeValuesYes
    + * * * * diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnlock.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnlock.java index 4ca3e8905..7d7272670 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnlock.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnlock.java @@ -34,6 +34,7 @@ import org.apache.tools.ant.types.Commandline; *

    * The following attributes are interpreted: *

    Task attributes
    AttributeValues
    + * * * * diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java index 712efdcae..a8ee850aa 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java @@ -29,6 +29,7 @@ import org.apache.tools.ant.types.Commandline; *

    * The following attributes are interpreted: *

    Task attributes
    AttributeValues
    + * * * * diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java b/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java index 2cf335cbe..7b5113392 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java @@ -553,7 +553,7 @@ public class Depend extends MatchingTask { * warn when a class is out of date, but not deleted as its source is unknown. * MSG_WARN is the normal level, but we downgrade to MSG_VERBOSE for RMI files * if {@link #warnOnRmiStubs is false} - * @param affectedClassInfo info about the affectd class + * @param affectedClassInfo info about the affected class * @param affectedClass the name of the affected .class file * @param className the file that is triggering the out of dateness */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/MethodHandleCPInfo.java b/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/MethodHandleCPInfo.java index e11e3aabd..a5906c745 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/MethodHandleCPInfo.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/MethodHandleCPInfo.java @@ -29,7 +29,7 @@ public class MethodHandleCPInfo extends ConstantPoolEntry { /** reference kind **/ private ReferenceKind referenceKind; - /** Must be a valid index into the constant pool tabel. */ + /** Must be a valid index into the constant pool table. */ private int referenceIndex; /** * the index into the constant pool which defined the name and type diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java index 158cba937..ac2aa7224 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java @@ -175,7 +175,7 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase { /** * Resolve the entity. - * @see org.xml.sax.EntityResolver#resolveEntity(String, String). + * @see org.xml.sax.EntityResolver#resolveEntity(String, String) * @param publicId The public identifier, or null * if none is available. * @param systemId The system identifier provided in the XML diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java index 6e7166b03..0728b755b 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java @@ -196,7 +196,7 @@ public class EjbJar extends MatchingTask { * Stores a handle to the directory to put the Jar files in. This is * only used by the generic deployment descriptor tool which is created * if no other deployment descriptor tools are provided. Normally each - * deployment tool will specify the desitination dir itself. + * deployment tool will specify the destination dir itself. */ private File destDir; @@ -481,11 +481,11 @@ public class EjbJar extends MatchingTask { /** * Sets the CMP version. + * Must be either 1.0 or 2.0. + * Default is 1.0. + * Initially, only the JBoss implementation does something specific for CMP 2.0. * * @param version CMP version. - * Must be either 1.0 or 2.0.
    - * Default is 1.0.
    - * Initially, only the JBoss implementation does something specific for CMP 2.0.
    * @since ant 1.6 */ public void setCmpversion(CMPVersion version) { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java index 43b923705..964a455ac 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java @@ -395,7 +395,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { try { handler = getDescriptorHandler(config.srcDir); - // Retrive the files to be added to JAR from EJB descriptor + // Retreive the files to be added to JAR from EJB descriptor Hashtable ejbFiles = parseEjbFiles(descriptorFileName, saxParser); // Add any support classes specified in the build file @@ -649,7 +649,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { /** * Add any vendor specific files which should be included in the * EJB Jar. - * @param ejbFiles a hashtable entryname -> file. + * @param ejbFiles a hashtable entryname -> file. * @param ddPrefix a prefix to use. */ protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix) { @@ -660,7 +660,9 @@ public class GenericDeploymentTool implements EJBDeploymentTool { /** * Get the vendor specific name of the Jar that will be output. The modification date * of this jar will be checked against the dependent bean classes. + * * @param baseName the basename to use. + * @return File */ File getVendorOutputJarFile(String baseName) { return new File(destDir, baseName + genericJarSuffix); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetDeploymentTool.java index cbc8526aa..790cad6bc 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetDeploymentTool.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetDeploymentTool.java @@ -35,9 +35,8 @@ import org.xml.sax.SAXException; * ejbjar task. If only stubs and skeletons need to be generated * (in other words, if no JAR file needs to be created), refer to the * iplanet-ejbc task and the IPlanetEjbcTask class. - *

    - * The following attributes may be specified by the user: - *

      + *

      The following attributes may be specified by the user:

      + *
        *
      • destdir -- The base directory into which the generated JAR * files will be written. Each JAR file is written * in directories which correspond to their location @@ -72,15 +71,14 @@ import org.xml.sax.SAXException; *
      • suffix -- String value appended to the JAR filename when * creating each JAR. This attribute is not required * (if omitted, it defaults to ".jar"). - *
      - *

      - * For each EJB descriptor found in the "ejbjar" parent task, this deployment + *

    + *

    For each EJB descriptor found in the "ejbjar" parent task, this deployment * tool will locate the three classes that comprise the EJB. If these class * files cannot be located in the specified srcdir directory, the * task will fail. The task will also attempt to locate the EJB stubs and * skeletons in this directory. If found, the timestamps on the stubs and * skeletons will be checked to ensure they are up to date. Only if these files - * cannot be found or if they are out of date will ejbc be called. + * cannot be found or if they are out of date will ejbc be called.

    * * @see IPlanetEjbc */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java index 76b61ae36..447a28826 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java @@ -54,16 +54,14 @@ import org.apache.tools.ant.util.StringUtils; * and skeletons in the specified destination directory. Only if the stubs and * skeletons cannot be found or if they're out of date will the iPlanet * Application Server ejbc utility be run. - *

    - * Because this class (and it's assorted inner classes) may be bundled into the + *

    Because this class (and it's assorted inner classes) may be bundled into the * iPlanet Application Server distribution at some point (and removed from the * Ant distribution), the class has been written to be independent of all * Ant-specific classes. It is also for this reason (and to avoid cluttering * the Apache Ant source files) that this utility has been packaged into a - * single source file. - *

    - * For more information on Ant Tasks for iPlanet Application Server, see the - * IPlanetDeploymentTool and IPlanetEjbcTask classes. + * single source file.

    + *

    For more information on Ant Tasks for iPlanet Application Server, see the + * IPlanetDeploymentTool and IPlanetEjbcTask classes.

    * * @see IPlanetDeploymentTool * @see IPlanetEjbcTask @@ -327,15 +325,12 @@ public class IPlanetEjbc { } catch (IOException e) { System.out.println("An IOException has occurred while reading the " + "XML descriptors (" + e.getMessage() + ")."); - return; } catch (SAXException e) { System.out.println("A SAXException has occurred while reading the " + "XML descriptors (" + e.getMessage() + ")."); - return; } catch (IPlanetEjbc.EjbcException e) { System.out.println("An error has occurred while executing the ejbc " + "utility (" + e.getMessage() + ")."); - return; } } @@ -417,7 +412,7 @@ public class IPlanetEjbc { args.append(arguments[i]).append(" "); } - /* If an iAS home directory is specified, prepend it to the commmand */ + /* If an iAS home directory is specified, prepend it to the command */ String command; if (iasHomeDir == null) { command = ""; @@ -1129,12 +1124,9 @@ public class IPlanetEjbc { * implementation) and returns the modification timestamp for the * "oldest" class. * - * @param classpath The classpath to be used to find the source EJB - * classes. If null, the system classpath - * is used. + * @param buildDir The directory to be used to find the source EJB + * classes. * @return The modification timestamp for the "oldest" EJB source class. - * @throws BuildException If one of the EJB source classes cannot be - * found on the classpath. */ private long sourceClassesModified(File buildDir) { long latestModified; // The timestamp of the "newest" class @@ -1223,16 +1215,14 @@ public class IPlanetEjbc { /** * Examines each of the EJB stubs and skeletons in the destination * directory and returns the modification timestamp for the "oldest" - * class. If one of the stubs or skeletons cannot be found, -1 - * is returned. + * class. If one of the stubs or skeletons cannot be found, + * -1 is returned. * - * @param dest The directory in which the EJB stubs and skeletons are + * @param destDir The directory in which the EJB stubs and skeletons are * stored. * @return The modification timestamp for the "oldest" EJB stub or - * skeleton. If one of the classes cannot be found, -1 - * is returned. - * @throws BuildException If the canonical path of the destination - * directory cannot be found. + * skeleton. If one of the classes cannot be found, + * -1 is returned. */ private long destClassesModified(File destDir) { String[] classnames = classesToGenerate(); // List of all stubs & skels diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/JbossDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/JbossDeploymentTool.java index 79f4574ef..e6f819215 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/JbossDeploymentTool.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/JbossDeploymentTool.java @@ -76,7 +76,6 @@ public class JbossDeploymentTool extends GenericDeploymentTool { log("Unable to locate jboss cmp descriptor. " + "It was expected to be in " + jbossCMPD.getPath(), Project.MSG_VERBOSE); - return; } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/OrionDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/OrionDeploymentTool.java index 93bbbc0dd..02d646ee0 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/OrionDeploymentTool.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/OrionDeploymentTool.java @@ -35,13 +35,15 @@ public class OrionDeploymentTool extends GenericDeploymentTool { protected static final String ORION_DD = "orion-ejb-jar.xml"; - /** Instance variable that stores the suffix for the jboss jarfile. */ private String jarSuffix = ".jar"; /** * Add any vendor specific files which should be included in the * EJB Jar. + * + * @param ejbFiles Hashtable<String, File> + * @param baseName String */ protected void addVendorFiles(Hashtable ejbFiles, String baseName) { String ddPrefix = (usingBaseJarName() ? "" : baseName ); @@ -51,7 +53,6 @@ public class OrionDeploymentTool extends GenericDeploymentTool { ejbFiles.put(META_DIR + ORION_DD, orionDD); } else { log("Unable to locate Orion deployment descriptor. It was expected to be in " + orionDD.getPath(), Project.MSG_WARN); - return; } } @@ -59,6 +60,8 @@ public class OrionDeploymentTool extends GenericDeploymentTool { /** * Get the vendor specific name of the Jar that will be output. The modification date * of this jar will be checked against the dependent bean classes. + * + * @param baseName String */ File getVendorOutputJarFile(String baseName) { return new File(getDestDir(), baseName + jarSuffix); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java index 7114610e4..52668bdc2 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java @@ -158,7 +158,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { } - /** Sets the DB Vendor for the Entity Bean mapping ; optional. + /** Sets the DB Vendor for the Entity Bean mapping; optional. *

    * Valid options can be obtained by running the following command: * @@ -268,7 +268,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { } /** - * Flag to use the WebSphere 3.5 compatible mapping rules ; optional, default false. + * Flag to use the WebSphere 3.5 compatible mapping rules; optional, default false. * * @param attr a boolean value. */ @@ -404,7 +404,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { /** * Add any vendor specific files which should be included in the EJB Jar. - * @param ejbFiles a hashtable entryname -> file. + * @param ejbFiles a hashtable entryname -> file. * @param baseName a prefix to use. */ protected void addVendorFiles(Hashtable ejbFiles, String baseName) { @@ -466,7 +466,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool { log("Unable to locate the websphere Schema: " + websphereSchema.getPath(), Project.MSG_VERBOSE); } - // Theres nothing else to see here...keep moving sonny + // There is nothing else to see here...keep moving sonny } catch (Exception e) { String msg = "Exception while adding Vendor specific files: " + e.toString(); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/extension/Compatability.java b/src/main/org/apache/tools/ant/taskdefs/optional/extension/Compatability.java index 2c06daf17..cbc7f37a5 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/extension/Compatability.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/extension/Compatability.java @@ -23,7 +23,7 @@ package org.apache.tools.ant.taskdefs.optional.extension; * of object. * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING - * This file is from excalibur.extension package. Dont edit this file + * This file is from excalibur.extension package. Do not edit this file * directly as there is no unit tests to make sure it is operational * in ant. Edit file in excalibur and run tests there before changing * ants file. diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/extension/Compatibility.java b/src/main/org/apache/tools/ant/taskdefs/optional/extension/Compatibility.java index bb28cd6b4..cfe12a159 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/extension/Compatibility.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/extension/Compatibility.java @@ -23,7 +23,7 @@ package org.apache.tools.ant.taskdefs.optional.extension; * of object. * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING - * This file is from excalibur.extension package. Dont edit this file + * This file is from excalibur.extension package. Do not edit this file * directly as there is no unit tests to make sure it is operational * in ant. Edit file in excalibur and run tests there before changing * ants file. diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/extension/ExtensionUtil.java b/src/main/org/apache/tools/ant/taskdefs/optional/extension/ExtensionUtil.java index ce660501f..8f65fd43d 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/extension/ExtensionUtil.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/extension/ExtensionUtil.java @@ -45,7 +45,7 @@ public final class ExtensionUtil { /** * Convert a list of extensionAdapter objects to extensions. * - * @param adapters the list of ExtensionAdapterss to add to convert + * @param adapters the list of ExtensionAdapters to add to convert * @throws BuildException if an error occurs */ static ArrayList toExtensions(final List adapters) @@ -67,7 +67,7 @@ public final class ExtensionUtil { * Generate a list of extensions from a specified fileset. * * @param libraries the list to add extensions to - * @param fileset the filesets containing librarys + * @param fileset the filesets containing libraries * @throws BuildException if an error occurs */ static void extractExtensions(final Project project, @@ -199,7 +199,7 @@ public final class ExtensionUtil { * * @param file the file * @return the manifest - * @throws BuildException if errror occurs (file doesn't exist, + * @throws BuildException if error occurs (file doesn't exist, * file not a jar, manifest doesn't exist in file) */ static Manifest getManifest(final File file) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibAvailableTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibAvailableTask.java index cebcf0d5e..4cce0f5ed 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibAvailableTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibAvailableTask.java @@ -37,7 +37,7 @@ public class JarLibAvailableTask extends Task { private File libraryFile; /** - * Filesets specifying all the librarys + * Filesets specifying all the libraries * to display information about. */ private final Vector extensionFileSets = new Vector(); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibDisplayTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibDisplayTask.java index da12cd020..d441b3273 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibDisplayTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibDisplayTask.java @@ -46,7 +46,7 @@ public class JarLibDisplayTask extends Task { private File libraryFile; /** - * Filesets specifying all the librarys + * Filesets specifying all the libraries * to display information about. */ private final Vector libraryFileSets = new Vector(); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java index 401dcfb6a..9941c86d0 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java @@ -251,8 +251,8 @@ public final class JarLibManifestTask extends Task { * Also use specified extensionKey so that can generate list of * optional dependencies as well. * - * @param size the number of librarys to list - * @param listPrefix the prefix for all librarys + * @param size the number of libraries to list + * @param listPrefix the prefix for all libraries * @param attributes the attributes to add key-value to * @param extensionKey the key to use */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibResolveTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibResolveTask.java index c13194fa9..9ebb4e36e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibResolveTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibResolveTask.java @@ -53,7 +53,7 @@ public class JarLibResolveTask extends Task { /** * Flag to indicate that you should check that - * the librarys resolved actually contain + * the libraries resolved actually contain * extension and if they don't then raise * an exception. */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/extension/LibFileSet.java b/src/main/org/apache/tools/ant/taskdefs/optional/extension/LibFileSet.java index b21719e58..94dc879c6 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/extension/LibFileSet.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/extension/LibFileSet.java @@ -42,7 +42,7 @@ public class LibFileSet private boolean includeImpl; /** - * String that is the base URL for the librarys + * String that is the base URL for the libraries * when constructing the "Implementation-URL" * attribute. For instance setting the base to * "http://jakarta.apache.org/avalon/libs/" and then diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/extension/LibraryDisplayer.java b/src/main/org/apache/tools/ant/taskdefs/optional/extension/LibraryDisplayer.java index b0ee4f819..80627f4c2 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/extension/LibraryDisplayer.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/extension/LibraryDisplayer.java @@ -25,7 +25,7 @@ import org.apache.tools.ant.BuildException; /** * Utility class to output the information in a jar relating - * to "Optional Packages" (formely known as "Extensions") + * to "Optional Packages" (formerly known as "Extensions") * and Package Specifications. * */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/extension/Specification.java b/src/main/org/apache/tools/ant/taskdefs/optional/extension/Specification.java index 1e4bb7b30..8b09b98ef 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/extension/Specification.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/extension/Specification.java @@ -461,7 +461,7 @@ public final class Specification { * Combine all specifications objects that are identical except * for the sections. * - *

    Note this is very inefficent and should probably be fixed + *

    Note this is very inefficient and should probably be fixed * in the future.

    * * @param list the array of results to trim @@ -497,8 +497,8 @@ public final class Specification { /** * Test if two specifications are equal except for their sections. * - * @param specification one specificaiton - * @param other the ohter specification + * @param specification one specification + * @param other the other specification * @return true if two specifications are equal except for their * sections, else false */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java b/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java index 82731fe9e..26c59969a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java @@ -353,7 +353,7 @@ public class Translate extends MatchingTask { * basebundlename + "_" + language2 + "_" + country2 * basebundlename + "_" + language2 * - * To the generated name, a ".properties" string is appeneded and + * To the generated name, a ".properties" string is appended and * once this file is located, it is treated just like a properties file * but with bundle encoding also considered while loading. */ @@ -418,7 +418,7 @@ public class Translate extends MatchingTask { log(propsFile + " not found.", Project.MSG_DEBUG); //if all resource files associated with this bundle //have been scanned for and still not able to - //find a single resrouce file, throw exception + //find a single resource file, throw exception if (!loaded && checkLoaded) { throw new BuildException(ioe.getMessage(), getLocation()); } @@ -488,7 +488,7 @@ public class Translate extends MatchingTask { * and endToken. The values for these keys are looked up from * the hashtable and substituted. If the hashtable doesn't * contain the key, they key itself is used as the value. - * Detination files and directories are created as needed. + * Destination files and directories are created as needed. * The destination file is overwritten only if * the forceoverwritten attribute is set to true if * the source file or any associated bundle resource file is diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/image/Image.java b/src/main/org/apache/tools/ant/taskdefs/optional/image/Image.java index 9b3766e05..8641a7707 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/image/Image.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/image/Image.java @@ -212,6 +212,11 @@ public class Image extends MatchingTask { /** * Executes all the chained ImageOperations on the files inside * the directory. + * @param srcDir File + * @param srcNames String[] + * @param dstDir File + * @param mapper FileNameMapper + * @return int * @since Ant 1.8.0 */ public int processDir(final File srcDir, final String[] srcNames, diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/AbstractHotDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/AbstractHotDeploymentTool.java index fdbde749f..11447e028 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/AbstractHotDeploymentTool.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/AbstractHotDeploymentTool.java @@ -27,17 +27,17 @@ import org.apache.tools.ant.types.Path; * * Subclassing this class for a vendor specific tool involves the * following. - *
    1. Implement the isActionValid() method to insure the - * action supplied as the "action" attribute of ServerDeploy is valid. + *
      1. Implement the isActionValid() method to insure the + * action supplied as the "action" attribute of ServerDeploy is valid.
      2. *
      3. Implement the validateAttributes() method to insure - * all required attributes are supplied, and are in the correct format. + * all required attributes are supplied, and are in the correct format.
      4. *
      5. Add a add<TOOL> method to the ServerDeploy * class. This method will be called when Ant encounters a * add<TOOL> task nested in the - * serverdeploy task. + * serverdeploy task.
      6. *
      7. Define the deploy method. This method should perform * whatever task it takes to hot-deploy the component. IE: spawn a JVM and - * run class, exec a native executable, run Java code... + * run class, exec a native executable, run Java code...
      * * @see org.apache.tools.ant.taskdefs.optional.j2ee.HotDeploymentTool * @see org.apache.tools.ant.taskdefs.optional.j2ee.ServerDeploy diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/JonasHotDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/JonasHotDeploymentTool.java index c7a33a191..7875ef19a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/JonasHotDeploymentTool.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/JonasHotDeploymentTool.java @@ -149,17 +149,17 @@ public class JonasHotDeploymentTool extends GenericHotDeploymentTool implements /** - * Validates the passed in attributes.

      + * Validates the passed in attributes. * - * The rules are: - *

        + *

        The rules are:

        + *
          *
        1. If action is "deploy" or "update" the "application" - * and "source" attributes must be supplied. + * and "source" attributes must be supplied.
        2. *
        3. If action is "delete" or "undeploy" the - * "application" attribute must be supplied. + * "application" attribute must be supplied.
        4. + *
        * - *@exception BuildException Description - * of Exception + * @exception BuildException if something goes wrong */ public void validateAttributes() throws BuildException { // super.validateAttributes(); // don't want to call this method diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/WebLogicHotDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/WebLogicHotDeploymentTool.java index da8750927..d0dc91bfd 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/WebLogicHotDeploymentTool.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/WebLogicHotDeploymentTool.java @@ -28,7 +28,7 @@ import org.apache.tools.ant.taskdefs.Java; * This task assumes the archive (EAR, JAR, or WAR) file has been * assembled and is supplied as the "source" attribute. *

        In the end, this task assembles the commandline parameters - * and runs the weblogic.deploy tool in a separate JVM. + * and runs the weblogic.deploy tool in a separate JVM.

        * * @see org.apache.tools.ant.taskdefs.optional.j2ee.HotDeploymentTool * @see org.apache.tools.ant.taskdefs.optional.j2ee.AbstractHotDeploymentTool @@ -57,7 +57,7 @@ public class WebLogicHotDeploymentTool extends AbstractHotDeploymentTool * Perform the actual deployment. * For this implementation, a JVM is spawned and the weblogic.deploy * tools is executed. - * @exception org.apache.tools.ant.BuildException if the attributes are invalid or incomplete. + * @exception BuildException if the attributes are invalid or incomplete. */ public void deploy() { Java java = new Java(getTask()); @@ -72,12 +72,13 @@ public class WebLogicHotDeploymentTool extends AbstractHotDeploymentTool /** * Validates the passed in attributes. - *

        The rules are: + *

        The rules are:

        *
        1. If action is "deploy" or "update" the "application" and "source" - * attributes must be supplied. + * attributes must be supplied.
        2. *
        3. If action is "delete" or "undeploy" the "application" attribute must - * be supplied. - * @exception org.apache.tools.ant.BuildException if the attributes are invalid or incomplete + * be supplied.
        + * + * @exception BuildException if the attributes are invalid or incomplete */ public void validateAttributes() throws BuildException { super.validateAttributes(); @@ -112,9 +113,9 @@ public class WebLogicHotDeploymentTool extends AbstractHotDeploymentTool } /** - * Builds the arguments to pass to weblogic.deploy according to the - * supplied action. - * @return A String containing the arguments for the weblogic.deploy tool. + * Builds the arguments to pass to weblogic.deploy according to the + * supplied action. + * @return A String containing the arguments for the weblogic.deploy tool. * @throws BuildException if there is an error. */ public String getArguments() throws BuildException { @@ -133,9 +134,9 @@ public class WebLogicHotDeploymentTool extends AbstractHotDeploymentTool } /** - * Determines if the action supplied is valid. - *

        Valid actions are contained in the static array VALID_ACTIONS - * @return true if the action attribute is valid, false if not. + * Determines if the action supplied is valid. + *

        Valid actions are contained in the static array VALID_ACTIONS

        + * @return true if the action attribute is valid, false if not. */ protected boolean isActionValid() { boolean valid = false; @@ -161,7 +162,7 @@ public class WebLogicHotDeploymentTool extends AbstractHotDeploymentTool protected StringBuffer buildArgsPrefix() { ServerDeploy task = getTask(); // constructs the "-url -debug " portion - // of the commmand line + // of the command line return new StringBuffer(STRING_BUFFER_SIZE) .append((getServer() != null) ? "-url " + getServer() diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java b/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java index f5d126eed..3d51afbac 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java @@ -341,10 +341,10 @@ public class JJTree extends Task { * handled as if relative of this -OUTPUT_DIRECTORY. Thus when the * -OUTPUT_FILE is absolute or contains a drive letter we have a problem. * - * @param destFile - * @param outputDir + * @param destFile String + * @param outputDir String * @return validation file, relative if possible; null if not set - * @throws BuildException + * @throws BuildException if something goes wrong */ private String validateOutputFile(String destFile, String outputDir) @@ -401,7 +401,7 @@ public class JJTree extends Task { /** * Determine root directory for a given file. * - * @param file + * @param file File * @return file's root directory */ private File getRoot(File file) { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java index c608583b1..5157416ee 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java @@ -159,7 +159,7 @@ public class JDependTask extends Task { * If true, forks into a new JVM. Default: false. * * @param value true if a JVM should be forked, - * otherwise false + * otherwise false */ public void setFork(boolean value) { fork = value; diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java index f5767e671..5a2cba66d 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java @@ -34,8 +34,7 @@ import org.apache.tools.ant.types.Path; * org.apache.tools.ant.taskdefs.optional.jlink.ClassNameReader * support this class.

        * - *

        For example: - * + *

        For example:

        *
          * <jlink compress="false" outfile="out.jar"/>
          *   <mergefiles>
        @@ -48,7 +47,6 @@ import org.apache.tools.ant.types.Path;
          *   </addfiles>
          * </jlink>
          * 
        - *
        * * @ant.task ignore="true" */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java index 4274bf0db..592f4235c 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java @@ -36,22 +36,22 @@ import org.apache.tools.ant.types.Reference; /** * Runs a JSP compiler. * - *

        This task takes the given jsp files and compiles them into java - * files. It is then up to the user to compile the java files into classes. + *

        This task takes the given jsp files and compiles them into java + * files. It is then up to the user to compile the java files into classes.

        * - *

        The task requires the srcdir and destdir attributes to be + *

        The task requires the srcdir and destdir attributes to be * set. This Task is a MatchingTask, so the files to be compiled can be * specified using includes/excludes attributes or nested include/exclude * elements. Optional attributes are verbose (set the verbosity level passed * to jasper), package (name of the destination package for generated java * classes and classpath (the classpath to use when running the jsp - * compiler). - *

        This task supports the nested elements classpath (A Path) and - * classpathref (A Reference) which can be used in preference to the + * compiler).

        + *

        This task supports the nested elements classpath (a Path) and + * classpathref (a Reference) which can be used in preference to the * attribute classpath, if the jsp compiler is not already in the ant - * classpath. + * classpath.

        * - *

        Usage

        + *

        Usage

        *
          * <jspc srcdir="${basedir}/src/war"
          *       destdir="${basedir}/gensrc"
        @@ -61,7 +61,7 @@ import org.apache.tools.ant.types.Reference;
          * </jspc>
          * 
        * - *

        Large Amount of cutting and pasting from the Javac task... + *

        Large amount of cutting and pasting from the Javac task...

        * @since 1.5 */ public class JspC extends MatchingTask { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/DefaultJspCompilerAdapter.java b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/DefaultJspCompilerAdapter.java index 5c4d0e3b5..59a9b2c1f 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/DefaultJspCompilerAdapter.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/DefaultJspCompilerAdapter.java @@ -96,7 +96,7 @@ public abstract class DefaultJspCompilerAdapter /** - * add an argument oneple to the argument list, if the value aint null + * add a single argument to the argument list, if the value aint null * @param cmd the command line * @param argument The argument */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JspCompilerAdapter.java b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JspCompilerAdapter.java index 16b67f9d6..68e693c2d 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JspCompilerAdapter.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JspCompilerAdapter.java @@ -22,7 +22,7 @@ import org.apache.tools.ant.taskdefs.optional.jsp.JspC; import org.apache.tools.ant.taskdefs.optional.jsp.JspMangler; /** - * The interface that all jsp compiler adapters must adher to. + * The interface that all jsp compiler adapters must adhere to. * *

        A compiler adapter is an adapter that interprets the jspc's * parameters in preparation to be passed off to the compiler this diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/BaseTest.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/BaseTest.java index 55e7a5d5c..85f1309e2 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/BaseTest.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/BaseTest.java @@ -132,6 +132,7 @@ public abstract class BaseTest { /** * The if expression + * @return Object * @since Ant 1.8.0 */ public Object getIfCondition() { @@ -163,6 +164,7 @@ public abstract class BaseTest { /** * The unless expression + * @return Object * @since Ant 1.8.0 */ public Object getUnlessCondition() { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/BatchTest.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/BatchTest.java index f41b96f13..08070248f 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/BatchTest.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/BatchTest.java @@ -30,13 +30,13 @@ import org.apache.tools.ant.types.ResourceCollection; import org.apache.tools.ant.types.resources.Resources; /** - *

        Create then run JUnitTest's based on the list of files - * given by the fileset attribute. + *

        Create then run JUnitTest's based on the list of files + * given by the fileset attribute.

        * - *

        Every .java or .class file in the fileset is + *

        Every .java or .class file in the fileset is * assumed to be a testcase. * A JUnitTest is created for each of these named classes with - * basic setup inherited from the parent BatchTest. + * basic setup inherited from the parent BatchTest.

        * * @see JUnitTest */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.java index 46d6c6161..8d106b20a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.java @@ -96,16 +96,16 @@ public class BriefJUnitResultFormatter implements JUnitResultFormatter, IgnoredT /** * @see JUnitResultFormatter#setSystemOutput(String) + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public void setSystemOutput(String out) { systemOutput = out; } /** * @see JUnitResultFormatter#setSystemError(String) + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public void setSystemError(String err) { systemError = err; } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java index bfcbfedb2..69e8f0794 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java @@ -62,7 +62,7 @@ import org.apache.tools.ant.util.StringUtils; * * * Because each running test case gets its own formatter, we collect - * the failing test cases in a static list. Because we dont have a finalizer + * the failing test cases in a static list. Because we don't have a finalizer * method in the formatters "lifecycle", we register this formatter as * BuildListener and generate the new java source on taskFinished event. * @@ -178,8 +178,8 @@ public class FailureRecorder extends ProjectComponent implements JUnitResultForm /** * Add the failed test to the list. - * @param test the test that errored. - * @param throwable the reason it errored. + * @param test the test that erred. + * @param throwable the reason it erred. * @see junit.framework.TestListener#addError(junit.framework.Test, java.lang.Throwable) */ public void addError(Test test, Throwable throwable) { @@ -428,7 +428,7 @@ public class FailureRecorder extends ProjectComponent implements JUnitResultForm } /** - * The task outside of this JUnitResultFormatter is the task. So all tests passed + * The task outside of this JUnitResultFormatter is the <junit> task. So all tests passed * and we could create the new java class. * @param event not used * @see org.apache.tools.ant.BuildListener#taskFinished(org.apache.tools.ant.BuildEvent) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.java index f9fbcb0ae..5b31e7fac 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.java @@ -35,20 +35,21 @@ import org.apache.tools.ant.types.EnumeratedAttribute; import org.apache.tools.ant.util.KeepAliveOutputStream; /** - *

        A wrapper for the implementations of JUnitResultFormatter. + *

        A wrapper for the implementations of JUnitResultFormatter. * In particular, used as a nested <formatter> element in - * a <junit> task. - *

        For example, - *

        + * a <junit> task.

        + * + * For example, + *
          *       <junit printsummary="no" haltonfailure="yes" fork="false">
          *           <formatter type="plain" usefile="false" />
          *           <test name="org.apache.ecs.InternationalCharTest" />
        - *       </junit>
        + * </junit>
        * adds a plain type implementation * (PlainJUnitResultFormatter) to display the results of the test. * - *

        Either the type or the classname attribute - * must be set. + *

        Either the type or the classname attribute + * must be set.

        * * @see JUnitTask * @see XMLJUnitResultFormatter @@ -87,18 +88,19 @@ public class FormatterElement { "org.apache.tools.ant.taskdefs.optional.junit.FailureRecorder"; /** - *

        Quick way to use a standard formatter. + *

        Quick way to use a standard formatter.

        * - *

        At the moment, there are three supported standard formatters. + *

        At the moment, there are three supported standard formatters.

        *
          - *
        • The xml type uses a XMLJUnitResultFormatter. - *
        • The brief type uses a BriefJUnitResultFormatter. - *
        • The plain type (the default) uses a PlainJUnitResultFormatter. - *
        • The failure type uses a FailureRecorder. + *
        • The xml type uses a XMLJUnitResultFormatter.
        • + *
        • The brief type uses a BriefJUnitResultFormatter.
        • + *
        • The plain type (the default) uses a PlainJUnitResultFormatter.
        • + *
        • The failure type uses a FailureRecorder.
        • *
        * - *

        Sets classname attribute - so you can't use that - * attribute if you use this one. + *

        Sets classname attribute - so you can't use that + * attribute if you use this one.

        + * * @param type the enumerated value to use. */ public void setType(TypeAttribute type) { @@ -118,9 +120,9 @@ public class FormatterElement { } /** - *

        Set name of class to be used as the formatter. + * Set name of class to be used as the formatter. + *

        This class must implement JUnitResultFormatter

        * - *

        This class must implement JUnitResultFormatter * @param classname the name of the formatter class. */ public void setClassname(String classname) { @@ -159,18 +161,18 @@ public class FormatterElement { } /** - *

        Set the file which the formatte should log to. + * Set the file which the formatter should log to. * - *

        Note that logging to file must be enabled . + *

        Note that logging to file must be enabled.

        */ void setOutfile(File out) { this.outFile = out; } /** - *

        Set output stream for formatter to use. + * Set output stream for formatter to use. * - *

        Defaults to standard out. + *

        Defaults to standard out.

        * @param out the output stream to use. */ public void setOutput(OutputStream out) { @@ -220,7 +222,7 @@ public class FormatterElement { /** * Set whether this formatter should NOT be used. It will be used * if the expression evaluates to false or the name of a property - * which has not been set, orthwise it will not be used. + * which has not been set, otherwise it will not be used. * @param unlessCond name of property * @since Ant 1.8.0 */ @@ -231,7 +233,7 @@ public class FormatterElement { /** * Set whether this formatter should NOT be used. It will be used * if the expression evaluates to false or the name of a property - * which has not been set, orthwise it will not be used. + * which has not been set, otherwise it will not be used. * @param unlessCond name of property */ public void setUnless(String unlessCond) { @@ -321,7 +323,7 @@ public class FormatterElement { Field field = r.getClass().getField("project"); Object value = field.get(r); if (value instanceof Project) { - // there is already a project reference so dont overwrite this + // there is already a project reference so don't overwrite this needToSetProjectReference = false; } } catch (NoSuchFieldException e) { @@ -348,9 +350,9 @@ public class FormatterElement { } /** - *

        Enumerated attribute with the values "plain", "xml", "brief" and "failure". + * Enumerated attribute with the values "plain", "xml", "brief" and "failure". * - *

        Use to enumerate options for type attribute. + *

        Use to enumerate options for type attribute.

        */ public static class TypeAttribute extends EnumeratedAttribute { /** {@inheritDoc}. */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/IgnoredTestListener.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/IgnoredTestListener.java index 6741912e9..2c3103a71 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/IgnoredTestListener.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/IgnoredTestListener.java @@ -41,10 +41,10 @@ public interface IgnoredTestListener extends TestListener { /** * Receive a report that a test has failed an assumption. Within JUnit4 * this is normally treated as a test being skipped, although how any - * listener handles this is up to that specific listener.
        - * Note: Tests that throw assumption failures will still report + * listener handles this is up to that specific listener. + *

        Note: Tests that throw assumption failures will still report * the endTest method, which may differ from how the addError and addFailure - * methods work, it's up for any implementing classes to handle this. + * methods work, it's up for any implementing classes to handle this.

        * @param test the details of the test and failure that have triggered this report. * @param exception the AssumptionViolatedException thrown from the current assumption failure. */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java index edf63b667..57399fb7b 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java @@ -68,13 +68,13 @@ import org.apache.tools.ant.util.StringUtils; /** * Runs JUnit tests. * - *

        JUnit is a framework to create unit tests. It has been initially + *

        JUnit is a framework to create unit tests. It has been initially * created by Erich Gamma and Kent Beck. JUnit can be found at http://www.junit.org. * - *

        JUnitTask can run a single specific + *

        JUnitTask can run a single specific * JUnitTest using the test element.

        - * For example, the following target
        + * For example, the following target 
          *   <target name="test-int-chars" depends="jar-test">
          *       <echo message="testing international characters"/>
          *       <junit printsummary="no" haltonfailure="yes" fork="false">
        @@ -83,19 +83,19 @@ import org.apache.tools.ant.util.StringUtils;
          *           <test name="org.apache.ecs.InternationalCharTest" />
          *       </junit>
          *   </target>
        - * 
        + *
        *

        runs a single junit test * (org.apache.ecs.InternationalCharTest) in the current * VM using the path with id classpath as classpath and * presents the results formatted using the standard * plain formatter on the command line.

        * - *

        This task can also run batches of tests. The + *

        This task can also run batches of tests. The * batchtest element creates a BatchTest * based on a fileset. This allows, for example, all classes found in * directory to be run as testcases.

        * - *

        For example,

        + * 

        For example,

          * <target name="run-tests" depends="dump-info,compile-tests" if="junit.present">
          *   <junit printsummary="no" haltonfailure="yes" fork="${junit.fork}">
          *     <jvmarg value="-classic"/>
        @@ -109,18 +109,18 @@ import org.apache.tools.ant.util.StringUtils;
          *     </batchtest>
          *   </junit>
          * </target>
        - * 
        + *
        *

        this target finds any classes with a test directory * anywhere in their path (under the top ${tests.dir}, of * course) and creates JUnitTest's for each one.

        * - *

        Of course, <junit> and + *

        Of course, <junit> and * <batch> elements can be combined for more * complex tests. For an example, see the ant build.xml * target run-tests (the second example is an edited * version).

        * - *

        To spawn a new Java VM to prevent interferences between + *

        To spawn a new Java VM to prevent interferences between * different testcases, you need to enable fork. A * number of attributes and elements allow you to set up how this JVM * runs. @@ -219,7 +219,7 @@ public class JUnitTask extends Task { * JUnitTest (test) however it can possibly be overridden by their * own properties.

        * @param value false if it should not filter, otherwise - * true + * true * * @since Ant 1.5 */ @@ -334,6 +334,7 @@ public class JUnitTask extends Task { *

        This attribute will be ignored if tests run in the same VM * as Ant.

        * + * @param threads int * @since Ant 1.9.4 */ public void setThreads(final int threads) { @@ -347,11 +348,11 @@ public class JUnitTask extends Task { * to also show standard output and error. * * Can take the values on, off, and withOutAndErr. + * * @param value true to print a summary, - * withOutAndErr to include the test's output as + * withOutAndErr to include the test's output as * well, false otherwise. * @see SummaryJUnitResultFormatter - * * @since Ant 1.2 */ public void setPrintsummary(final SummaryAttribute value) { @@ -365,7 +366,7 @@ public class JUnitTask extends Task { public static class SummaryAttribute extends EnumeratedAttribute { /** * list the possible values - * @return array of allowed values + * @return array of allowed values */ @Override public String[] getValues() { @@ -391,10 +392,10 @@ public class JUnitTask extends Task { * *

        If the test is running for more than this value, the test * will be canceled. (works only when in 'fork' mode).

        + * * @param value the maximum time (in milliseconds) allowed before * declaring the test as 'timed-out' * @see #setFork(boolean) - * * @since Ant 1.2 */ public void setTimeout(final Integer value) { @@ -403,9 +404,9 @@ public class JUnitTask extends Task { /** * Set the maximum memory to be used by all forked JVMs. + * * @param max the value as defined by -mx or -Xmx * in the java command line options. - * * @since Ant 1.2 */ public void setMaxmemory(final String max) { @@ -432,7 +433,6 @@ public class JUnitTask extends Task { * @return create a new JVM argument so that any argument can be * passed to the JVM. * @see #setFork(boolean) - * * @since Ant 1.2 */ public Commandline.Argument createJvmarg() { @@ -441,9 +441,9 @@ public class JUnitTask extends Task { /** * The directory to invoke the VM in. Ignored if no JVM is forked. + * * @param dir the directory to invoke the JVM from. * @see #setFork(boolean) - * * @since Ant 1.2 */ public void setDir(final File dir) { @@ -456,7 +456,7 @@ public class JUnitTask extends Task { * testcases when JVM forking is not enabled. * * @since Ant 1.3 - * @deprecated since ant 1.6 + * @deprecated since Ant 1.6 * @param sysp environment variable to add */ @Deprecated @@ -469,6 +469,7 @@ public class JUnitTask extends Task { * Adds a system property that tests can access. * This might be useful to transfer Ant properties to the * testcases when JVM forking is not enabled. + * * @param sysp new environment variable to add * @since Ant 1.6 */ @@ -484,8 +485,8 @@ public class JUnitTask extends Task { * Adds a set of properties that will be used as system properties * that tests can access. * - * This might be useful to transfer Ant properties to the - * testcases when JVM forking is not enabled. + *

        This might be useful to transfer Ant properties to the + * testcases when JVM forking is not enabled.

        * * @param sysp set of properties to be added * @since Ant 1.6 @@ -506,6 +507,7 @@ public class JUnitTask extends Task { /** * Adds a path to the bootclasspath. + * * @return reference to the bootclasspath in the embedded java command line * @since Ant 1.6 */ @@ -537,6 +539,7 @@ public class JUnitTask extends Task { * Adds an environment variable; used when forking. * *

        Will be ignored if we are not forking a new VM.

        + * * @param var environment variable to be added * @since Ant 1.5 */ @@ -560,9 +563,11 @@ public class JUnitTask extends Task { * Preset the attributes of the test * before configuration in the build * script. - * This allows attributes in the task + * This allows attributes in the <junit> task * be be defaults for the tests, but allows * individual tests to override the defaults. + * + * @param test BaseTest */ private void preConfigure(final BaseTest test) { test.setFiltertrace(filterTrace); @@ -581,7 +586,6 @@ public class JUnitTask extends Task { * Add a new single testcase. * @param test a new single testcase * @see JUnitTest - * * @since Ant 1.2 */ public void addTest(final JUnitTest test) { @@ -594,7 +598,6 @@ public class JUnitTask extends Task { * * @return a new instance of a batch test. * @see BatchTest - * * @since Ant 1.2 */ public BatchTest createBatchTest() { @@ -656,6 +659,7 @@ public class JUnitTask extends Task { * If true, write a single "FAILED" line for failed tests to Ant's * log system. * + * @param logFailedTests boolean * @since Ant 1.8.0 */ public void setLogFailedTests(final boolean logFailedTests) { @@ -664,6 +668,7 @@ public class JUnitTask extends Task { /** * Assertions to enable in this program (if fork=true) + * * @since Ant 1.6 * @param asserts assertion set */ @@ -676,8 +681,9 @@ public class JUnitTask extends Task { /** * Sets the permissions for the application run inside the same JVM. + * * @since Ant 1.6 - * @return . + * @return Permissions */ public Permissions createPermissions() { if (perm == null) { @@ -692,6 +698,7 @@ public class JUnitTask extends Task { * a bootclasspath. * *

        Doesn't have any effect unless fork is true.

        + * * @param cloneVm a boolean value. * @since Ant 1.7 */ @@ -732,6 +739,7 @@ public class JUnitTask extends Task { *

        This value will be overridden by the magic property * ant.junit.enabletestlistenerevents if it has been set.

        * + * @param b boolean * @since Ant 1.8.2 */ public void setEnableTestListenerEvents(final boolean b) { @@ -740,6 +748,8 @@ public class JUnitTask extends Task { /** * Whether test listener events shall be generated. + * + * @return boolean * @since Ant 1.8.2 */ public boolean getEnableTestListenerEvents() { @@ -1455,7 +1465,7 @@ public class JUnitTask extends Task { * Will auto-delete on (graceful) exit. * The file will be in the project basedir unless tmpDir declares * something else. - * @param prefix + * @param prefix String * @return created file */ private File createTempPropertiesFile(final String prefix) { @@ -2094,11 +2104,11 @@ public class JUnitTask extends Task { /** * constructor for forked test configuration - * @param filterTrace - * @param haltOnError - * @param haltOnFailure - * @param errorProperty - * @param failureProperty + * @param filterTrace boolean + * @param haltOnError boolean + * @param haltOnFailure boolean + * @param errorProperty String + * @param failureProperty String */ ForkedTestConfiguration(final boolean filterTrace, final boolean haltOnError, final boolean haltOnFailure, final String errorProperty, @@ -2112,7 +2122,7 @@ public class JUnitTask extends Task { /** * configure from a test; sets member variables to attributes of the test - * @param test + * @param test JUnitTest */ ForkedTestConfiguration(final JUnitTest test) { this(test.getFiltertrace(), @@ -2124,7 +2134,7 @@ public class JUnitTask extends Task { /** * equality test checks all the member variables - * @param other + * @param other object to compare * @return true if everything is equal */ @Override diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.java index 835c013b6..eb969d5e9 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.java @@ -28,10 +28,10 @@ import org.apache.tools.ant.Project; import org.apache.tools.ant.PropertyHelper; /** - *

        Run a single JUnit test. + * Run a single JUnit test. * - *

        The JUnit test is actually run by {@link JUnitTestRunner}. - * So read the doc comments for that class :) + *

        The JUnit test is actually run by {@link JUnitTestRunner}. + * So read the doc comments for that class :)

        * * @since Ant 1.2 * diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java index c7d39e096..2d16c3583 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java @@ -58,14 +58,14 @@ import org.apache.tools.ant.util.TeeOutputStream; *

        This TestRunner expects a name of a TestCase class as its * argument. If this class provides a static suite() method it will be * called and the resulting Test will be run. So, the signature should be - *

        
        + * 
          *     public static junit.framework.Test suite()
        - * 
        + *
        * - *

        If no such method exists, all public methods starting with - * "test" and taking no argument will be run. + *

        If no such method exists, all public methods starting with + * "test" and taking no argument will be run.

        * - *

        Summary output is generated at the end. + *

        Summary output is generated at the end.

        * * @since Ant 1.2 */ @@ -287,6 +287,14 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR /** * Constructor to use when the user has specified a classpath. + * @param test JUnitTest + * @param methods String[] + * @param haltOnError boolean + * @param filtertrace boolean + * @param haltOnFailure boolean + * @param showOutput boolean + * @param logTestListenerEvents boolean + * @param loader ClassLoader * @since 1.8.2 */ public JUnitTestRunner(final JUnitTest test, final String[] methods, final boolean haltOnError, @@ -860,33 +868,38 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR /** * Entry point for standalone (forked) mode. - * + *

        * Parameters: testcaseclassname plus parameters in the format * key=value, none of which is required. - * - *

    Task attributes
    AttributeValues
    - * - * - * - * - * - * - *
    keydescriptiondefault value
    haltOnErrorhalt test on - * errors?false
    haltOnFailurehalt test on - * failures?false
    formatterA JUnitResultFormatter given as + *

    + * + * + * + * + * + * + * + * + * + * + * + * + * - * - * - * - * - * - * - * + * assumed. + * + * + * + * + * + * + * + * + * + * *
    Test runner attributes
    keydescriptiondefault value
    haltOnErrorhalt test on errors?false
    haltOnFailurehalt test on failures?false
    formatterA JUnitResultFormatter given as * classname,filename. If filename is omitted, System.out is - * assumed.none
    showoutputsend output to System.err/.out as - * well as to the formatters?false
    logtestlistenereventslog TestListener events to - * System.out.false
    methodsComma-separated list of names of individual - * test methods to execute. - * null
    none
    showoutputsend output to System.err/.out as + * well as to the formatters?false
    logtestlistenereventslog TestListener events to + * System.out.false
    methodsComma-separated list of names of individual + * test methods to execute.null
    * @param args the command line arguments. * @throws IOException on error. @@ -1087,7 +1100,9 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR } /** - * Line format is: formatter=(,)? + * Line format is: formatter=<classname>(,<pathname>)? + * + * @param line String */ private static void createAndStoreFormatter(final String line) throws BuildException { @@ -1295,4 +1310,4 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR return new int[] {failures, errors}; } -} // JUnitTestRunner +} diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java index 07264b711..6eedf5332 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java @@ -318,4 +318,4 @@ public class PlainJUnitResultFormatter implements JUnitResultFormatter, IgnoredT throw new BuildException("Unable to write output " + ex, ex); } } -} // PlainJUnitResultFormatter +} diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLConstants.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLConstants.java index 03760cc92..c29271d9e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLConstants.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLConstants.java @@ -18,16 +18,16 @@ package org.apache.tools.ant.taskdefs.optional.junit; /** - *

    Interface groups XML constants. + *

    Interface groups XML constants. * Interface that groups all constants used throughout the XML * documents that are generated by the XMLJUnitResultFormatter. - *

    + *

    * As of now the DTD is: - *
    + * 
      * <!ELEMENT testsuites (testsuite*)>
      *
      * <!ELEMENT testsuite (properties, testcase*,
    - *                    failure?, error?,
    + *                     failure?, error?,
      *                     system-out?, system-err?)>
      * <!ATTLIST testsuite name      CDATA #REQUIRED>
      * <!ATTLIST testsuite tests     CDATA #REQUIRED>
    @@ -61,7 +61,7 @@ package org.apache.tools.ant.taskdefs.optional.junit;
      *
      * <!ELEMENT system-out (#PCDATA)>
      *
    - * 
    + *
    * @see XMLJUnitResultFormatter * @see XMLResultAggregator */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java index 416c10d43..171348f92 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java @@ -55,7 +55,7 @@ public class XMLJUnitResultFormatter implements JUnitResultFormatter, XMLConstan private static final double ONE_SECOND = 1000.0; - /** constant for unnnamed testsuites/cases */ + /** constant for unnamed testsuites/cases */ private static final String UNKNOWN = "unknown"; private static DocumentBuilder getDocumentBuilder() { @@ -363,4 +363,4 @@ public class XMLJUnitResultFormatter implements JUnitResultFormatter, XMLConstan skippedTests.put(createDescription(test), test); } -} // XMLJUnitResultFormatter +} diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java index 4f76c9687..1ba6ff6d1 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java @@ -49,11 +49,11 @@ import org.xml.sax.SAXException; * It is not particularly clean but * should be helpful while I am thinking about another technique. * - *

    The main problem is due to the fact that a JVM can be forked for a testcase + *

    The main problem is due to the fact that a JVM can be forked for a testcase * thus making it impossible to aggregate all testcases since the listener is * (obviously) in the forked JVM. A solution could be to write a * TestListener that will receive events from the TestRunner via sockets. This - * is IMHO the simplest way to do it to avoid this file hacking thing. + * is IMHO the simplest way to do it to avoid this file hacking thing.

    * * @ant.task name="junitreport" category="testing" */ @@ -108,7 +108,7 @@ public class XMLResultAggregator extends Task implements XMLConstants { } /** - * Set the name of the aggregegated results file. It must be relative + * Set the name of the aggregated results file. It must be relative * from the todir attribute. If not set it will use {@link #DEFAULT_FILENAME} * @param value the name of the file. * @see #setTodir(File) @@ -229,7 +229,7 @@ public class XMLResultAggregator extends Task implements XMLConstants { } /** - *

    Create a DOM tree. + * Create a DOM tree. * Has 'testsuites' as firstchild and aggregates all * testsuite results that exists in the base directory. * @return the root element of DOM tree that aggregates all testsuites. @@ -286,11 +286,12 @@ public class XMLResultAggregator extends Task implements XMLConstants { } /** - *

    Add a new testsuite node to the document. + *

    Add a new testsuite node to the document. * The main difference is that it - * split the previous fully qualified name into a package and a name. - *

    For example: org.apache.Whatever will be split into - * org.apache and Whatever. + * split the previous fully qualified name into a package and a name.

    + *

    For example: org.apache.Whatever will be split into + * org.apache and Whatever.

    + * * @param root the root element to which the testsuite node should * be appended. * @param testsuite the element to append to the given root. It will slightly diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/native2ascii/DefaultNative2Ascii.java b/src/main/org/apache/tools/ant/taskdefs/optional/native2ascii/DefaultNative2Ascii.java index 3cd52afe5..c16a1a3bc 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/native2ascii/DefaultNative2Ascii.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/native2ascii/DefaultNative2Ascii.java @@ -25,7 +25,7 @@ import org.apache.tools.ant.taskdefs.optional.Native2Ascii; import org.apache.tools.ant.types.Commandline; /** - * encapsulates the handling common to diffent Native2Asciiadapter + * encapsulates the handling common to different Native2AsciiAdapter * implementations. * * @since Ant 1.6.3 diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java index b78370657..80cb68109 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java @@ -61,13 +61,13 @@ import org.apache.tools.ant.util.VectorSet; /** * Basic FTP client. Performs the following actions: *
      - *
    • send - send files to a remote server. This is the + *
    • send - send files to a remote server. This is the * default action.
    • - *
    • get - retrieve files from a remote server.
    • - *
    • del - delete files from a remote server.
    • - *
    • list - create a file listing.
    • - *
    • chmod - change unix file permissions.
    • - *
    • rmdir - remove directories, if empty, from a + *
    • get - retrieve files from a remote server.
    • + *
    • del - delete files from a remote server.
    • + *
    • list - create a file listing.
    • + *
    • chmod - change unix file permissions.
    • + *
    • rmdir - remove directories, if empty, from a * remote server.
    • *
    * Note: Some FTP servers - notably the Solaris server - seem @@ -190,7 +190,7 @@ public class FTP extends Task implements FTPTaskConfig { /** * creates a proxy to a FTP file - * @param file + * @param file FTPFile */ public FTPFileProxy(FTPFile file) { super(file.getName()); @@ -578,7 +578,7 @@ public class FTP extends Task implements FTPTaskConfig { * @param name path of the directory relative to the directory of * the fileset * @param file directory as file - * @param fast + * @param fast boolean */ private void accountForIncludedDir(String name, AntFTPFile file, boolean fast) { if (!dirsIncluded.contains(name) @@ -852,7 +852,7 @@ public class FTP extends Task implements FTPTaskConfig { this.ftpFile = getFile(theFiles, lastpathelement); } /** - * find a file in a directory in case unsensitive way + * find a file in a directory in case insensitive way * @param parentPath where we are * @param soughtPathElement what is being sought * @return the first file found or null if not found @@ -1648,6 +1648,7 @@ public class FTP extends Task implements FTPTaskConfig { * Whether to verify that data and control connections are * connected to the same remote host. * + * @param b boolean * @since Ant 1.8.0 */ public void setEnableRemoteVerification(boolean b) { @@ -1705,7 +1706,7 @@ public class FTP extends Task implements FTPTaskConfig { * Executable a retryable object. * @param h the retry handler. * @param r the object that should be retried until it succeeds - * or the number of retrys is reached. + * or the number of retries is reached. * @param descr a description of the command that is being run. * @throws IOException if there is a problem. */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTask.java index aa060ae2a..d53f16d0e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTask.java @@ -704,6 +704,7 @@ public class FTPTask extends Task implements FTPTaskConfig { * Whether to verify that data and control connections are * connected to the same remote host. * + * @param b boolean * @since Ant 1.8.0 */ public void setEnableRemoteVerification(boolean b) { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTaskMirrorImpl.java b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTaskMirrorImpl.java index 6cb79c833..5efcb3f79 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTaskMirrorImpl.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTaskMirrorImpl.java @@ -91,7 +91,7 @@ public class FTPTaskMirrorImpl implements FTPTaskMirror { /** * creates a proxy to a FTP file - * @param file + * @param file FTPFile */ public FTPFileProxy(FTPFile file) { super(file.getName()); @@ -479,7 +479,7 @@ public class FTPTaskMirrorImpl implements FTPTaskMirror { * @param name path of the directory relative to the directory of * the fileset * @param file directory as file - * @param fast + * @param fast boolean */ private void accountForIncludedDir(String name, AntFTPFile file, boolean fast) { if (!dirsIncluded.contains(name) @@ -754,7 +754,7 @@ public class FTPTaskMirrorImpl implements FTPTaskMirror { this.ftpFile = getFile(theFiles, lastpathelement); } /** - * find a file in a directory in case unsensitive way + * find a file in a directory in case insensitive way * @param parentPath where we are * @param soughtPathElement what is being sought * @return the first file found or null if not found @@ -1091,7 +1091,7 @@ public class FTPTaskMirrorImpl implements FTPTaskMirror { * Executable a retryable object. * @param h the retry handler. * @param r the object that should be retried until it succeeds - * or the number of retrys is reached. + * or the number of retries is reached. * @param descr a description of the command that is being run. * @throws IOException if there is a problem. */ @@ -1634,7 +1634,7 @@ public class FTPTaskMirrorImpl implements FTPTaskMirror { * Retrieve a single file from the remote host. filename may * contain a relative path specification.

    * - * The file will then be retreived using the entire relative path spec - + * The file will then be retrieved using the entire relative path spec - * no attempt is made to change directories. It is anticipated that this * may eventually cause problems with some FTP servers, but it simplifies * the coding.

    diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java b/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java index dd6016a8c..98f51ca0a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java @@ -46,11 +46,11 @@ import org.apache.tools.ant.util.FileUtils; * Extracts the latest edition of the source code from a PVCS repository. * PVCS is a version control system * developed by Merant. - *
    + *

    * Before using this tag, the user running ant must have access to the commands * of PVCS (get and pcli) and must have access to the repository. Note that the way to specify * the repository is platform dependent so use property to specify location of repository. - *
    + *

    * This version has been tested against PVCS version 6.5 and 6.6 under Windows and Solaris. * diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java index c6614cbdd..be2e33698 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java @@ -402,9 +402,9 @@ public abstract class SOS extends Task implements SOSCmd { /** * Execute the created command line. * - * @param cmd The command line to run. - * @return int the exit code. - * @throws BuildException + * @param cmd The command line to run. + * @return int the exit code. + * @throws BuildException if something goes wrong */ protected int run(Commandline cmd) { try { @@ -439,7 +439,7 @@ public abstract class SOS extends Task implements SOSCmd { commandLine.createArgument().setValue(FLAG_USERNAME); commandLine.createArgument().setValue(getUsername()); // The SOS class knows that the SOS server needs the password flag, - // even if there is no password ,so we send a " " + // even if there is no password, so we send a " " commandLine.createArgument().setValue(FLAG_PASSWORD); commandLine.createArgument().setValue(getPassword()); // VSS Info is required diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckin.java b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckin.java index 9095f075c..7a8a2462a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckin.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckin.java @@ -56,8 +56,8 @@ public class SOSCheckin extends SOS { } /** - * Build the command line.

    - * + * Build the command line. + *

    * CheckInFile required parameters: -server -name -password -database -project * -file
    * CheckInFile optional parameters: -workdir -log -verbose -nocache -nocompression @@ -65,7 +65,8 @@ public class SOSCheckin extends SOS { * CheckInProject required parameters: -server -name -password -database * -project
    * CheckInProject optional parameters: workdir -recursive -log -verbose - * -nocache -nocompression -soshome
    + * -nocache -nocompression -soshome + *

    * * @return Commandline the generated command to be executed */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckout.java b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckout.java index fab6fb9f2..6994dfacb 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckout.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckout.java @@ -47,14 +47,15 @@ public class SOSCheckout extends SOS { } /** - * Build the command line
    - * + * Build the command line + *

    * CheckOutFile required parameters: -server -name -password -database -project -file
    * CheckOutFile optional parameters: -workdir -verbose -nocache -nocompression -soshome
    * * CheckOutProject required parameters: -server -name -password -database -project
    * CheckOutProject optional parameters:-workdir -recursive -verbose -nocache - * -nocompression -soshome
    + * -nocompression -soshome + *

    * * @return Commandline the generated command to be executed */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSGet.java b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSGet.java index cdbf92bc9..bd1395973 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSGet.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSGet.java @@ -67,14 +67,15 @@ public class SOSGet extends SOS { } /** - * Build the command line
    - * + * Build the command line + *

    * GetFile required parameters: -server -name -password -database -project -file
    * GetFile optional parameters: -workdir -revision -verbose -nocache -nocompression -soshome
    * * GetProject required parameters: -server -name -password -database -project
    * GetProject optional parameters: -label -workdir -recursive -verbose -nocache - * -nocompression -soshome
    + * -nocompression -soshome + *

    * * @return Commandline the generated command to be executed */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSLabel.java b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSLabel.java index dd6b13a2a..21e881503 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSLabel.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSLabel.java @@ -57,9 +57,11 @@ public class SOSLabel extends SOS { } /** - * Build the command line
    - * AddLabel required parameters: -server -name -password -database -project -label
    - * AddLabel optional parameters: -verbose -comment
    + * Build the command line + *

    + * AddLabel required parameters: -server -name -password -database -project -label
    + * AddLabel optional parameters: -verbose -comment + *

    * * @return Commandline the generated command to be executed */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sos/package.html b/src/main/org/apache/tools/ant/taskdefs/optional/sos/package.html index a0538c21c..401c7d736 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/sos/package.html +++ b/src/main/org/apache/tools/ant/taskdefs/optional/sos/package.html @@ -20,10 +20,10 @@ Ant tasks for working with a SourceOffSite source control system.

    - The <SOSGet> Retreives file(s) from a SOS database
    - The <SOSCheckin> Commits and unlocks file(s) in a SOS database
    - The <SOSCheckout> Retreives and lock file(s) in a SOS database
    - The <SOSLabel> Label a SOS database
    + The <SOSGet> Retrieves file(s) from a SOS database
    + The <SOSCheckin> Commits and unlocks file(s) in a SOS database
    + The <SOSCheckout> Retrieves and lock file(s) in a SOS database
    + The <SOSLabel> Label a SOS database

    diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/AbstractSshMessage.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/AbstractSshMessage.java index c0236e1f6..4ce07ff7d 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/AbstractSshMessage.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/AbstractSshMessage.java @@ -68,7 +68,7 @@ public abstract class AbstractSshMessage { /** * Constructor for AbstractSshMessage * @param verbose if true do verbose logging - * @param compression if true use compression + * @param compressed if true use compression * @param session the ssh session to use * @since Ant 1.9.8 */ @@ -214,7 +214,7 @@ public abstract class AbstractSshMessage { } /** - * Track progress every 10% if 100kb < filesize < 1mb. For larger + * Track progress every 10% if 100kb < filesize < 1Mb. For larger * files track progress for every percent transmitted. * @param filesize the size of the file been transmitted * @param totalLength the total transmission size @@ -287,6 +287,7 @@ public abstract class AbstractSshMessage { public void end() { } + @SuppressWarnings("unused") public long getTotalLength() { return totalLength; } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java index d6abb95d5..591d6107c 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java @@ -73,7 +73,7 @@ public abstract class SSHBase extends Task implements LogListener { /** * Set the failonerror flag. * Default is true - * @param failure if true throw a build exception when a failure occuries, + * @param failure if true throw a build exception when a failure occurs, * otherwise just log the failure and continue */ public void setFailonerror(final boolean failure) { @@ -108,6 +108,7 @@ public abstract class SSHBase extends Task implements LogListener { /** * Set the serverAliveCountMax value. + * @param countMax int * @since Ant 1.9.7 */ public void setServerAliveCountMax(final int countMax) { @@ -128,6 +129,7 @@ public abstract class SSHBase extends Task implements LogListener { /** * Set the serverAliveIntervalSeconds value in seconds. + * @param interval int * @since Ant 1.9.7 */ public void setServerAliveIntervalSeconds(final int interval) { @@ -223,7 +225,7 @@ public abstract class SSHBase extends Task implements LogListener { /** * Initialize the task. - * This initializizs the known hosts and sets the default port. + * This initializes the known hosts and sets the default port. * @throws BuildException on error */ public void init() throws BuildException { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java index a04dfefab..80e0ddaf5 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java @@ -235,6 +235,7 @@ public class SSHExec extends SSHBase { /** * Whether a pseudo-tty should be allocated. + * @param b boolean * @since Apache Ant 1.8.3 */ public void setUsePty(final boolean b) { @@ -252,8 +253,9 @@ public class SSHExec extends SSHBase { } /** - * If suppressSystemOut is true, output will not be sent to System.out
    - * If suppressSystemOut is false, normal behavior + * If suppressSystemOut is true, output will not be sent to System.out, + * if suppressSystemOut is false, normal behavior + * @param suppressSystemOut boolean * @since Ant 1.9.0 */ public void setSuppressSystemOut(final boolean suppressSystemOut) { @@ -261,8 +263,9 @@ public class SSHExec extends SSHBase { } /** - * If suppressSystemErr is true, output will not be sent to System.err
    - * If suppressSystemErr is false, normal behavior + * If suppressSystemErr is true, output will not be sent to System.err, + * if suppressSystemErr is false, normal behavior + * @param suppressSystemErr boolean * @since Ant 1.9.4 */ public void setSuppressSystemErr(final boolean suppressSystemErr) { @@ -491,7 +494,6 @@ public class SSHExec extends SSHBase { * @param from string to write * @param to file to write to * @param append if true, append to existing file, else overwrite - * @exception Exception most likely an IOException */ private void writeToFile(final String from, final boolean append, final File to) throws IOException { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHSession.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHSession.java index e9f267574..fb80c8cf7 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHSession.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHSession.java @@ -60,9 +60,8 @@ public class SSHSession extends SSHBase { /** * Add a nested task to Sequential. - *

    - * @param nestedTask Nested task to execute Sequential - *

    + * + * @param nestedTask Nested task to execute sequentially */ public void addTask(final Task nestedTask) { nestedTasks.addElement(nestedTask); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java index a8c959e7c..26d7e1499 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java @@ -62,11 +62,16 @@ public class Scp extends SSHBase { /** * Sets the file to be transferred. This can either be a remote - * file or a local file. Remote files take the form:
    - * user:password@host:/directory/path/file.example
    + * file or a local file. Remote files take the form: + *

    + * user:password@host:/directory/path/file.example + *

    * Files to transfer can also include a wildcard to include all - * files in a remote directory. For example:
    - * user:password@host:/directory/path/*
    + * files in a remote directory. For example: + *

    + * user:password@host:/directory/path/* + *

    + * * @param aFromUri a string representing the file to transfer. */ public void setFile(final String aFromUri) { @@ -77,8 +82,10 @@ public class Scp extends SSHBase { /** * Sets the location where files will be transferred to. * This can either be a remote directory or a local directory. - * Remote directories take the form of:
    - * user:password@host:/directory/path/
    + * Remote directories take the form of: + *

    + * user:password@host:/directory/path/ + *

    * This parameter is required. * @param aToUri a string representing the target of the copy. @@ -112,9 +119,10 @@ public class Scp extends SSHBase { this.isFromRemote = true; } - /** + /** * Sets flag to determine if compression should * be used for the copy. + * @param compressed boolean * @since Ant 1.9.8 */ public void setCompressed(boolean compressed) { @@ -136,6 +144,7 @@ public class Scp extends SSHBase { /** * Sets flag to determine if file timestamp * is to be preserved during copy. + * @param yesOrNo boolean * @since Ant 1.8.0 */ public void setPreservelastmodified(final boolean yesOrNo) { @@ -198,6 +207,7 @@ public class Scp extends SSHBase { /** * Set the file mode, defaults to "644". + * @param fileMode String * @since Ant 1.9.5 */ public void setFileMode(String fileMode) { @@ -206,6 +216,7 @@ public class Scp extends SSHBase { /** * Set the dir mode, defaults to "755". + * @param dirMode String * @since Ant 1.9.5 */ public void setDirMode(String dirMode) { @@ -224,7 +235,7 @@ public class Scp extends SSHBase { /** * Adds a ResourceCollection of local files to transfer to remote host. - * @param set ResourceCollection to send to remote host. + * @param res ResourceCollection to send to remote host. * @since Ant 1.9.7 */ public void add(ResourceCollection res) { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java index 7b0a0f29f..b095c40c9 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java @@ -423,6 +423,7 @@ public class ScpToMessage extends AbstractSshMessage { /** * Set the file mode, defaults to 0644. + * @param fileMode int * @since Ant 1.9.5 */ public void setFileMode(int fileMode) { @@ -431,6 +432,7 @@ public class ScpToMessage extends AbstractSshMessage { /** * Get the file mode. + * @return int * @since Ant 1.9.5 */ public int getFileMode() { @@ -439,6 +441,7 @@ public class ScpToMessage extends AbstractSshMessage { /** * Set the dir mode, defaults to 0755. + * @param dirMode int * @since Ant 1.9.5 */ public void setDirMode(int dirMode) { @@ -447,6 +450,7 @@ public class ScpToMessage extends AbstractSshMessage { /** * Get the dir mode. + * @return int * @since Ant 1.9.5 */ public int getDirMode() { @@ -455,6 +459,7 @@ public class ScpToMessage extends AbstractSshMessage { /** * Whether to preserve the last modified time. + * @return boolean * @since Ant 1.9.7 */ public boolean getPreserveLastModified() { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessageBySftp.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessageBySftp.java index 65e242340..093ce2a66 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessageBySftp.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessageBySftp.java @@ -345,7 +345,7 @@ public class ScpToMessageBySftp extends ScpToMessage/*AbstractSshMessage*/ { * Returns true if the last modified time needs to be preserved on the * file(s) that get transferred. Returns false otherwise. * - * @return + * @return boolean */ public boolean getPreserveLastModified() { return this.preserveLastModified; diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/testing/Funtest.java b/src/main/org/apache/tools/ant/taskdefs/optional/testing/Funtest.java index 2eb357a39..303a9d68a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/testing/Funtest.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/testing/Funtest.java @@ -500,20 +500,15 @@ public class Funtest extends Task { /** * Now faults are analysed. - *

    The priority is + *

    The priority is

    *
      *
    1. testexceptions, except those indicating a build timeout when the application itself - failed.
      - (because often it is the application fault that is more interesting than the probe - failure, which is usually triggered by the application not starting -
    2. - Application exceptions (above test timeout exceptions) -
    3. - Teardown exceptions -except when they are being ignored -
    4. - Test failures as indicated by the failure property -
    - + * failed. (Because often it is the application fault that is more interesting than the probe + * failure, which is usually triggered by the application not starting.) + *
  • Application exceptions (above test timeout exceptions)
  • + *
  • Teardown exceptions -except when they are being ignored
  • + *
  • Test failures as indicated by the failure property
  • + * */ protected void processExceptions() { taskException = testException; diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/unix/AbstractAccessTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/unix/AbstractAccessTask.java index d3385e6cc..2e1331f68 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/unix/AbstractAccessTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/unix/AbstractAccessTask.java @@ -17,11 +17,11 @@ */ /* - * Since the initial version of this file was deveolped on the clock on + * Since the initial version of this file was developed on the clock on * an NSF grant I should say the following boilerplate: * * This material is based upon work supported by the National Science - * Foundaton under Grant No. EIA-0196404. Any opinions, findings, and + * Foundation under Grant No. EIA-0196404. Any opinions, findings, and * conclusions or recommendations expressed in this material are those * of the author and do not necessarily reflect the views of the * National Science Foundation. diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/unix/Chgrp.java b/src/main/org/apache/tools/ant/taskdefs/optional/unix/Chgrp.java index 1279a2c82..cd2cc4988 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/unix/Chgrp.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/unix/Chgrp.java @@ -17,11 +17,11 @@ */ /* - * Since the initial version of this file was deveolped on the clock on + * Since the initial version of this file was developed on the clock on * an NSF grant I should say the following boilerplate: * * This material is based upon work supported by the National Science - * Foundaton under Grant No. EIA-0196404. Any opinions, findings, and + * Foundation under Grant No. EIA-0196404. Any opinions, findings, and * conclusions or recommendations expressed in this material are those * of the author and do not necessarily reflect the views of the * National Science Foundation. diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/unix/Chown.java b/src/main/org/apache/tools/ant/taskdefs/optional/unix/Chown.java index 53f72536b..02a1c171e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/unix/Chown.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/unix/Chown.java @@ -17,11 +17,11 @@ */ /* - * Since the initial version of this file was deveolped on the clock on + * Since the initial version of this file was developed on the clock on * an NSF grant I should say the following boilerplate: * * This material is based upon work supported by the National Science - * Foundaton under Grant No. EIA-0196404. Any opinions, findings, and + * Foundation under Grant No. EIA-0196404. Any opinions, findings, and * conclusions or recommendations expressed in this material are those * of the author and do not necessarily reflect the views of the * National Science Foundation. diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java b/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java index e83c0b6b5..86f199d7c 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java @@ -21,7 +21,7 @@ * an NSF grant I should say the following boilerplate: * * This material is based upon work supported by the National Science - * Foundaton under Grant No. EIA-0196404. Any opinions, findings, and + * Foundation under Grant No. EIA-0196404. Any opinions, findings, and * conclusions or recommendations expressed in this material are those * of the author and do not necessarily reflect the views of the * National Science Foundation. @@ -58,7 +58,7 @@ import org.apache.tools.ant.util.SymbolicLinkUtils; /** * Creates, Deletes, Records and Restores Symlinks. * - *

    This task performs several related operations. In the most trivial + *

    This task performs several related operations. In the most trivial * and default usage, it creates a link specified in the link attribute to * a resource specified in the resource attribute. The second usage of this * task is to traverse a directory structure specified by a fileset, @@ -67,33 +67,33 @@ import org.apache.tools.ant.util.SymbolicLinkUtils; * directory structure specified by a fileset, looking for properties files * (also specified as included in the fileset) and recreate the links * that have been previously recorded for each directory. Finally, it can be - * used to remove a symlink without deleting the associated resource. + * used to remove a symlink without deleting the associated resource.

    * - *

    Usage examples: + *

    Usage examples:

    * - *

    Make a link named "foo" to a resource named - * "bar.foo" in subdir: + *

    Make a link named "foo" to a resource named + * "bar.foo" in subdir:

    *
      * <symlink link="${dir.top}/foo" resource="${dir.top}/subdir/bar.foo"/>
      * 
    * - *

    Record all links in subdir and its descendants in files named - * "dir.links": + *

    Record all links in subdir and its descendants in files named + * "dir.links":

    *
      * <symlink action="record" linkfilename="dir.links">
      *    <fileset dir="${dir.top}" includes="subdir/**" />
      * </symlink>
      * 
    * - *

    Recreate the links recorded in the previous example: + *

    Recreate the links recorded in the previous example:

    *
      * <symlink action="recreate">
      *    <fileset dir="${dir.top}" includes="subdir/**/dir.links" />
      * </symlink>
      * 
    * - *

    Delete a link named "foo" to a resource named - * "bar.foo" in subdir: + *

    Delete a link named "foo" to a resource named + * "bar.foo" in subdir:

    *
      * <symlink action="delete" link="${dir.top}/foo"/>
      * 
    @@ -107,9 +107,9 @@ import org.apache.tools.ant.util.SymbolicLinkUtils; * or action="recreate", but action="record" should still * work. Finally, the lack of support for symlinks in Java means that all links * are recorded as links to the canonical resource name. - * Therefore the link: link --> subdir/dir/../foo.bar will be + * Therefore the link: link --> subdir/dir/../foo.bar will be * recorded as link=subdir/foo.bar and restored as - * link --> subdir/foo.bar. + * link --> subdir/foo.bar.

    * */ public class Symlink extends DispatchTask { @@ -463,7 +463,7 @@ public class Symlink extends DispatchTask { /** * Conduct the actual construction of a link. * - *

    The link is constructed by calling Execute.runCommand. + *

    The link is constructed by calling Execute.runCommand.

    * * @param res The path of the resource we are linking to. * @param lnk The name of the link we wish to make. @@ -501,9 +501,9 @@ public class Symlink extends DispatchTask { /** * Find all the links in all supplied filesets. * - *

    This method is invoked when the action attribute is + *

    This method is invoked when the action attribute is * "record". This means that filesets are interpreted - * as the directories in which links may be found. + * as the directories in which links may be found.

    * * @param v The filesets specified by the user. * @return A HashSet of File objects containing the @@ -539,10 +539,10 @@ public class Symlink extends DispatchTask { /** * Load links from properties files included in one or more FileSets. * - *

    This method is only invoked when the action attribute is set to + *

    This method is only invoked when the action attribute is set to * "recreate". The filesets passed in are assumed to specify the * names of the property files with the link information and the - * subdirectories in which to look for them. + * subdirectories in which to look for them.

    * * @param v The FileSets for this task. * @return The links to be made. diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java index a47b230b9..ce240e3e8 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java @@ -95,15 +95,15 @@ public abstract class MSVSS extends Task implements MSVSSConstants { private int numDays = Integer.MIN_VALUE; /** Date format for History */ private DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT); - /** Timestamp for retreived files */ + /** Timestamp for retrieved files */ private CurrentModUpdated timestamp = null; /** Behaviour for writable files */ private WritableFiles writableFiles = null; /** - * Each sub-class must implemnt this method and return the constructed + * Each sub-class must implement this method and return the constructed * command line to be executed. It is up to the sub-task to determine the - * required attrubutes and their order. + * required attributes and their order. * @return The Constructed command line. */ abstract Commandline buildCmdLine(); @@ -170,9 +170,12 @@ public abstract class MSVSS extends Task implements MSVSSConstants { } /** - * Executes the task.
    + * Executes the task. + *

    * Builds a command line to execute ss.exe and then calls Exec's run method * to execute the command line. + *

    + * * @throws BuildException if the command cannot execute. */ public void execute() throws BuildException { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSADD.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSADD.java index 0241ee3c8..2e04e209d 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSADD.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSADD.java @@ -94,7 +94,7 @@ public class MSVSSADD extends MSVSS { } /** - * Autoresponce behaviour. Valid options are Y and N. + * Autoresponse behaviour. Valid options are Y and N. * * @param response The auto response value. */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKOUT.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKOUT.java index edbcde963..4e56e0ba2 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKOUT.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKOUT.java @@ -123,7 +123,7 @@ public class MSVSSCHECKOUT extends MSVSS { } /** - * Autoresponce behaviour. Valid options are Y and N. + * Autoresponse behaviour. Valid options are Y and N. * * @param response The auto response value. */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCP.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCP.java index ae2fcb7c8..7d7edc27c 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCP.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCP.java @@ -59,7 +59,7 @@ public class MSVSSCP extends MSVSS { } /** - * Autoresponce behaviour. Valid options are Y and N. + * Autoresponse behaviour. Valid options are Y and N. * * @param response The auto response value. */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCREATE.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCREATE.java index 4f298c030..16f10158b 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCREATE.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCREATE.java @@ -81,7 +81,7 @@ public class MSVSSCREATE extends MSVSS { } /** - * Autoresponce behaviour. Valid options are Y and N. + * Autoresponse behaviour. Valid options are Y and N. * * @param response The auto response value. */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java index fd5ed096a..59ee27298 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java @@ -140,7 +140,7 @@ public class MSVSSGET extends MSVSS { } /** - * Autoresponce behaviour. Valid options are Y and N. + * Autoresponse behaviour. Valid options are Y and N. * * @param response The auto response value. */ diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSHISTORY.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSHISTORY.java index 05ec91c2c..4fdc95d98 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSHISTORY.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSHISTORY.java @@ -147,7 +147,7 @@ public class MSVSSHISTORY extends MSVSS { } /** - * Format of dates in fromDatetoDate. + * Format of dates in fromDate and toDate. * Used when calculating dates with the numdays attribute. * This string uses the formatting rules of SimpleDateFormat. * Defaults to DateFormat.SHORT. diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSLABEL.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSLABEL.java index 4ba9d7b33..6290f2e09 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSLABEL.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSLABEL.java @@ -98,7 +98,7 @@ public class MSVSSLABEL extends MSVSS { } /** - * Autoresponce behaviour. Valid options are Y and N. + * Autoresponse behaviour. Valid options are Y and N. * * @param response The auto response value. */ diff --git a/src/main/org/apache/tools/ant/types/AbstractFileSet.java b/src/main/org/apache/tools/ant/types/AbstractFileSet.java index e3b8aa8ef..1639150bd 100644 --- a/src/main/org/apache/tools/ant/types/AbstractFileSet.java +++ b/src/main/org/apache/tools/ant/types/AbstractFileSet.java @@ -426,6 +426,7 @@ public abstract class AbstractFileSet extends DataType * 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(int max) { @@ -436,6 +437,7 @@ public abstract class AbstractFileSet extends DataType * The maximum number of times a symbolic link may be followed * during a scan. * + * @return int * @since Ant 1.8.0 */ public int getMaxLevelsOfSymlinks() { @@ -455,6 +457,8 @@ public abstract class AbstractFileSet extends DataType /** * Gets whether an error is/should be thrown if the base directory * does not exist. + * + * @return boolean * @since Ant 1.8.2 */ public boolean getErrorOnMissingDir() { diff --git a/src/main/org/apache/tools/ant/types/Assertions.java b/src/main/org/apache/tools/ant/types/Assertions.java index a54db501f..ce7091a7b 100644 --- a/src/main/org/apache/tools/ant/types/Assertions.java +++ b/src/main/org/apache/tools/ant/types/Assertions.java @@ -98,7 +98,7 @@ public class Assertions extends DataType implements Cloneable { /** * enable or disable system assertions. - * Default is not set (neither -enablesystemassersions or -disablesytemassertions + * Default is not set (neither -enablesystemassertions or -disablesytemassertions * are used on the command line). * @param enableSystemAssertions if true enable system assertions */ @@ -229,8 +229,8 @@ public class Assertions extends DataType implements Cloneable { /** * helper method to add a string JVM argument to a command - * @param command - * @param arg + * @param command ditto + * @param arg ditto */ private static void addVmArgument(CommandlineJava command, String arg) { Commandline.Argument argument; diff --git a/src/main/org/apache/tools/ant/types/Commandline.java b/src/main/org/apache/tools/ant/types/Commandline.java index a417a0c77..8b201cf9d 100644 --- a/src/main/org/apache/tools/ant/types/Commandline.java +++ b/src/main/org/apache/tools/ant/types/Commandline.java @@ -34,19 +34,19 @@ import org.apache.tools.ant.util.StringUtils; /** * Commandline objects help handling command lines specifying processes to * execute. - * + *

    * The class can be used to define a command line as nested elements or as a * helper to define a command line by an application. - *

    - * - * <someelement>
    - *   <acommandline executable="/executable/to/run">
    - *     <argument value="argument 1" />
    - *     <argument line="argument_1 argument_2 argument_3" />
    - *     <argument value="argument 4" />
    - *   </acommandline>
    - * </someelement>
    - *
    + *

    + *
    + * <someelement>
    + *   <acommandline executable="/executable/to/run">
    + *     <argument value="argument 1"/>
    + *     <argument line="argument_1 argument_2 argument_3"/>
    + *     <argument value="argument 4"/>
    + *   </acommandline>
    + * </someelement>
    + * 
    * The element someelement must provide a method * createAcommandline which returns an instance of this class. * @@ -251,6 +251,7 @@ public class Commandline implements Cloneable { /** * Get the prefix to be placed in front of the inserted argument. * + * @return String * @since Ant 1.8.0 */ public String getPrefix() { @@ -270,6 +271,7 @@ public class Commandline implements Cloneable { /** * Get the suffix to be placed at the end of the inserted argument. * + * @return String * @since Ant 1.8.0 */ public String getSuffix() { @@ -588,7 +590,7 @@ public class Commandline implements Cloneable { /** * Return a String that describes the command and arguments suitable for - * verbose output before a call to Runtime.exec(String[]). + * verbose output before a call to Runtime.exec(String[]). * @return a string that describes the command and arguments. * @since Ant 1.5 */ @@ -598,7 +600,7 @@ public class Commandline implements Cloneable { /** * Return a String that describes the arguments suitable for - * verbose output before a call to Runtime.exec(String[]). + * verbose output before a call to Runtime.exec(String[]). * @return a string that describes the arguments. * @since Ant 1.5 */ @@ -608,7 +610,7 @@ public class Commandline implements Cloneable { /** * Return a String that describes the command and arguments suitable for - * verbose output before a call to Runtime.exec(String[]). + * verbose output before a call to Runtime.exec(String[]). * @param line the Commandline to describe. * @return a string that describes the command and arguments. * @since Ant 1.5 @@ -619,7 +621,7 @@ public class Commandline implements Cloneable { /** * Return a String that describes the arguments suitable for - * verbose output before a call to Runtime.exec(String[]). + * verbose output before a call to Runtime.exec(String[]). * @param line the Commandline whose arguments to describe. * @return a string that describes the arguments. * @since Ant 1.5 @@ -630,7 +632,7 @@ public class Commandline implements Cloneable { /** * Return a String that describes the command and arguments suitable for - * verbose output before a call to Runtime.exec(String[]). + * verbose output before a call to Runtime.exec(String[]). * *

    This method assumes that the first entry in the array is the * executable to run.

    @@ -656,7 +658,7 @@ public class Commandline implements Cloneable { /** * Return a String that describes the arguments suitable for - * verbose output before a call to Runtime.exec(String[]). + * verbose output before a call to Runtime.exec(String[]). * @param args the command line to describe as an array of strings. * @return a string that describes the arguments. * @since Ant 1.5 @@ -667,7 +669,7 @@ public class Commandline implements Cloneable { /** * Return a String that describes the arguments suitable for - * verbose output before a call to Runtime.exec(String[]). + * verbose output before a call to Runtime.exec(String[]). * * @param args the command line to describe as an array of strings. * @param offset ignore entries before this index. diff --git a/src/main/org/apache/tools/ant/types/CommandlineJava.java b/src/main/org/apache/tools/ant/types/CommandlineJava.java index d811633e3..f5886295d 100644 --- a/src/main/org/apache/tools/ant/types/CommandlineJava.java +++ b/src/main/org/apache/tools/ant/types/CommandlineJava.java @@ -568,7 +568,7 @@ public class CommandlineJava implements Cloneable { /** * Return a String that describes the command and arguments suitable for - * verbose output before a call to Runtime.exec(String[]). + * verbose output before a call to Runtime.exec(String[]). * @return the description string. * @since Ant 1.5 */ diff --git a/src/main/org/apache/tools/ant/types/DataType.java b/src/main/org/apache/tools/ant/types/DataType.java index fda4af62a..c5ee1c977 100644 --- a/src/main/org/apache/tools/ant/types/DataType.java +++ b/src/main/org/apache/tools/ant/types/DataType.java @@ -128,7 +128,7 @@ public abstract class DataType extends ProjectComponent implements Cloneable { * cannot hold other DataTypes as children.

    * *

    The general contract of this method is that it shouldn't do - * anything if {@link #checked checked} is true and + * anything if {@link #checked} is true and * set it to true on exit.

    * @param stack the stack of references to check. * @param project the project to use to dereference the references. @@ -217,6 +217,7 @@ public abstract class DataType extends ProjectComponent implements Cloneable { /** * Performs the check for circular references and returns the * referenced object. + * @param required reference type * @param requiredClass the class that this reference should be a subclass of. * @param dataTypeName the name of the datatype that the reference should be * (error message use only). @@ -231,6 +232,7 @@ public abstract class DataType extends ProjectComponent implements Cloneable { /** * Performs the check for circular references and returns the * referenced object. This version allows the fallback Project instance to be specified. + * @param required reference type * @param requiredClass the class that this reference should be a subclass of. * @param dataTypeName the name of the datatype that the reference should be * (error message use only). diff --git a/src/main/org/apache/tools/ant/types/EnumeratedAttribute.java b/src/main/org/apache/tools/ant/types/EnumeratedAttribute.java index bc893d8d8..18603b2d9 100644 --- a/src/main/org/apache/tools/ant/types/EnumeratedAttribute.java +++ b/src/main/org/apache/tools/ant/types/EnumeratedAttribute.java @@ -71,7 +71,7 @@ public abstract class EnumeratedAttribute { String value) throws BuildException { if (!EnumeratedAttribute.class.isAssignableFrom(clazz)) { throw new BuildException( - "You have to provide a subclass from EnumeratedAttribut as clazz-parameter."); + "You have to provide a subclass from EnumeratedAttribute as clazz-parameter."); } EnumeratedAttribute ea = null; try { diff --git a/src/main/org/apache/tools/ant/types/FileList.java b/src/main/org/apache/tools/ant/types/FileList.java index 42e276352..c36ba6c47 100644 --- a/src/main/org/apache/tools/ant/types/FileList.java +++ b/src/main/org/apache/tools/ant/types/FileList.java @@ -100,7 +100,7 @@ public class FileList extends DataType implements ResourceCollection { /** * Set the filenames attribute. * - * @param filenames a string contains filenames, separated by , or + * @param filenames a string containing filenames, separated by comma or * by whitespace. */ public void setFiles(String filenames) { diff --git a/src/main/org/apache/tools/ant/types/Path.java b/src/main/org/apache/tools/ant/types/Path.java index 16270e360..70358d8fd 100644 --- a/src/main/org/apache/tools/ant/types/Path.java +++ b/src/main/org/apache/tools/ant/types/Path.java @@ -39,28 +39,27 @@ import org.apache.tools.ant.util.JavaEnvUtils; * This object represents a path as used by CLASSPATH or PATH * environment variable. A path might also be described as a collection * of unique filesystem resources. - *

    - * - * <sometask>
    - *   <somepath>
    - *     <pathelement location="/path/to/file.jar" />
    - *     <pathelement - * path="/path/to/file2.jar:/path/to/class2;/path/to/class3" /> - *
    - *     <pathelement location="/path/to/file3.jar" />
    - *     <pathelement location="/path/to/file4.jar" />
    - *   </somepath>
    - * </sometask>
    - *
    + *

    + * <sometask>
    + *   <somepath>
    + *     <pathelement location="/path/to/file.jar"/>
    + *     <pathelement path="/path/to/file2.jar:/path/to/class2;/path/to/class3"/>
    + *     <pathelement location="/path/to/file3.jar"/>
    + *     <pathelement location="/path/to/file4.jar"/>
    + *   </somepath>
    + * </sometask>
    + * 
    *

    * The object implementation sometask must provide a method called * createSomepath which returns an instance of Path. * Nested path definitions are handled by the Path object and must be labeled - * pathelement.

    - * + * pathelement. + *

    + *

    * The path element takes a parameter path which will be parsed * and split into single elements. It will usually be used * to define a path from an environment variable. + *

    */ public class Path extends DataType implements Cloneable, ResourceCollection { @@ -356,6 +355,7 @@ public class Path extends DataType implements Cloneable, ResourceCollection { /** * Whether to cache the current path. + * @param b boolean * @since Ant 1.8.0 */ public void setCache(boolean b) { @@ -663,7 +663,7 @@ public class Path extends DataType implements Cloneable, ResourceCollection { } /** - * Emulation of extdirs feature in java >= 1.2. + * Emulation of extdirs feature in Java >= 1.2. * This method adds all files in the given * directories (but not in sub-directories!) to the classpath, * so that you don't have to specify them all one by one. diff --git a/src/main/org/apache/tools/ant/types/Quantifier.java b/src/main/org/apache/tools/ant/types/Quantifier.java index ac1b84ce6..fae3dc51a 100644 --- a/src/main/org/apache/tools/ant/types/Quantifier.java +++ b/src/main/org/apache/tools/ant/types/Quantifier.java @@ -22,17 +22,17 @@ import org.apache.tools.ant.BuildException; /** * EnumeratedAttribute for quantifier comparisons. Evaluates a * boolean[] or raw true and false - * counts. Accepts the following values:
      - *
    • "all"
    • - none false - *
    • "each"
    • - none false - *
    • "every"
    • - none false - *
    • "any"
    • - at least one true - *
    • "some"
    • - at least one true - *
    • "one"
    • - exactly one true - *
    • "majority"
    • - more true than false - *
    • "most"
    • - more true than false - *
    • "none"
    • - none true - *
    + * counts. Accepts the following values:
    + *
    "all"
    none false
    + *
    "each"
    none false
    + *
    "every"
    none false
    + *
    "any"
    at least one true
    + *
    "some"
    at least one true
    + *
    "one"
    exactly one true
    + *
    "majority"
    more true than false
    + *
    "most"
    more true than false
    + *
    "none"
    none true
    + *
    * @since Ant 1.7 */ public class Quantifier extends EnumeratedAttribute { @@ -114,7 +114,7 @@ public class Quantifier extends EnumeratedAttribute { } /** - * Evaluate a boolean array. + * Evaluate a boolean array. * @param b the boolean[] to evaluate. * @return true if the argument fell within the parameters of this Quantifier. */ diff --git a/src/main/org/apache/tools/ant/types/RedirectorElement.java b/src/main/org/apache/tools/ant/types/RedirectorElement.java index d27b199c3..e72d394eb 100644 --- a/src/main/org/apache/tools/ant/types/RedirectorElement.java +++ b/src/main/org/apache/tools/ant/types/RedirectorElement.java @@ -435,6 +435,7 @@ public class RedirectorElement extends DataType { *

    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.

    + * @param b boolean * @since 1.9.4 */ public void setBinaryOutput(boolean b) { diff --git a/src/main/org/apache/tools/ant/types/Resource.java b/src/main/org/apache/tools/ant/types/Resource.java index 6cd0e07db..5bf9814ef 100644 --- a/src/main/org/apache/tools/ant/types/Resource.java +++ b/src/main/org/apache/tools/ant/types/Resource.java @@ -28,10 +28,11 @@ import org.apache.tools.ant.types.resources.FileProvider; /** * Describes a "File-like" resource (File, ZipEntry, etc.). - * + *

    * This class is meant to be used by classes needing to record path * and date/time information about a file, a zip entry or some similar * resource (URL, archive in a version control repository, ...). + *

    * * @since Ant 1.5.2 * @see org.apache.tools.ant.types.resources.Touchable @@ -434,6 +435,9 @@ public class Resource extends DataType implements Comparable, Resource *

    This implementation of the method will return the current * instance itself if it can be assigned to the given class.

    * + * @param desired type + * @param clazz a class + * @return resource of a desired type * @since Ant 1.8.0 */ public T as(Class clazz) { diff --git a/src/main/org/apache/tools/ant/types/ResourceLocation.java b/src/main/org/apache/tools/ant/types/ResourceLocation.java index c5a44ea2c..08791541a 100644 --- a/src/main/org/apache/tools/ant/types/ResourceLocation.java +++ b/src/main/org/apache/tools/ant/types/ResourceLocation.java @@ -27,12 +27,11 @@ import java.net.URL; * href="http://oasis-open.org/committees/entity/spec-2001-08-06.html"> * OASIS "Open Catalog" standard.

    * - *

    Possible Future Enhancements: + *

    Possible Future Enhancements:

    *
      *
    • Bring the Ant element names into conformance with the OASIS standard
    • *
    • Add support for additional OASIS catalog entry types
    • *
    - *

    * * @see org.apache.xml.resolver.Catalog * @since Ant 1.6 @@ -103,4 +102,4 @@ public class ResourceLocation { return base; } -} //-- ResourceLocation +} diff --git a/src/main/org/apache/tools/ant/types/Substitution.java b/src/main/org/apache/tools/ant/types/Substitution.java index 343f4c49e..2b11da5e7 100644 --- a/src/main/org/apache/tools/ant/types/Substitution.java +++ b/src/main/org/apache/tools/ant/types/Substitution.java @@ -17,7 +17,6 @@ */ package org.apache.tools.ant.types; - import org.apache.tools.ant.Project; /*** diff --git a/src/main/org/apache/tools/ant/types/XMLCatalog.java b/src/main/org/apache/tools/ant/types/XMLCatalog.java index 2edd5a136..20bbe948a 100644 --- a/src/main/org/apache/tools/ant/types/XMLCatalog.java +++ b/src/main/org/apache/tools/ant/types/XMLCatalog.java @@ -78,19 +78,18 @@ import org.xml.sax.XMLReader; * URI respectively.

    * *

    The following is a usage example:

    - * - * - * <xmlcatalog>
    - *   <dtd publicId="" location="/path/to/file.jar" />
    - *   <dtd publicId="" location="/path/to/file2.jar" />
    - *   <entity publicId="" location="/path/to/file3.jar" />
    - *   <entity publicId="" location="/path/to/file4.jar" />
    - *   <catalogpath>
    - *     <pathelement location="/etc/sgml/catalog"/>
    - *   </catalogpath>
    - *   <catalogfiles dir="/opt/catalogs/" includes="**\catalog.xml" />
    - * </xmlcatalog>
    - *
    + *
    + * <xmlcatalog>
    + *   <dtd publicId="" location="/path/to/file.jar"/>
    + *   <dtd publicId="" location="/path/to/file2.jar"/>
    + *   <entity publicId="" location="/path/to/file3.jar"/>
    + *   <entity publicId="" location="/path/to/file4.jar"/>
    + *   <catalogpath>
    + *     <pathelement location="/etc/sgml/catalog"/>
    + *   </catalogpath>
    + *   <catalogfiles dir="/opt/catalogs/" includes="**\catalog.xml"/>
    + * </xmlcatalog>
    + * 
    *

    * Tasks wishing to use <xmlcatalog> must provide a method called * createXMLCatalog which returns an instance of @@ -100,14 +99,13 @@ import org.xml.sax.XMLReader; * *

    The following is a description of the resolution algorithm: * entities/URIs/dtds are looked up in each of the following contexts, - * stopping when a valid and readable resource is found: + * stopping when a valid and readable resource is found:

    *
      *
    1. In the local filesystem
    2. *
    3. In the classpath
    4. *
    5. Using the Apache xml-commons resolver (if it is available)
    6. *
    7. In URL-space
    8. *
    - *

    * *

    See {@link * org.apache.tools.ant.taskdefs.optional.XMLValidateTask @@ -484,7 +482,7 @@ public class XMLCatalog extends DataType /** * Factory method for creating the appropriate CatalogResolver * strategy implementation. - *

    Until we query the classpath, we don't know whether the Apache + *

    Until we query the classpath, we don't know whether the Apache * resolver (Norm Walsh's library from xml-commons) is available or not. * This method determines whether the library is available and creates the * appropriate implementation of CatalogResolver based on the answer.

    @@ -1125,4 +1123,4 @@ public class XMLCatalog extends DataType externalCatalogsProcessed = true; } } -} //-- XMLCatalog +} diff --git a/src/main/org/apache/tools/ant/types/mappers/CutDirsMapper.java b/src/main/org/apache/tools/ant/types/mappers/CutDirsMapper.java index b9e7cfb47..ce8f39c13 100644 --- a/src/main/org/apache/tools/ant/types/mappers/CutDirsMapper.java +++ b/src/main/org/apache/tools/ant/types/mappers/CutDirsMapper.java @@ -37,6 +37,7 @@ public class CutDirsMapper implements FileNameMapper { /** * The number of leading directories to cut. + * @param dirs int */ public void setDirs(final int dirs) { this.dirs = dirs; diff --git a/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java b/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java index df5a3cec3..2028075a1 100644 --- a/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java +++ b/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java @@ -60,7 +60,7 @@ public abstract class AbstractScriptComponent extends ProjectComponent { } /** - * Load the script from an external file ; optional. + * Load the script from an external file; optional. * * @param file the file containing the script source. */ diff --git a/src/main/org/apache/tools/ant/types/optional/ScriptFilter.java b/src/main/org/apache/tools/ant/types/optional/ScriptFilter.java index 3f6ec88fd..67d3cced1 100644 --- a/src/main/org/apache/tools/ant/types/optional/ScriptFilter.java +++ b/src/main/org/apache/tools/ant/types/optional/ScriptFilter.java @@ -70,7 +70,7 @@ public class ScriptFilter extends TokenFilter.ChainableReaderFilter { /** * Initialize. * - * @exception BuildException if someting goes wrong + * @exception BuildException if something goes wrong */ private void init() throws BuildException { if (runner != null) { @@ -113,7 +113,7 @@ public class ScriptFilter extends TokenFilter.ChainableReaderFilter { } /** - * Load the script from an external file ; optional. + * Load the script from an external file; optional. * * @param file the file containing the script source. */ diff --git a/src/main/org/apache/tools/ant/types/optional/ScriptMapper.java b/src/main/org/apache/tools/ant/types/optional/ScriptMapper.java index 38dab0bb7..36347a7d8 100644 --- a/src/main/org/apache/tools/ant/types/optional/ScriptMapper.java +++ b/src/main/org/apache/tools/ant/types/optional/ScriptMapper.java @@ -66,7 +66,7 @@ public class ScriptMapper extends AbstractScriptComponent implements FileNameMap /** * Returns an array containing the target filename(s) for the given source * file. - *

    + * *

    if the given rule doesn't apply to the source file, implementation * must return null. SourceFileScanner will then omit the source file in * question.

    diff --git a/src/main/org/apache/tools/ant/types/optional/ScriptSelector.java b/src/main/org/apache/tools/ant/types/optional/ScriptSelector.java index ca28f69f5..c07ed13d8 100644 --- a/src/main/org/apache/tools/ant/types/optional/ScriptSelector.java +++ b/src/main/org/apache/tools/ant/types/optional/ScriptSelector.java @@ -86,7 +86,7 @@ public class ScriptSelector extends BaseSelector { * Initialize on demand. * * @throws org.apache.tools.ant.BuildException - * if someting goes wrong + * if something goes wrong */ private void init() throws BuildException { if (runner != null) { @@ -96,7 +96,7 @@ public class ScriptSelector extends BaseSelector { } /** - * Load the script from an external file ; optional. + * Load the script from an external file; optional. * * @param file the file containing the script source. */ diff --git a/src/main/org/apache/tools/ant/types/optional/depend/DependScanner.java b/src/main/org/apache/tools/ant/types/optional/depend/DependScanner.java index bb3cf54bf..27a1fdda2 100644 --- a/src/main/org/apache/tools/ant/types/optional/depend/DependScanner.java +++ b/src/main/org/apache/tools/ant/types/optional/depend/DependScanner.java @@ -152,46 +152,47 @@ public class DependScanner extends DirectoryScanner { /** * @see DirectoryScanner#getExcludedDirectories + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public String[] getExcludedDirectories() { return null; } /** * @see DirectoryScanner#getExcludedFiles + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public String[] getExcludedFiles() { return null; } /** * @see DirectoryScanner#getIncludedDirectories + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public String[] getIncludedDirectories() { return new String[0]; } /** * @see DirectoryScanner#getIncludedDirsCount + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public int getIncludedDirsCount() { return 0; } /** * @see DirectoryScanner#getNotIncludedDirectories + * {@inheritDoc}. */ - /** {@inheritDoc}. */ public String[] getNotIncludedDirectories() { return null; } /** * @see DirectoryScanner#getNotIncludedFiles + * {@inheritDoc}. */ /** {@inheritDoc}. */ public String[] getNotIncludedFiles() { @@ -200,6 +201,7 @@ public class DependScanner extends DirectoryScanner { /** * @see DirectoryScanner#setExcludes + * {@inheritDoc}. */ /** {@inheritDoc}. */ public void setExcludes(String[] excludes) { @@ -207,6 +209,7 @@ public class DependScanner extends DirectoryScanner { /** * @see DirectoryScanner#setIncludes + * {@inheritDoc}. */ /** {@inheritDoc}. */ public void setIncludes(String[] includes) { @@ -214,6 +217,7 @@ public class DependScanner extends DirectoryScanner { /** * @see DirectoryScanner#setCaseSensitive + * {@inheritDoc}. */ /** {@inheritDoc}. */ public void setCaseSensitive(boolean isCaseSensitive) { diff --git a/src/main/org/apache/tools/ant/types/optional/image/DrawOperation.java b/src/main/org/apache/tools/ant/types/optional/image/DrawOperation.java index 4f6410ca2..e02d0c8ee 100644 --- a/src/main/org/apache/tools/ant/types/optional/image/DrawOperation.java +++ b/src/main/org/apache/tools/ant/types/optional/image/DrawOperation.java @@ -24,7 +24,7 @@ import javax.media.jai.PlanarImage; * Interface which represents an Operation which is "drawable", such * as a Rectangle, Circle or Text. The Operation is responsible for * creating its own image buffer and drawing itself into it, then - * wrapping and returning it as a PlanarImage. This allows multible + * wrapping and returning it as a PlanarImage. This allows multiple * "drawable" objects to be nested. * * @see org.apache.tools.ant.taskdefs.optional.image.Image diff --git a/src/main/org/apache/tools/ant/types/optional/image/Ellipse.java b/src/main/org/apache/tools/ant/types/optional/image/Ellipse.java index 9924d906e..9fa1802d4 100644 --- a/src/main/org/apache/tools/ant/types/optional/image/Ellipse.java +++ b/src/main/org/apache/tools/ant/types/optional/image/Ellipse.java @@ -36,7 +36,7 @@ public class Ellipse extends BasicShape implements DrawOperation { /** * Set the width. - * @param width the width of the elipse. + * @param width the width of the ellipse. */ public void setWidth(int width) { this.width = width; diff --git a/src/main/org/apache/tools/ant/types/optional/image/Rotate.java b/src/main/org/apache/tools/ant/types/optional/image/Rotate.java index 3013bde4e..3d7a03af7 100644 --- a/src/main/org/apache/tools/ant/types/optional/image/Rotate.java +++ b/src/main/org/apache/tools/ant/types/optional/image/Rotate.java @@ -75,19 +75,19 @@ public class Rotate extends TransformOperation implements DrawOperation { if (instr instanceof DrawOperation) { // If this TransformOperation has DrawOperation children // then Rotate the first child and return. - System.out.println("Execing Draws"); + System.out.println("Exec'ing Draws"); PlanarImage op = ((DrawOperation) instr).executeDrawOperation(); image = performRotate(op); return image; } else if (instr instanceof TransformOperation) { bi = image.getAsBufferedImage(); - System.out.println("Execing Transforms"); + System.out.println("Exec'ing Transforms"); image = ((TransformOperation) instr) .executeTransformOperation(PlanarImage.wrapRenderedImage(bi)); bi = image.getAsBufferedImage(); } } - System.out.println("Execing as TransformOperation"); + System.out.println("Exec'ing as TransformOperation"); image = performRotate(image); System.out.println(image); return image; diff --git a/src/main/org/apache/tools/ant/types/resolver/ApacheCatalog.java b/src/main/org/apache/tools/ant/types/resolver/ApacheCatalog.java index cbf3f3fe3..66ed7ff5d 100644 --- a/src/main/org/apache/tools/ant/types/resolver/ApacheCatalog.java +++ b/src/main/org/apache/tools/ant/types/resolver/ApacheCatalog.java @@ -35,7 +35,7 @@ import org.apache.xml.resolver.helpers.PublicId; * See XMLCatalog.java for the details of the entity and URI * resolution algorithms. * - * @see org.apache.tools.ant.types.XMLCatalog.CatalogResolver + * @see org.apache.tools.ant.types.XMLCatalog * @since Ant 1.6 */ public class ApacheCatalog extends Catalog { @@ -118,4 +118,4 @@ public class ApacheCatalog extends Catalog { super.addEntry(entry); } -} //- ApacheCatalog +} diff --git a/src/main/org/apache/tools/ant/types/resolver/ApacheCatalogResolver.java b/src/main/org/apache/tools/ant/types/resolver/ApacheCatalogResolver.java index 2312d3dcc..f03624791 100644 --- a/src/main/org/apache/tools/ant/types/resolver/ApacheCatalogResolver.java +++ b/src/main/org/apache/tools/ant/types/resolver/ApacheCatalogResolver.java @@ -53,7 +53,7 @@ import org.apache.xml.resolver.tools.CatalogResolver; * in XMLCatalog's lookup algorithm. See XMLCatalog.java for more * details.

    * - * @see org.apache.tools.ant.types.XMLCatalog.CatalogResolver + * @see org.apache.tools.ant.types.XMLCatalog * @see org.apache.xml.resolver.CatalogManager * @since Ant 1.6 */ @@ -171,4 +171,4 @@ public class ApacheCatalogResolver extends CatalogResolver { xmlCatalog.addEntity(entity); } -} //-- ApacheCatalogResolver +} diff --git a/src/main/org/apache/tools/ant/types/resources/AbstractClasspathResource.java b/src/main/org/apache/tools/ant/types/resources/AbstractClasspathResource.java index 417da9a7a..5805c7c93 100644 --- a/src/main/org/apache/tools/ant/types/resources/AbstractClasspathResource.java +++ b/src/main/org/apache/tools/ant/types/resources/AbstractClasspathResource.java @@ -30,11 +30,10 @@ import org.apache.tools.ant.types.Resource; import org.apache.tools.ant.util.FileUtils; /** - * * A Resource representation of anything that is accessed via a Java classloader. * The core methods to set/resolve the classpath are provided. - * @since Ant 1.8.0 * + * @since Ant 1.8.0 */ public abstract class AbstractClasspathResource extends Resource { @@ -107,10 +106,11 @@ public abstract class AbstractClasspathResource extends Resource { * Use the reference to locate the loader. If the loader is not * found, taskdef will use the specified classpath and register it * with the specified name. - * + *

    * This allow multiple taskdef/typedef to use the same class loader, * so they can be used together. It eliminate the need to * put them in the CLASSPATH. + *

    * * @param r the reference to locate the loader. */ @@ -124,6 +124,7 @@ public abstract class AbstractClasspathResource extends Resource { * *

    Only relevant if a classpath has been specified.

    * + * @param b boolean * @since Ant 1.8.0 */ public void setParentFirst(boolean b) { @@ -132,6 +133,7 @@ public abstract class AbstractClasspathResource extends Resource { /** * Overrides the super version. + * * @param r the Reference to set. */ public void setRefid(Reference r) { @@ -144,6 +146,7 @@ public abstract class AbstractClasspathResource extends Resource { /** * Learn whether this resource exists. This implementation opens the input stream * as the test. + * * @return true if this resource exists. */ public boolean isExists() { @@ -164,6 +167,7 @@ public abstract class AbstractClasspathResource extends Resource { /** * Return an InputStream for reading the contents of this Resource. + * * @return an InputStream object. * @throws IOException if an error occurs. */ @@ -195,6 +199,8 @@ public abstract class AbstractClasspathResource extends Resource { * combines the various ways that could specify a ClassLoader and * potentially creates one that needs to be cleaned up when it is * no longer needed so that classes can get garbage collected. + * + * @return ClassLoaderWithFlag */ protected ClassLoaderWithFlag getClassLoader() { ClassLoader cl = null; @@ -226,6 +232,7 @@ public abstract class AbstractClasspathResource extends Resource { /** * open the input stream from a specific classloader + * * @param cl the classloader to use. Will be null if the system classloader is used * @return an open input stream for the resource * @throws IOException if an error occurs. diff --git a/src/main/org/apache/tools/ant/types/resources/ArchiveResource.java b/src/main/org/apache/tools/ant/types/resources/ArchiveResource.java index 09ce03224..2d87aa6c8 100644 --- a/src/main/org/apache/tools/ant/types/resources/ArchiveResource.java +++ b/src/main/org/apache/tools/ant/types/resources/ArchiveResource.java @@ -235,7 +235,7 @@ public abstract class ArchiveResource extends Resource { /** * Format this Resource as a String. - * @return String representatation of this Resource. + * @return String representation of this Resource. */ public String toString() { return isReference() ? getCheckedRef().toString() diff --git a/src/main/org/apache/tools/ant/types/resources/Archives.java b/src/main/org/apache/tools/ant/types/resources/Archives.java index 4b0d51c64..24bfd285f 100644 --- a/src/main/org/apache/tools/ant/types/resources/Archives.java +++ b/src/main/org/apache/tools/ant/types/resources/Archives.java @@ -48,6 +48,8 @@ public class Archives extends DataType /** * Wrapper to identify nested resource collections as ZIP * archives. + * + * @return Union */ public Union createZips() { if (isReference()) { @@ -60,6 +62,8 @@ public class Archives extends DataType /** * Wrapper to identify nested resource collections as ZIP * archives. + * + * @return Union */ public Union createTars() { if (isReference()) { @@ -71,6 +75,8 @@ public class Archives extends DataType /** * Sums the sizes of nested archives. + * + * @return int */ public int size() { if (isReference()) { @@ -86,6 +92,8 @@ public class Archives extends DataType /** * Merges the nested collections. + * + * @return Iterator<Resource> */ public Iterator iterator() { if (isReference()) { @@ -113,6 +121,7 @@ public class Archives extends DataType /** * Overrides the base version. + * * @param r the Reference to set. */ @Override @@ -127,6 +136,7 @@ public class Archives extends DataType /** * Implement clone. The nested resource collections are cloned as * well. + * * @return a cloned instance. */ @Override @@ -146,6 +156,8 @@ public class Archives extends DataType /** * Turns all nested resources into corresponding ArchiveFileSets * and returns an iterator over the collected archives. + * + * @return Iterator<ArchiveFileSet> */ protected Iterator grabArchives() { final List l = new LinkedList(); @@ -161,6 +173,10 @@ public class Archives extends DataType /** * Configures the archivefileset based on this type's settings, * set the source. + * + * @param afs ArchiveFileSet + * @param src Resource + * @return ArchiveFileSet */ protected ArchiveFileSet configureArchive(final ArchiveFileSet afs, final Resource src) { @@ -172,6 +188,7 @@ public class Archives extends DataType /** * Overrides the version of DataType to recurse on all DataType * child elements that may have been added. + * * @param stk the stack of data types to use (recursively). * @param p the project to use to dereference the references. * @throws BuildException on error. diff --git a/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java b/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java index 281fa0f1f..c794aed9d 100644 --- a/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java +++ b/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java @@ -50,6 +50,7 @@ public abstract class BaseResourceCollectionContainer /** * Create a new BaseResourceCollectionContainer. + * @param project Project * @since Ant 1.8 */ public BaseResourceCollectionContainer(Project project) { diff --git a/src/main/org/apache/tools/ant/types/resources/ContentTransformingResource.java b/src/main/org/apache/tools/ant/types/resources/ContentTransformingResource.java index 79445bfdc..19e86b334 100644 --- a/src/main/org/apache/tools/ant/types/resources/ContentTransformingResource.java +++ b/src/main/org/apache/tools/ant/types/resources/ContentTransformingResource.java @@ -149,6 +149,8 @@ public abstract class ContentTransformingResource extends ResourceDecorator { * are appended to, for example.

    * *

    This implementations returns false.

    + * + * @return boolean false */ protected boolean isAppendSupported() { return false; @@ -158,7 +160,7 @@ public abstract class ContentTransformingResource extends ResourceDecorator { * Get a content-filtering/transforming InputStream. * * @param in InputStream to wrap, will never be null. - * @return a compressed inputstream. + * @return a compressed InputStream. * @throws IOException if there is a problem. */ protected abstract InputStream wrapStream(InputStream in) @@ -168,7 +170,7 @@ public abstract class ContentTransformingResource extends ResourceDecorator { * Get a content-filtering/transforming OutputStream. * * @param out OutputStream to wrap, will never be null. - * @return a compressed outputstream. + * @return a compressed OutputStream. * @throws IOException if there is a problem. */ protected abstract OutputStream wrapStream(OutputStream out) diff --git a/src/main/org/apache/tools/ant/types/resources/LazyResourceCollectionWrapper.java b/src/main/org/apache/tools/ant/types/resources/LazyResourceCollectionWrapper.java index 4f9acd329..bdcc95d7d 100644 --- a/src/main/org/apache/tools/ant/types/resources/LazyResourceCollectionWrapper.java +++ b/src/main/org/apache/tools/ant/types/resources/LazyResourceCollectionWrapper.java @@ -67,7 +67,7 @@ public class LazyResourceCollectionWrapper extends /** * Specify if the resource should be filtered or not. This function should - * be overrided in order to define the filtering algorithm + * be overriden in order to define the filtering algorithm * * @param r resource considered for filtration * @return whether the resource should be filtered or not diff --git a/src/main/org/apache/tools/ant/types/resources/LogOutputResource.java b/src/main/org/apache/tools/ant/types/resources/LogOutputResource.java index cd19c9c76..9b48658eb 100644 --- a/src/main/org/apache/tools/ant/types/resources/LogOutputResource.java +++ b/src/main/org/apache/tools/ant/types/resources/LogOutputResource.java @@ -35,7 +35,7 @@ public class LogOutputResource extends Resource implements Appendable { /** * Create a new LogOutputResource. - * @param managingComponent + * @param managingComponent ditto */ public LogOutputResource(ProjectComponent managingComponent) { super(NAME); diff --git a/src/main/org/apache/tools/ant/types/resources/MappedResourceCollection.java b/src/main/org/apache/tools/ant/types/resources/MappedResourceCollection.java index 2f1a926b6..9df69cfa2 100644 --- a/src/main/org/apache/tools/ant/types/resources/MappedResourceCollection.java +++ b/src/main/org/apache/tools/ant/types/resources/MappedResourceCollection.java @@ -112,6 +112,7 @@ public class MappedResourceCollection /** * Set whether to cache collections. + * @param cache boolean * @since Ant 1.8.1 */ public void setCache(boolean cache) { diff --git a/src/main/org/apache/tools/ant/types/resources/ResourceDecorator.java b/src/main/org/apache/tools/ant/types/resources/ResourceDecorator.java index 9eb8c1d84..2d87fb13b 100644 --- a/src/main/org/apache/tools/ant/types/resources/ResourceDecorator.java +++ b/src/main/org/apache/tools/ant/types/resources/ResourceDecorator.java @@ -201,6 +201,7 @@ public abstract class ResourceDecorator extends Resource { /** * De-references refids if any, ensures a wrapped resource has * been specified. + * @return Resource */ protected final Resource getResource() { if (isReference()) { diff --git a/src/main/org/apache/tools/ant/types/resources/ResourceList.java b/src/main/org/apache/tools/ant/types/resources/ResourceList.java index da83ea9dd..b24277dda 100644 --- a/src/main/org/apache/tools/ant/types/resources/ResourceList.java +++ b/src/main/org/apache/tools/ant/types/resources/ResourceList.java @@ -56,6 +56,8 @@ public class ResourceList extends DataType implements ResourceCollection { /** * Adds a source. + * + * @param rc ResourceCollection */ public void add(ResourceCollection rc) { if (isReference()) { @@ -67,6 +69,8 @@ public class ResourceList extends DataType implements ResourceCollection { /** * Adds a FilterChain. + * + * @param filter FilterChain */ public final void addFilterChain(FilterChain filter) { if (isReference()) { @@ -78,12 +82,15 @@ public class ResourceList extends DataType implements ResourceCollection { /** * Encoding to use for input, defaults to the platform's default - * encoding.

    + * encoding. * + *

    * For a list of possible values see * - * http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html - * .

    + * http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html. + *

    + * + * @param encoding String */ public final void setEncoding(String encoding) { if (isReference()) { @@ -95,6 +102,8 @@ public class ResourceList extends DataType implements ResourceCollection { /** * Makes this instance in effect a reference to another ResourceList * instance. + * + * @param r Reference */ public void setRefid(Reference r) throws BuildException { if (encoding != null) { @@ -110,6 +119,7 @@ public class ResourceList extends DataType implements ResourceCollection { * Fulfill the ResourceCollection contract. The Iterator returned * will throw ConcurrentModificationExceptions if ResourceCollections * are added to this container while the Iterator is in use. + * * @return a "fail-fast" Iterator. */ public final synchronized Iterator iterator() { @@ -121,6 +131,7 @@ public class ResourceList extends DataType implements ResourceCollection { /** * Fulfill the ResourceCollection contract. + * * @return number of elements as int. */ public synchronized int size() { @@ -132,6 +143,7 @@ public class ResourceList extends DataType implements ResourceCollection { /** * Fulfill the ResourceCollection contract. + * * @return whether this is a filesystem-only resource collection. */ public synchronized boolean isFilesystemOnly() { @@ -144,6 +156,7 @@ public class ResourceList extends DataType implements ResourceCollection { /** * Overrides the version of DataType to recurse on all DataType * child elements that may have been added. + * * @param stk the stack of data types to use (recursively). * @param p the project to use to dereference the references. * @throws BuildException on error. diff --git a/src/main/org/apache/tools/ant/types/resources/Resources.java b/src/main/org/apache/tools/ant/types/resources/Resources.java index 1dd888d4d..1e029b220 100644 --- a/src/main/org/apache/tools/ant/types/resources/Resources.java +++ b/src/main/org/apache/tools/ant/types/resources/Resources.java @@ -124,6 +124,7 @@ public class Resources extends DataType implements ResourceCollection { /** * Create a new Resources. + * @param project Project * @since Ant 1.8 */ public Resources(Project project) { diff --git a/src/main/org/apache/tools/ant/types/resources/SizeLimitCollection.java b/src/main/org/apache/tools/ant/types/resources/SizeLimitCollection.java index c8e772be0..2992d5b57 100644 --- a/src/main/org/apache/tools/ant/types/resources/SizeLimitCollection.java +++ b/src/main/org/apache/tools/ant/types/resources/SizeLimitCollection.java @@ -31,7 +31,7 @@ public abstract class SizeLimitCollection extends BaseResourceCollectionWrapper /** * Set the number of resources to be included. - * @param i the count as int. + * @param i the count as int. */ public synchronized void setCount(int i) { checkAttributesAllowed(); @@ -40,7 +40,7 @@ public abstract class SizeLimitCollection extends BaseResourceCollectionWrapper /** * Get the number of resources to be included. Default is 1. - * @return the count as int. + * @return the count as int. */ public synchronized int getCount() { return count; @@ -57,7 +57,7 @@ public abstract class SizeLimitCollection extends BaseResourceCollectionWrapper } /** - * Get the count, verifying it is >= 0. + * Get the count, verifying it is >= 0. * @return int count */ protected int getValidCount() { diff --git a/src/main/org/apache/tools/ant/types/resources/URLResource.java b/src/main/org/apache/tools/ant/types/resources/URLResource.java index 027a9bd51..643ec0087 100644 --- a/src/main/org/apache/tools/ant/types/resources/URLResource.java +++ b/src/main/org/apache/tools/ant/types/resources/URLResource.java @@ -110,6 +110,7 @@ public class URLResource extends Resource implements URLProvider { /** * Base URL which combined with the relativePath attribute defines * the URL. + * @param base URL * @since Ant 1.8.0 */ public synchronized void setBaseURL(URL base) { @@ -123,6 +124,7 @@ public class URLResource extends Resource implements URLProvider { /** * Relative path which combined with the baseURL attribute defines * the URL. + * @param r String * @since Ant 1.8.0 */ public synchronized void setRelativePath(String r) { 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 e2f2f9f2b..5b07395e0 100644 --- a/src/main/org/apache/tools/ant/types/resources/Union.java +++ b/src/main/org/apache/tools/ant/types/resources/Union.java @@ -110,6 +110,7 @@ public class Union extends BaseResourceCollectionContainer { /** * Unify the contained Resources. + * @param 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 + * @return Collection<String> */ protected Collection getAllToStrings() { final Set allResources = getAllResources(); @@ -135,7 +136,7 @@ public class Union extends BaseResourceCollectionContainer { /** * Get the unified set of contained Resources. - * @return Set + * @return Set<Resource> */ protected Set getAllResources() { final List resourceCollections = getResourceCollections(); 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 37fc98ec4..1dec5464c 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() { diff --git a/src/main/org/apache/tools/ant/types/resources/comparators/Content.java b/src/main/org/apache/tools/ant/types/resources/comparators/Content.java index 1810b6407..07dd315a8 100644 --- a/src/main/org/apache/tools/ant/types/resources/comparators/Content.java +++ b/src/main/org/apache/tools/ant/types/resources/comparators/Content.java @@ -57,7 +57,7 @@ public class Content extends ResourceComparator { * @return a negative integer, zero, or a positive integer as the first * argument is less than, equal to, or greater than the second. * @throws BuildException if I/O errors occur. - * @see org.apache.tools.ant.util.ResourceUtils#compareContent(Resource, Resource, boolean). + * @see org.apache.tools.ant.util.ResourceUtils#compareContent(Resource, Resource, boolean) */ protected int resourceCompare(Resource foo, Resource bar) { try { 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 50c242a20..baf9a3c25 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() { 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 6b1c8002e..19e0140d5 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,11 +43,11 @@ public class ResourceSelectorContainer extends DataType { /** * Construct a new ResourceSelectorContainer with the specified array of selectors. - * @param r the ResourceSelector[] to add. + * @param rs the ResourceSelector[] to add. */ - public ResourceSelectorContainer(ResourceSelector[] r) { - for (int i = 0; i < r.length; i++) { - add(r[i]); + public ResourceSelectorContainer(ResourceSelector[] rs) { + for (int i = 0; i < rs.length; i++) { + add(rs[i]); } } 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 414390edf..28e05562f 100644 --- a/src/main/org/apache/tools/ant/types/selectors/BaseSelector.java +++ b/src/main/org/apache/tools/ant/types/selectors/BaseSelector.java @@ -59,6 +59,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) { 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 8232e45f3..c5ff5d53f 100644 --- a/src/main/org/apache/tools/ant/types/selectors/DateSelector.java +++ b/src/main/org/apache/tools/ant/types/selectors/DateSelector.java @@ -248,7 +248,6 @@ public class DateSelector extends BaseExtendSelector { /** * Enumerated attribute with the values for time comparison. - *

    */ public static class TimeComparisons extends TimeComparison { } 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 c701fb845..9c076faf0 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. + *

    *

    * 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. - * + *

    */ public class DifferentSelector extends MappingSelector { 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 1c0c000cf..725b31e1e 100644 --- a/src/main/org/apache/tools/ant/types/selectors/PresentSelector.java +++ b/src/main/org/apache/tools/ant/types/selectors/PresentSelector.java @@ -119,7 +119,7 @@ public class PresentSelector extends BaseSelector { * that already exist in the source directory, hence the lack of * a destonly option. * - * @param fp An attribute set to either srconlysrconly
    or * both. */ public void setPresent(final FilePresence fp) { 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 9ff91ad92..3157ee536 100644 --- a/src/main/org/apache/tools/ant/types/selectors/SizeSelector.java +++ b/src/main/org/apache/tools/ant/types/selectors/SizeSelector.java @@ -70,8 +70,8 @@ public class SizeSelector extends BaseExtendSelector { /** * Returns a String 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() { 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 a712759cf..cc87786d2 100644 --- a/src/main/org/apache/tools/ant/types/selectors/TokenizedPath.java +++ b/src/main/org/apache/tools/ant/types/selectors/TokenizedPath.java @@ -93,12 +93,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; } @@ -135,6 +137,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++) { @@ -160,6 +163,7 @@ public class TokenizedPath { /** * true if the original paths are equal. + * @return boolean */ @Override public boolean equals(Object o) { @@ -214,6 +218,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); 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 dbe7ec81c..2f1be2f84 100644 --- a/src/main/org/apache/tools/ant/types/selectors/TokenizedPattern.java +++ b/src/main/org/apache/tools/ant/types/selectors/TokenizedPattern.java @@ -73,6 +73,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) { @@ -93,6 +97,8 @@ public class TokenizedPattern { /** * true if the original patterns are equal. + * + * @param o Object */ public boolean equals(Object o) { return o instanceof TokenizedPattern @@ -105,6 +111,8 @@ public class TokenizedPattern { /** * The depth (or length) of a pattern. + * + * @return int */ public int depth() { return tokenizedPattern.length; @@ -112,6 +120,9 @@ public class TokenizedPattern { /** * Does the tokenized pattern contain the given string? + * + * @param pat String + * @return boolean */ public boolean containsPattern(String pat) { for (int i = 0; i < tokenizedPattern.length; i++) { @@ -125,6 +136,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() { @@ -150,6 +162,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 @@ -158,6 +173,8 @@ public class TokenizedPattern { /** * Returns a new pattern without the last token of this pattern. + * + * @return TokenizedPattern */ public TokenizedPattern withoutLastToken() { if (tokenizedPattern.length == 0) { 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 210d5dc97..d497f14c3 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 s. - * Supported s are: + * Use of this algorithm doesn't require any additional nested <param>s. + * Supported <param>s are: * + * * * * * - * - * - * - * + * + * + * + * * *
    Checksum algorithm parameters
    namevaluesdescriptionrequired
    algorithm.algorithm ADLER | CRC ( default ) name of the algorithm the checksum should use no, defaults to CRC algorithm.algorithmADLER | CRC (default)name of the algorithm the checksum should useno, defaults to CRC
    * 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 085b4fe75..a4b2ffd5d 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 s. - * Supported s are: + * Use of this algorithm doesn't require any additional nested <param>s. + * Supported <param>s are: * + * * * * * - * - * - * - * + * + * + * + * * * - * - * - * - * + * + * + * + * * *
    Digest algorithm parameters
    namevaluesdescriptionrequired
    algorithm.algorithm MD5 | SHA (default provider) name of the algorithm the provider should use no, defaults to MD5 algorithm.algorithmMD5 | SHA (default provider)name of the algorithm the provider should useno, defaults to MD5
    algorithm.provider name of the provider to use no, defaults to null algorithm.providername of the provider to useno, defaults to null
    * 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 8af9d12ed..ab8849d61 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 s and + * Use of this algorithm doesn't require any additional nested <param>s and * doesn't support any. * * @version 2003-09-13 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 9f5380984..c59be115f 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 @@ -51,16 +51,16 @@ import org.apache.tools.ant.util.ResourceUtils; * in a persistent manner.

    * *

    The ModifiedSelector is implemented as a CoreSelector and uses default - * values for all its attributes therefore the simplest example is

    + * values for all its attributes therefore the simplest example is

      *   <copy todir="dest">
      *       <filelist dir="src">
      *           <modified/>
      *       </filelist>
      *   </copy>
    - * 

    + *
    * *

    The same example rewritten as CoreSelector with setting the all values - * (same as defaults are) would be

    + * (same as defaults are) would be

      *   <copy todir="dest">
      *       <filelist dir="src">
      *           <modified update="true"
    @@ -72,9 +72,9 @@ import org.apache.tools.ant.util.ResourceUtils;
      *           </modified>
      *       </filelist>
      *   </copy>
    - * 

    + *
    * - *

    And the same rewritten as CustomSelector would be

    + * 

    And the same rewritten as CustomSelector would be

      *   <copy todir="dest">
      *       <filelist dir="src">
      *           <custom class="org.apache.tools.ant.type.selectors.ModifiedSelector">
    @@ -87,18 +87,18 @@ import org.apache.tools.ant.util.ResourceUtils;
      *           </custom>
      *       </filelist>
      *   </copy>
    - * 

    + *
    * *

    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.

    + * element, so that the selector can find the classes.

      *   <modified cacheclassname="com.mycompany.MyCache">
      *       <classpath>
      *           <pathelement location="lib/mycompany-antutil.jar"/>
      *       </classpath>
      *   </modified>
    - * 

    + *
    * *

    All these three examples copy the files from src to dest * using the ModifiedSelector. The ModifiedSelector uses the PropertyfileCache @@ -115,7 +115,7 @@ import org.apache.tools.ant.util.ResourceUtils; * *

    A useful scenario for this selector is inside a build environment * for homepage generation (e.g. with - * Apache Forrest).

    + * Apache Forrest).

      * <target name="generate-and-upload-site">
      *     <echo> generate the site using forrest </echo>
      *     <antcall target="site"/>
    @@ -127,7 +127,7 @@ import org.apache.tools.ant.util.ResourceUtils;
      *         </fileset>
      *     </ftp>
      * </target>
    - * 
    Here all changed files are uploaded to the server. The + *

    Here all changed files are uploaded to the server. The * ModifiedSelector saves therefore much upload time.

    * * @@ -178,7 +178,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; @@ -255,14 +255,14 @@ public class ModifiedSelector extends BaseExtendSelector /** * Configures this Selector. * Does this work only once per Selector object. - *

    Because some problems while configuring from Selector - * the configuration is done in the following order:

      - *
    1. collect the configuration data
    2. - *
    3. wait for the first isSelected() call
    4. - *
    5. set the default values
    6. - *
    7. set values for name pattern '*': update, cache, algorithm, comparator
    8. - *
    9. set values for name pattern '*.*: cache.cachefile, ...
    10. - *

    + *

    Because some problems while configuring from <custom>Selector + * the configuration is done in the following order:

      + *
    1. collect the configuration data
    2. + *
    3. wait for the first isSelected() call
    4. + *
    5. set the default values
    6. + *
    7. set values for name pattern '*': update, cache, algorithm, comparator
    8. + *
    9. set values for name pattern '*.*: cache.cachefile, ...
    10. + *
    *

    This configuration algorithm is needed because you don't know * the order of arriving config-data. E.g. if you first set the * cache.cachefilename and after that the cache itself, @@ -391,6 +391,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 desired type * @param classname the classname * @param msg the message-part for the BuildException * @param type the type to check against @@ -457,7 +458,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; @@ -690,7 +691,7 @@ public class ModifiedSelector extends BaseExtendSelector * Defined in org.apache.tools.ant.types.Parameterizable. * Overwrite implementation in superclass because only special * parameters are valid. - * @see #addParam(String,Object). + * @see #addParam(String,Object) * @param parameters the parameters to set. */ public void setParameters(Parameter[] parameters) { @@ -703,7 +704,7 @@ public class ModifiedSelector extends BaseExtendSelector /** - * Support for nested tags. + * Support for nested <param name="" value=""/> tags. * Parameter named cache, algorithm, * comparator or update are mapped to * the respective set-Method. 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 e8cf3fea4..c856d5654 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 @@ -33,22 +33,23 @@ import java.util.Vector; /** * Use java.util.Properties for storing the values. * The use of this Cache-implementation requires the use of the parameter - * for defining, where to store the + * <param name="cache.cachefile" .../> for defining, where to store the * properties file. * * The ModifiedSelector sets the cachefile to the default value * cache.properties. * - * Supported s are: + * Supported <param>s are: * + * * * * * - * - * - * - * + * + * + * + * * *
    Cache parameters
    namevaluesdescriptionrequired
    cache.cachefile path to file the name of the properties file yes cache.cachefilepath to filethe name of the properties fileyes
    * diff --git a/src/main/org/apache/tools/ant/util/ClasspathUtils.java b/src/main/org/apache/tools/ant/util/ClasspathUtils.java index 309860e99..8b24610df 100644 --- a/src/main/org/apache/tools/ant/util/ClasspathUtils.java +++ b/src/main/org/apache/tools/ant/util/ClasspathUtils.java @@ -214,9 +214,8 @@ public class ClasspathUtils { /** * Creates a fresh object instance of the specified classname. * - *

    This uses the userDefinedLoader to load the specified class, - * and then makes an instance using the default no-argument constructor. - *

    + *

    This uses the userDefinedLoader to load the specified class, + * and then makes an instance using the default no-argument constructor.

    * * @param className the full qualified class name to load. * @param userDefinedLoader the classloader to use. @@ -230,9 +229,8 @@ public class ClasspathUtils { /** * Creates a fresh object instance of the specified classname. * - *

    This uses the userDefinedLoader to load the specified class, - * and then makes an instance using the default no-argument constructor. - *

    + *

    This uses the userDefinedLoader to load the specified class, + * and then makes an instance using the default no-argument constructor.

    * * @param className the full qualified class name to load. * @param userDefinedLoader the classloader to use. @@ -270,7 +268,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 */ @@ -294,13 +292,13 @@ public class ClasspathUtils { * Classes and instantiate them often expose the following ant syntax * sugar:

    * - *
    • nested <classpath>
    • - *
    • attribute @classpathref
    • - *
    • attribute @classname
    + *
    • nested <classpath>
    • + *
    • attribute @classpathref
    • + *
    • attribute @classname
    * - *

    This class functions as a delegate handling the configuration + *

    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.

    + * suggests, is delegation rather than inheritance.

    * * @since Ant 1.6 */ diff --git a/src/main/org/apache/tools/ant/util/ConcatResourceInputStream.java b/src/main/org/apache/tools/ant/util/ConcatResourceInputStream.java index 7bae58e58..6c6874772 100644 --- a/src/main/org/apache/tools/ant/util/ConcatResourceInputStream.java +++ b/src/main/org/apache/tools/ant/util/ConcatResourceInputStream.java @@ -126,7 +126,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; diff --git a/src/main/org/apache/tools/ant/util/DOMElementWriter.java b/src/main/org/apache/tools/ant/util/DOMElementWriter.java index cafecf03f..1221cf2e2 100644 --- a/src/main/org/apache/tools/ant/util/DOMElementWriter.java +++ b/src/main/org/apache/tools/ant/util/DOMElementWriter.java @@ -414,7 +414,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. @@ -424,7 +424,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. @@ -514,6 +514,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.

    * @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(); diff --git a/src/main/org/apache/tools/ant/util/DateUtils.java b/src/main/org/apache/tools/ant/util/DateUtils.java index 016ce9d4e..af6fd87b6 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. *
      @@ -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 * * * @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.9.10 */ 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 " : " ") diff --git a/src/main/org/apache/tools/ant/util/FileUtils.java b/src/main/org/apache/tools/ant/util/FileUtils.java index b22f5176f..c36eae7ec 100644 --- a/src/main/org/apache/tools/ant/util/FileUtils.java +++ b/src/main/org/apache/tools/ant/util/FileUtils.java @@ -93,7 +93,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. */ @@ -1259,6 +1259,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 { @@ -1285,11 +1290,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 to may have been deleted * already when this happens. - * * @since Ant 1.6 */ public void rename(File from, File to) throws IOException { @@ -1346,18 +1349,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).
      - * It will return true only if 3 conditions are met : - *
      + * (Windows). + *

      + * It will return true only if 3 conditions are met: + *

      *
        *
      • operating system is case insensitive
      • *
      • file exists
      • *
      • actual name from directory reading is different from the * supplied argument
      • *
      - *
      - * the purpose is to identify files or directories on case-insensitive - * filesystems whose case is not what is expected.
      + *

      + * The purpose is to identify files or directories on case-insensitive + * filesystems whose case is not what is expected. + *

      * Possibly to rename them afterwards to the desired upper/lowercase * combination. * @@ -1559,6 +1564,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 */ @@ -1570,6 +1576,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 */ @@ -1678,7 +1686,7 @@ public class FileUtils { /** * Gets path from a List of Strings. * - * @param pathStack List of Strings to be concated as a path. + * @param pathStack List of Strings to be concatenated as a path. * @param separatorChar char to be used as separator between names in path * @return String, never null * diff --git a/src/main/org/apache/tools/ant/util/GlobPatternMapper.java b/src/main/org/apache/tools/ant/util/GlobPatternMapper.java index da2a0f16e..ebba54ea2 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() { diff --git a/src/main/org/apache/tools/ant/util/IdentityStack.java b/src/main/org/apache/tools/ant/util/IdentityStack.java index ac806d780..ba435b1a1 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 extends Stack { /** * Get an IdentityStack containing the contents of the specified Stack. + * @param desired type * @param s the Stack to copy; ignored if null. * @return an IdentityStack instance. */ diff --git a/src/main/org/apache/tools/ant/util/JavaEnvUtils.java b/src/main/org/apache/tools/ant/util/JavaEnvUtils.java index 359174a75..2fc36b210 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,22 +566,21 @@ 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); BufferedWriter out = null; try { 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(); } } finally { diff --git a/src/main/org/apache/tools/ant/util/KeepAliveInputStream.java b/src/main/org/apache/tools/ant/util/KeepAliveInputStream.java index debde59ab..58332b5c5 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() { diff --git a/src/main/org/apache/tools/ant/util/KeepAliveOutputStream.java b/src/main/org/apache/tools/ant/util/KeepAliveOutputStream.java index 27f3d7e42..352b0bacb 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) { diff --git a/src/main/org/apache/tools/ant/util/LayoutPreservingProperties.java b/src/main/org/apache/tools/ant/util/LayoutPreservingProperties.java index eceb9a0b2..116a4314a 100644 --- a/src/main/org/apache/tools/ant/util/LayoutPreservingProperties.java +++ b/src/main/org/apache/tools/ant/util/LayoutPreservingProperties.java @@ -248,6 +248,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 FileOutputStream fos = new FileOutputStream(dest); @@ -271,7 +272,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 java.util.Properties. * @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 @@ -574,7 +575,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 pos. * @param pos the line number to which the comments lead */ @@ -655,7 +656,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 { diff --git a/src/main/org/apache/tools/ant/util/MergingMapper.java b/src/main/org/apache/tools/ant/util/MergingMapper.java index 7f158dbff..f148e8b3e 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) { diff --git a/src/main/org/apache/tools/ant/util/ProcessUtil.java b/src/main/org/apache/tools/ant/util/ProcessUtil.java index f6e71b12e..998c7130b 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) { diff --git a/src/main/org/apache/tools/ant/util/ReflectUtil.java b/src/main/org/apache/tools/ant/util/ReflectUtil.java index ed8b47a95..b10ef396e 100644 --- a/src/main/org/apache/tools/ant/util/ReflectUtil.java +++ b/src/main/org/apache/tools/ant/util/ReflectUtil.java @@ -40,6 +40,11 @@ public class ReflectUtil { /** * Create an instance of a class using the constructor matching * the given arguments. + * @param desired type + * @param ofClass Class<T> + * @param argTypes Class<?>[] + * @param args Object[] + * @return class instance * @since Ant 1.8.0 */ public static T newInstance(Class ofClass, diff --git a/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java b/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java index b8aa01a81..5e2857ee1 100644 --- a/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java +++ b/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java @@ -205,7 +205,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 */ private void readSource(Reader reader, String name) { diff --git a/src/main/org/apache/tools/ant/util/ScriptRunnerCreator.java b/src/main/org/apache/tools/ant/util/ScriptRunnerCreator.java index 6ce3c7e07..bf3c2c9e5 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. diff --git a/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java b/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java index 9e814d966..e25811db9 100644 --- a/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java +++ b/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java @@ -99,7 +99,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. */ diff --git a/src/main/org/apache/tools/ant/util/SplitClassLoader.java b/src/main/org/apache/tools/ant/util/SplitClassLoader.java index f48d3d3e8..9d657dae6 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, diff --git a/src/main/org/apache/tools/ant/util/SymbolicLinkUtils.java b/src/main/org/apache/tools/ant/util/SymbolicLinkUtils.java index 62b7a3f97..20975dde7 100644 --- a/src/main/org/apache/tools/ant/util/SymbolicLinkUtils.java +++ b/src/main/org/apache/tools/ant/util/SymbolicLinkUtils.java @@ -121,7 +121,7 @@ public class SymbolicLinkUtils { * *

      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.

      + * different from the absolute one if the link is broken.

      * * @param name the name of the file to test. * @@ -142,7 +142,7 @@ public class SymbolicLinkUtils { * *

      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.

      + * different from the absolute one if the link is broken.

      * * @param file the file to test. * @@ -163,7 +163,7 @@ public class SymbolicLinkUtils { * *

      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.

      + * different from the absolute one if the link is broken.

      * * @param parent the parent directory of the file to test * @param name the name of the file to test. diff --git a/src/main/org/apache/tools/ant/util/TimeoutObserver.java b/src/main/org/apache/tools/ant/util/TimeoutObserver.java index ba2e0c76d..c142d3cd1 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. */ diff --git a/src/main/org/apache/tools/ant/util/UUEncoder.java b/src/main/org/apache/tools/ant/util/UUEncoder.java index c42dcaba1..b0c6737f2 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) diff --git a/src/main/org/apache/tools/ant/util/UnicodeUtil.java b/src/main/org/apache/tools/ant/util/UnicodeUtil.java index d3e5eec38..86199d411 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) { diff --git a/src/main/org/apache/tools/ant/util/WeakishReference.java b/src/main/org/apache/tools/ant/util/WeakishReference.java index 92f322fb2..9568a28a2 100644 --- a/src/main/org/apache/tools/ant/util/WeakishReference.java +++ b/src/main/org/apache/tools/ant/util/WeakishReference.java @@ -43,7 +43,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) { diff --git a/src/main/org/apache/tools/ant/util/WorkerAnt.java b/src/main/org/apache/tools/ant/util/WorkerAnt.java index 768f38744..b22be501f 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. *

      * This class is effectively a superset of - * {@link org.apache.tools.ant.taskdefs.Parallel.TaskRunnable} + * org.apache.tools.ant.taskdefs.Parallel.TaskRunnable * * @since Ant 1.8 */ 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 a312ff4b5..b5ef999e4 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 */ 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 529a78ae6..32cebeb5a 100644 --- a/src/main/org/apache/tools/ant/util/regexp/JakartaOroRegexp.java +++ b/src/main/org/apache/tools/ant/util/regexp/JakartaOroRegexp.java @@ -84,7 +84,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) { final boolean replaceAll = RegexpUtil.hasFlag(options, REPLACE_ALL); 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 865f424a1..cdb6de969 100644 --- a/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java +++ b/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java @@ -38,7 +38,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; 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 3ca807065..de0054fd0 100644 --- a/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java +++ b/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java @@ -38,7 +38,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; 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 a0a8a155c..4f2082d81 100644 --- a/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java +++ b/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java @@ -104,7 +104,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) { 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 ebd85fabb..18fb95ae5 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 *

      - *
    • g - Regexp.REPLACE_ALL
    • - *
    • i - RegexpMatcher.MATCH_CASE_INSENSITIVE
    • - *
    • m - RegexpMatcher.MATCH_MULTILINE
    • - *
    • s - RegexpMatcher.MATCH_SINGLELINE
    • + *
      g
      Regexp.REPLACE_ALL
      + *
      i
      RegexpMatcher.MATCH_CASE_INSENSITIVE
      + *
      m
      RegexpMatcher.MATCH_MULTILINE
      + *
      s
      RegexpMatcher.MATCH_SINGLELINE
      *
      * @param flags the string containing the flags * @return the Regexp option bits diff --git a/src/main/org/apache/tools/bzip2/BlockSort.java b/src/main/org/apache/tools/bzip2/BlockSort.java index 46c6a5ce2..0a50fdf76 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]; diff --git a/src/main/org/apache/tools/bzip2/CBZip2InputStream.java b/src/main/org/apache/tools/bzip2/CBZip2InputStream.java index 73b6aa19a..7563a40e0 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. * *

      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.

      * + * @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"); } diff --git a/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java b/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java index 01e23424d..dd118ea43 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; * CBZip2OutputStream to release the allocated memory. *

      * - *

      You can shrink the amount of allocated memory and maybe raise + *

      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.

      + * than the size of the input.

      * - *

      You can compute the memory usage for compressing by the - * following formula:

      + *

      You can compute the memory usage for compressing by the + * following formula:

      * *
        * <code>400k + (9 * blocksize)</code>.
        * 
      * - *

      To get the memory required for decompression by {@link - * CBZip2InputStream CBZip2InputStream} use

      + *

      To get the memory required for decompression by {@link + * CBZip2InputStream CBZip2InputStream} use

      * *
        * <code>65k + (5 * blocksize)</code>.
        * 
      * - * - * - * + *
      + * * - * - * - * - * + * + * + * * * * @@ -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. - *

      If you are ever unlucky/improbable enough to get a stack + *

      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.

      + * elems, so the following limit seems very generous.

      */ 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 + * CBZip2OutputStream. * @return The blocksize, between {@link #MIN_BLOCKSIZE} and * {@link #MAX_BLOCKSIZE} both inclusive. For a negative * inputLength this method returns MAX_BLOCKSIZE * always. - * - * @param inputLength - * The length of the data which will be compressed by - * CBZip2OutputStream. */ 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; diff --git a/src/main/org/apache/tools/mail/MailMessage.java b/src/main/org/apache/tools/mail/MailMessage.java index b4173a96b..72875018d 100644 --- a/src/main/org/apache/tools/mail/MailMessage.java +++ b/src/main/org/apache/tools/mail/MailMessage.java @@ -44,14 +44,15 @@ import java.util.Vector; * easier to install, and has an Open Source license. *

      * It can be used like this: - *

      + * 

      + *
        * String mailhost = "localhost";  // or another mail host
        * String from = "Mail Message Servlet <MailMessage@server.com>";
        * String to = "to@you.com";
        * String cc1 = "cc1@you.com";
        * String cc2 = "cc2@you.com";
        * String bcc = "bcc@you.com";
      - *  
      + *
        * MailMessage msg = new MailMessage(mailhost);
        * msg.setPort(25);
        * msg.from(from);
      @@ -61,16 +62,16 @@ import java.util.Vector;
        * msg.bcc(bcc);
        * msg.setSubject("Test subject");
        * PrintStream out = msg.getPrintStream();
      - *  
      + *
        * Enumeration enum = req.getParameterNames();
        * while (enum.hasMoreElements()) {
        *   String name = (String)enum.nextElement();
        *   String value = req.getParameter(name);
        *   out.println(name + " = " + value);
        * }
      - *  
      + *
        * msg.sendAndClose();
      - * 
      + * *

      * Be sure to set the from address, then set the recipient * addresses, then set the subject and other headers, then get the @@ -78,14 +79,17 @@ import java.util.Vector; * The class does minimal error checking internally; it counts on the mail * host to complain if there's any malformatted input or out of order * execution. + *

      *

      * An attachment mechanism based on RFC 1521 could be implemented on top of * this class. In the meanwhile, JavaMail is the best solution for sending * email with attachments. + *

      *

      * Still to do: + *

      *
        - *
      • Figure out how to close the connection in case of error + *
      • Figure out how to close the connection in case of error
      • *
      * * @version 1.1, 2000/03/19, added angle brackets to address, helps some servers diff --git a/src/main/org/apache/tools/mail/SmtpResponseReader.java b/src/main/org/apache/tools/mail/SmtpResponseReader.java index c1693f49e..8178a8657 100644 --- a/src/main/org/apache/tools/mail/SmtpResponseReader.java +++ b/src/main/org/apache/tools/mail/SmtpResponseReader.java @@ -48,7 +48,7 @@ public class SmtpResponseReader { /** * Read until the server indicates that the response is complete. * - * @return Responsecode (3 digits) + Blank + Text from all + * @return Response code (3 digits) + Blank + Text from all * response line concatenated (with blanks replacing the \r\n * sequences). * @throws IOException on error. @@ -93,7 +93,7 @@ public class SmtpResponseReader { } /** - * Append the text from this line of the resonse. + * Append the text from this line of the response. */ private void append(String line) { // CheckStyle:MagicNumber OFF diff --git a/src/main/org/apache/tools/tar/TarEntry.java b/src/main/org/apache/tools/tar/TarEntry.java index 86024ea8a..fad702f07 100644 --- a/src/main/org/apache/tools/tar/TarEntry.java +++ b/src/main/org/apache/tools/tar/TarEntry.java @@ -38,17 +38,19 @@ import org.apache.tools.zip.ZipEncoding; * they are to be used. *

      * TarEntries that are created from the header bytes read from - * an archive are instantiated with the TarEntry( byte[] ) + * an archive are instantiated with the TarEntry(byte[]) * constructor. These entries will be used when extracting from * or listing the contents of an archive. These entries have their * header filled in using the header bytes. They also set the File * to null, since they reference an archive entry not a file. + *

      *

      * TarEntries that are created from Files that are to be written - * into an archive are instantiated with the TarEntry( File ) + * into an archive are instantiated with the TarEntry(File) * constructor. These entries have their header filled in using * the File's information. They also keep a reference to the File * for convenience when writing entries. + *

      *

      * Finally, TarEntries can be constructed from nothing but a name. * This allows the programmer to construct the entry by hand, for @@ -56,8 +58,7 @@ import org.apache.tools.zip.ZipEncoding; * the archive, and the header information is constructed from * other information. In this case the header fields are set to * defaults and the File is set to null. - * - *

      + *

      * The C structure for a Tar Entry's header is: *
        * struct header {
      @@ -84,8 +85,6 @@ import org.apache.tools.zip.ZipEncoding;
        * field is the binary representation of the number.
        * See TarUtils.parseOctalOrBinary.
        * 
      - * - *

      * The C structure for a old GNU Tar Entry's header is: *

        * struct oldgnu_header {
      @@ -108,7 +107,6 @@ import org.apache.tools.zip.ZipEncoding;
        * char numbytes[12]; // offset 12
        * };
        * 
      - * */ public class TarEntry implements TarConstants { @@ -1023,7 +1021,7 @@ public class TarEntry implements TarConstants { /** * Strips Windows' drive letter as well as any leading slashes, - * turns path separators into forward slahes. + * turns path separators into forward slashes. */ private static String normalizeFileName(String fileName, boolean preserveLeadingSlashes) { @@ -1083,10 +1081,10 @@ public class TarEntry implements TarConstants { /** * Check if buffer contents matches Ascii String. * - * @param expected - * @param buffer - * @param offset - * @param length + * @param expected String + * @param buffer byte[] + * @param offset int + * @param length int * @return {@code true} if buffer is the same as the expected string */ private static boolean matchAsciiBuffer(String expected, byte[] buffer, @@ -1105,13 +1103,13 @@ public class TarEntry implements TarConstants { /** * Compare byte buffers, optionally ignoring trailing nulls * - * @param buffer1 - * @param offset1 - * @param length1 - * @param buffer2 - * @param offset2 - * @param length2 - * @param ignoreTrailingNulls + * @param buffer1 byte[] + * @param offset1 int + * @param length1 int + * @param buffer2 byte[] + * @param offset2 int + * @param length2 int + * @param ignoreTrailingNulls boolean * @return {@code true} if buffer1 and buffer2 have same contents, having regard to trailing nulls */ private static boolean isEqual( diff --git a/src/main/org/apache/tools/tar/TarInputStream.java b/src/main/org/apache/tools/tar/TarInputStream.java index 82c0a0d45..bacc20047 100644 --- a/src/main/org/apache/tools/tar/TarInputStream.java +++ b/src/main/org/apache/tools/tar/TarInputStream.java @@ -62,7 +62,7 @@ public class TarInputStream extends FilterInputStream { /** * This contents of this array is not used at all in this class, - * it is only here to avoid repreated object creation during calls + * it is only here to avoid repeated object creation during calls * to the no-arg read method. */ protected byte[] oneBuf; @@ -541,7 +541,7 @@ public class TarInputStream extends FilterInputStream { /** * Reads a byte from the current tar archive entry. * - * This method simply calls read( byte[], int, int ). + * This method simply calls read(byte[], int, int). * * @return The byte read, or -1 at EOF. * @throws IOException on error @@ -658,6 +658,9 @@ public class TarInputStream extends FilterInputStream { * Whether this class is able to read the given entry. * *

      May return false if the current entry is a sparse file.

      + * + * @param te TarEntry + * @return boolean */ public boolean canReadEntryData(TarEntry te) { return !te.isGNUSparse(); diff --git a/src/main/org/apache/tools/tar/TarOutputStream.java b/src/main/org/apache/tools/tar/TarOutputStream.java index cacc68631..f2f094367 100644 --- a/src/main/org/apache/tools/tar/TarOutputStream.java +++ b/src/main/org/apache/tools/tar/TarOutputStream.java @@ -94,6 +94,7 @@ public class TarOutputStream extends FilterOutputStream { /** * Constructor for TarInputStream. + * * @param os the output stream to use */ public TarOutputStream(OutputStream os) { @@ -102,6 +103,7 @@ public class TarOutputStream extends FilterOutputStream { /** * Constructor for TarInputStream. + * * @param os the output stream to use * @param encoding name of the encoding to use for file names */ @@ -111,6 +113,7 @@ public class TarOutputStream extends FilterOutputStream { /** * Constructor for TarInputStream. + * * @param os the output stream to use * @param blockSize the block size to use */ @@ -120,6 +123,7 @@ public class TarOutputStream extends FilterOutputStream { /** * Constructor for TarInputStream. + * * @param os the output stream to use * @param blockSize the block size to use * @param encoding name of the encoding to use for file names @@ -130,6 +134,7 @@ public class TarOutputStream extends FilterOutputStream { /** * Constructor for TarInputStream. + * * @param os the output stream to use * @param blockSize the block size to use * @param recordSize the record size to use @@ -140,6 +145,7 @@ public class TarOutputStream extends FilterOutputStream { /** * Constructor for TarInputStream. + * * @param os the output stream to use * @param blockSize the block size to use * @param recordSize the record size to use @@ -163,6 +169,7 @@ public class TarOutputStream extends FilterOutputStream { * This can be LONGFILE_ERROR(0), LONGFILE_TRUNCATE(1) or LONGFILE_GNU(2). * This specifies the treatment of long file names (names >= TarConstants.NAMELEN). * Default is LONGFILE_ERROR. + * * @param longFileMode the mode to use */ public void setLongFileMode(int longFileMode) { @@ -174,6 +181,7 @@ public class TarOutputStream extends FilterOutputStream { * This can be BIGNUMBER_ERROR(0), BIGNUMBER_POSIX(1) or BIGNUMBER_STAR(2). * This specifies the treatment of big files (sizes > TarConstants.MAXSIZE) and other numeric values to big to fit into a traditional tar header. * Default is BIGNUMBER_ERROR. + * * @param bigNumberMode the mode to use */ public void setBigNumberMode(int bigNumberMode) { @@ -182,6 +190,8 @@ public class TarOutputStream extends FilterOutputStream { /** * Whether to add a PAX extension header for non-ASCII file names. + * + * @param b boolean */ public void setAddPaxHeadersForNonAsciiNames(boolean b) { addPaxHeadersForNonAsciiNames = b; @@ -358,7 +368,7 @@ public class TarOutputStream extends FilterOutputStream { /** * Writes a byte to the current tar archive entry. * - * This method simply calls read( byte[], int, int ). + * This method simply calls read(byte[], int, int). * * @param b The byte written. * @throws IOException on error @@ -373,7 +383,7 @@ public class TarOutputStream extends FilterOutputStream { /** * Writes bytes to the current tar archive entry. * - * This method simply calls write( byte[], int, int ). + * This method simply calls write(byte[], int, int). * * @param wBuf The buffer to write to the archive. * @throws IOException on error diff --git a/src/main/org/apache/tools/tar/TarUtils.java b/src/main/org/apache/tools/tar/TarUtils.java index 5fa2e01f0..70e6a44d4 100644 --- a/src/main/org/apache/tools/tar/TarUtils.java +++ b/src/main/org/apache/tools/tar/TarUtils.java @@ -280,6 +280,7 @@ public class TarUtils { * @param length The maximum number of bytes to parse. * @param encoding name of the encoding to use for file names * @return The entry name. + * @throws IOException if decode fails */ public static String parseName(final byte[] buffer, final int offset, final int length, @@ -344,6 +345,7 @@ public class TarUtils { * @param length The maximum number of header bytes to copy. * @param encoding name of the encoding to use for file names * @return The updated offset, i.e. offset + length + * @throws IOException if encode fails */ public static int formatNameBytes(final String name, final byte[] buf, final int offset, final int length, diff --git a/src/main/org/apache/tools/zip/AbstractUnicodeExtraField.java b/src/main/org/apache/tools/zip/AbstractUnicodeExtraField.java index ab56f46e7..0f236d455 100644 --- a/src/main/org/apache/tools/zip/AbstractUnicodeExtraField.java +++ b/src/main/org/apache/tools/zip/AbstractUnicodeExtraField.java @@ -42,7 +42,7 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField { * file. * @param off The offset of the encoded filename or comment in * bytes. - * @param len The length of the encoded filename or commentin + * @param len The length of the encoded filename or comment in * bytes. */ protected AbstractUnicodeExtraField(final String text, final byte[] bytes, final int off, diff --git a/src/main/org/apache/tools/zip/AsiExtraField.java b/src/main/org/apache/tools/zip/AsiExtraField.java index fb8227d84..0108ee236 100644 --- a/src/main/org/apache/tools/zip/AsiExtraField.java +++ b/src/main/org/apache/tools/zip/AsiExtraField.java @@ -25,7 +25,7 @@ import java.util.zip.ZipException; * Adds Unix file permission and UID/GID fields as well as symbolic * link handling. * - *

      This class uses the ASi extra field in the format: + *

      This class uses the ASi extra field in the format:

      *
        *         Value         Size            Description
        *         -----         ----            -----------
      @@ -39,7 +39,7 @@ import java.util.zip.ZipException;
        *         (var.)        variable        symbolic link filename
        * 
      * taken from appnote.iz (Info-ZIP note, 981119) found at ftp://ftp.uu.net/pub/archiving/zip/doc/

      + * href="ftp://ftp.uu.net/pub/archiving/zip/doc/">ftp://ftp.uu.net/pub/archiving/zip/doc/ * *

      Short is two bytes and Long is four bytes in big endian byte and diff --git a/src/main/org/apache/tools/zip/ExtraFieldUtils.java b/src/main/org/apache/tools/zip/ExtraFieldUtils.java index 8a7355e06..d7a6c9d41 100644 --- a/src/main/org/apache/tools/zip/ExtraFieldUtils.java +++ b/src/main/org/apache/tools/zip/ExtraFieldUtils.java @@ -308,6 +308,8 @@ public class ExtraFieldUtils { /** * Key of the action to take. + * + * @return int */ public int getKey() { return key; } } diff --git a/src/main/org/apache/tools/zip/FallbackZipEncoding.java b/src/main/org/apache/tools/zip/FallbackZipEncoding.java index 3edbb8e15..96cff33af 100644 --- a/src/main/org/apache/tools/zip/FallbackZipEncoding.java +++ b/src/main/org/apache/tools/zip/FallbackZipEncoding.java @@ -34,7 +34,7 @@ import java.nio.ByteBuffer; * given name can be safely encoded or not.

      * *

      This implementation acts as a last resort implementation, when - * neither {@link Simple8BitZipEnoding} nor {@link NioZipEncoding} is + * neither {@link Simple8BitZipEncoding} nor {@link NioZipEncoding} is * available.

      * *

      The methods of this class are reentrant.

      @@ -61,16 +61,14 @@ class FallbackZipEncoding implements ZipEncoding { } /** - * @see - * org.apache.tools.zip.ZipEncoding#canEncode(java.lang.String) + * @see org.apache.tools.zip.ZipEncoding#canEncode(java.lang.String) */ public boolean canEncode(final String name) { return true; } /** - * @see - * org.apache.tools.zip.ZipEncoding#encode(java.lang.String) + * @see org.apache.tools.zip.ZipEncoding#encode(java.lang.String) */ public ByteBuffer encode(final String name) throws IOException { if (this.charset == null) { // i.e. use default charset, see no-args constructor @@ -81,8 +79,7 @@ class FallbackZipEncoding implements ZipEncoding { } /** - * @see - * org.apache.tools.zip.ZipEncoding#decode(byte[]) + * @see org.apache.tools.zip.ZipEncoding#decode(byte[]) */ public String decode(final byte[] data) throws IOException { if (this.charset == null) { // i.e. use default charset, see no-args constructor diff --git a/src/main/org/apache/tools/zip/GeneralPurposeBit.java b/src/main/org/apache/tools/zip/GeneralPurposeBit.java index a1af211bd..3246fbee1 100644 --- a/src/main/org/apache/tools/zip/GeneralPurposeBit.java +++ b/src/main/org/apache/tools/zip/GeneralPurposeBit.java @@ -59,6 +59,8 @@ public final class GeneralPurposeBit implements Cloneable { /** * whether the current entry uses UTF8 for file name and comment. + * + * @return boolean */ public boolean usesUTF8ForNames() { return languageEncodingFlag; @@ -66,6 +68,8 @@ public final class GeneralPurposeBit implements Cloneable { /** * whether the current entry will use UTF8 for file name and comment. + * + * @param b boolean */ public void useUTF8ForNames(boolean b) { languageEncodingFlag = b; @@ -74,6 +78,8 @@ public final class GeneralPurposeBit implements Cloneable { /** * whether the current entry uses the data descriptor to store CRC * and size information + * + * @return boolean */ public boolean usesDataDescriptor() { return dataDescriptorFlag; @@ -82,6 +88,8 @@ public final class GeneralPurposeBit implements Cloneable { /** * whether the current entry will use the data descriptor to store * CRC and size information + * + * @param b boolean */ public void useDataDescriptor(boolean b) { dataDescriptorFlag = b; @@ -89,6 +97,8 @@ public final class GeneralPurposeBit implements Cloneable { /** * whether the current entry is encrypted + * + * @return boolean */ public boolean usesEncryption() { return encryptionFlag; @@ -96,6 +106,8 @@ public final class GeneralPurposeBit implements Cloneable { /** * whether the current entry will be encrypted + * + * @param b boolean */ public void useEncryption(boolean b) { encryptionFlag = b; @@ -103,6 +115,8 @@ public final class GeneralPurposeBit implements Cloneable { /** * whether the current entry is encrypted using strong encryption + * + * @return boolean */ public boolean usesStrongEncryption() { return encryptionFlag && strongEncryptionFlag; @@ -110,6 +124,8 @@ public final class GeneralPurposeBit implements Cloneable { /** * whether the current entry will be encrypted using strong encryption + * + * @param b boolean */ public void useStrongEncryption(boolean b) { strongEncryptionFlag = b; @@ -120,6 +136,8 @@ public final class GeneralPurposeBit implements Cloneable { /** * Encodes the set bits in a form suitable for ZIP archives. + * + * @return byte[] */ public byte[] encode() { byte[] result = new byte[2]; @@ -131,7 +149,7 @@ public final class GeneralPurposeBit implements Cloneable { * Encodes the set bits in a form suitable for ZIP archives. * * @param buf the output buffer - * @param offset + * @param offset * The offset within the output buffer of the first byte to be written. * must be non-negative and no larger than buf.length-2 */ @@ -148,8 +166,10 @@ public final class GeneralPurposeBit implements Cloneable { /** * Parses the supported flags from the given archive data. + * * @param data local file header or a central directory entry. * @param offset offset at which the general purpose bit starts + * @return GeneralPurposeBit */ public static GeneralPurposeBit parse(final byte[] data, final int offset) { final int generalPurposeFlag = ZipShort.getValue(data, offset); diff --git a/src/main/org/apache/tools/zip/NioZipEncoding.java b/src/main/org/apache/tools/zip/NioZipEncoding.java index 63d33ff54..462b51928 100644 --- a/src/main/org/apache/tools/zip/NioZipEncoding.java +++ b/src/main/org/apache/tools/zip/NioZipEncoding.java @@ -51,8 +51,7 @@ class NioZipEncoding implements ZipEncoding { } /** - * @see - * org.apache.tools.zip.ZipEncoding#canEncode(java.lang.String) + * @see org.apache.tools.zip.ZipEncoding#canEncode(java.lang.String) */ public boolean canEncode(final String name) { final CharsetEncoder enc = this.charset.newEncoder(); @@ -63,8 +62,7 @@ class NioZipEncoding implements ZipEncoding { } /** - * @see - * org.apache.tools.zip.ZipEncoding#encode(java.lang.String) + * @see org.apache.tools.zip.ZipEncoding#encode(java.lang.String) */ public ByteBuffer encode(final String name) { final CharsetEncoder enc = this.charset.newEncoder(); @@ -110,8 +108,7 @@ class NioZipEncoding implements ZipEncoding { } /** - * @see - * org.apache.tools.zip.ZipEncoding#decode(byte[]) + * @see org.apache.tools.zip.ZipEncoding#decode(byte[]) */ public String decode(final byte[] data) throws IOException { return this.charset.newDecoder() diff --git a/src/main/org/apache/tools/zip/Simple8BitZipEncoding.java b/src/main/org/apache/tools/zip/Simple8BitZipEncoding.java index 57a838ca9..cd400704c 100644 --- a/src/main/org/apache/tools/zip/Simple8BitZipEncoding.java +++ b/src/main/org/apache/tools/zip/Simple8BitZipEncoding.java @@ -212,8 +212,7 @@ class Simple8BitZipEncoding implements ZipEncoding { } /** - * @see - * org.apache.tools.zip.ZipEncoding#canEncode(java.lang.String) + * @see org.apache.tools.zip.ZipEncoding#canEncode(java.lang.String) */ public boolean canEncode(final String name) { @@ -230,8 +229,7 @@ class Simple8BitZipEncoding implements ZipEncoding { } /** - * @see - * org.apache.tools.zip.ZipEncoding#encode(java.lang.String) + * @see org.apache.tools.zip.ZipEncoding#encode(java.lang.String) */ public ByteBuffer encode(final String name) { ByteBuffer out = ByteBuffer.allocate(name.length() @@ -257,8 +255,7 @@ class Simple8BitZipEncoding implements ZipEncoding { } /** - * @see - * org.apache.tools.zip.ZipEncoding#decode(byte[]) + * @see org.apache.tools.zip.ZipEncoding#decode(byte[]) */ public String decode(final byte[] data) throws IOException { final char [] ret = new char[data.length]; diff --git a/src/main/org/apache/tools/zip/UnicodeCommentExtraField.java b/src/main/org/apache/tools/zip/UnicodeCommentExtraField.java index 51550fe7c..ccc51fae4 100644 --- a/src/main/org/apache/tools/zip/UnicodeCommentExtraField.java +++ b/src/main/org/apache/tools/zip/UnicodeCommentExtraField.java @@ -24,9 +24,8 @@ package org.apache.tools.zip; *

      Stores the UTF-8 version of the file comment as stored in the * central directory header.

      * - *

      See {@link - * "http://www.pkware.com/documents/casestudies/APPNOTE.TXT PKWARE's - * APPNOTE.TXT, section 4.6.8"}.

      + *

      See PKWARE's + * APPNOTE.TXT, section 4.6.8.

      * */ public class UnicodeCommentExtraField extends AbstractUnicodeExtraField { diff --git a/src/main/org/apache/tools/zip/UnicodePathExtraField.java b/src/main/org/apache/tools/zip/UnicodePathExtraField.java index 8b045a1e4..7638edd8e 100644 --- a/src/main/org/apache/tools/zip/UnicodePathExtraField.java +++ b/src/main/org/apache/tools/zip/UnicodePathExtraField.java @@ -24,15 +24,14 @@ package org.apache.tools.zip; *

      Stores the UTF-8 version of the file name field as stored in the * local header and central directory header.

      * - *

      See {@link - * "http://www.pkware.com/documents/casestudies/APPNOTE.TXT PKWARE's - * APPNOTE.TXT, section 4.6.9"}.

      + *

      See PKWARE's + * APPNOTE.TXT, section 4.6.9.

      */ public class UnicodePathExtraField extends AbstractUnicodeExtraField { public static final ZipShort UPATH_ID = new ZipShort(0x7075); - public UnicodePathExtraField () { + public UnicodePathExtraField() { } /** diff --git a/src/main/org/apache/tools/zip/UnparseableExtraFieldData.java b/src/main/org/apache/tools/zip/UnparseableExtraFieldData.java index 92d30020e..5c1a8d0b9 100644 --- a/src/main/org/apache/tools/zip/UnparseableExtraFieldData.java +++ b/src/main/org/apache/tools/zip/UnparseableExtraFieldData.java @@ -22,8 +22,8 @@ package org.apache.tools.zip; * Wrapper for extra field data that doesn't conform to the recommended format of header-tag + size + data. * *

      The header-id is artificial (and not listed as a known ID in - * {@link - * APPNOTE.TXT}). Since it isn't used anywhere except to satisfy the + * APPNOTE.TXT). + * Since it isn't used anywhere except to satisfy the * ZipExtraField contract it shouldn't matter anyway.

      * * @since Ant 1.8.1 diff --git a/src/main/org/apache/tools/zip/UnsupportedZipFeatureException.java b/src/main/org/apache/tools/zip/UnsupportedZipFeatureException.java index 291d494d7..52df40d39 100644 --- a/src/main/org/apache/tools/zip/UnsupportedZipFeatureException.java +++ b/src/main/org/apache/tools/zip/UnsupportedZipFeatureException.java @@ -46,6 +46,8 @@ public class UnsupportedZipFeatureException extends ZipException { /** * The unsupported feature that has been used. + * + * @return Feature */ public Feature getFeature() { return reason; @@ -53,6 +55,8 @@ public class UnsupportedZipFeatureException extends ZipException { /** * The entry using the unsupported feature. + * + * @return ZipEntry */ public ZipEntry getEntry() { return entry; diff --git a/src/main/org/apache/tools/zip/Zip64ExtendedInformationExtraField.java b/src/main/org/apache/tools/zip/Zip64ExtendedInformationExtraField.java index 16502ac6d..2cc0a533f 100644 --- a/src/main/org/apache/tools/zip/Zip64ExtendedInformationExtraField.java +++ b/src/main/org/apache/tools/zip/Zip64ExtendedInformationExtraField.java @@ -27,9 +27,8 @@ import java.util.zip.ZipException; * Holds size and other extended information for entries that use Zip64 * features. * - *

      See {@link - * "http://www.pkware.com/documents/casestudies/APPNOTE.TXT PKWARE's - * APPNOTE.TXT, section 4.5.3"}.

      + *

      See PKWARE's + * APPNOTE.TXT, section 4.5.3.

      * *

      Currently Ant doesn't support encrypting the * central directory so the note about masking doesn't apply.

      @@ -86,7 +85,8 @@ public class Zip64ExtendedInformationExtraField * * @param size the entry's original size * @param compressedSize the entry's compressed size - * + * @param relativeHeaderOffset ZipEightByteInteger + * @param diskStart ZipLong * @throws IllegalArgumentException if size or compressedSize is null */ public Zip64ExtendedInformationExtraField(ZipEightByteInteger size, @@ -210,6 +210,12 @@ public class Zip64ExtendedInformationExtraField * field are optional and must only be present if their corresponding * entry inside the central directory contains the correct magic * value.

      + * + * @param hasUncompressedSize boolean + * @param hasCompressedSize boolean + * @param hasRelativeHeaderOffset boolean + * @param hasDiskStart boolean + * @throws ZipException if expected length of central directory data is incorrect */ public void reparseCentralDirectoryData(boolean hasUncompressedSize, boolean hasCompressedSize, @@ -253,6 +259,8 @@ public class Zip64ExtendedInformationExtraField /** * The uncompressed size stored in this extra field. + * + * @return ZipEightByteInteger */ public ZipEightByteInteger getSize() { return size; @@ -260,6 +268,8 @@ public class Zip64ExtendedInformationExtraField /** * The uncompressed size stored in this extra field. + * + * @param size ZipEightByteInteger */ public void setSize(ZipEightByteInteger size) { this.size = size; @@ -267,6 +277,8 @@ public class Zip64ExtendedInformationExtraField /** * The compressed size stored in this extra field. + * + * @return ZipEightByteInteger */ public ZipEightByteInteger getCompressedSize() { return compressedSize; @@ -274,6 +286,8 @@ public class Zip64ExtendedInformationExtraField /** * The uncompressed size stored in this extra field. + * + * @param compressedSize ZipEightByteInteger */ public void setCompressedSize(ZipEightByteInteger compressedSize) { this.compressedSize = compressedSize; @@ -281,6 +295,8 @@ public class Zip64ExtendedInformationExtraField /** * The relative header offset stored in this extra field. + * + * @return ZipEightByteInteger */ public ZipEightByteInteger getRelativeHeaderOffset() { return relativeHeaderOffset; @@ -288,6 +304,8 @@ public class Zip64ExtendedInformationExtraField /** * The relative header offset stored in this extra field. + * + * @param rho ZipEightByteInteger */ public void setRelativeHeaderOffset(ZipEightByteInteger rho) { relativeHeaderOffset = rho; @@ -295,6 +313,8 @@ public class Zip64ExtendedInformationExtraField /** * The disk start number stored in this extra field. + * + * @return ZipLong */ public ZipLong getDiskStartNumber() { return diskStart; @@ -302,6 +322,8 @@ public class Zip64ExtendedInformationExtraField /** * The disk start number stored in this extra field. + * + * @param ds ZipLong */ public void setDiskStartNumber(ZipLong ds) { diskStart = ds; diff --git a/src/main/org/apache/tools/zip/ZipEncoding.java b/src/main/org/apache/tools/zip/ZipEncoding.java index 72653834c..719caf58b 100644 --- a/src/main/org/apache/tools/zip/ZipEncoding.java +++ b/src/main/org/apache/tools/zip/ZipEncoding.java @@ -71,14 +71,14 @@ public interface ZipEncoding { * beginning of the encoded result, the byte buffer has a * backing array and the limit of the byte buffer points * to the end of the encoded result. - * @throws IOException + * @throws IOException if something goes wrong */ ByteBuffer encode(String name) throws IOException; /** * @param data The byte values to decode. * @return The decoded string. - * @throws IOException + * @throws IOException if something goes wrong */ String decode(byte [] data) throws IOException; } diff --git a/src/main/org/apache/tools/zip/ZipEntry.java b/src/main/org/apache/tools/zip/ZipEntry.java index df3f84059..eac5f6380 100644 --- a/src/main/org/apache/tools/zip/ZipEntry.java +++ b/src/main/org/apache/tools/zip/ZipEntry.java @@ -30,8 +30,7 @@ import java.util.zip.ZipException; * access to the internal and external file attributes. * *

      The extra data is expected to follow the recommendation of - * {@link - * APPNOTE.txt}:

      + * APPNOTE.txt:

      *
        *
      • the extra byte array consists of a sequence of extra fields
      • *
      • each extra fields starts by a two byte header id followed by @@ -59,8 +58,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { * The {@link java.util.zip.ZipEntry} base class only supports * the compression methods STORED and DEFLATED. We override the * field so that any compression methods can be used. - *

        - * The default value -1 means that the method has not been specified. + *

        The default value -1 means that the method has not been specified.

        */ private int method = -1; @@ -158,6 +156,9 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { * the file is a directory. If the file is not a directory a * potential trailing forward slash will be stripped from the * entry name.

        + * + * @param inputFile File + * @param entryName String */ public ZipEntry(final File inputFile, final String entryName) { this(inputFile.isDirectory() && !entryName.endsWith("/") ? @@ -171,6 +172,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Overwrite clone. + * * @return a cloned copy of this ZipEntry * @since 1.1 */ @@ -221,6 +223,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Sets the internal file attributes. + * * @param value an int value * @since 1.1 */ @@ -230,6 +233,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Retrieves the external file attributes. + * * @return the external file attributes * @since 1.1 */ @@ -239,6 +243,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Sets the external file attributes. + * * @param value an long value * @since 1.1 */ @@ -249,6 +254,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Sets Unix permissions in a way that is understood by Info-Zip's * unzip command. + * * @param mode an int value * @since Ant 1.5.2 */ @@ -265,6 +271,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Unix permission. + * * @return the unix permissions * @since Ant 1.6 */ @@ -288,6 +295,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Set the platform (UNIX or FAT). + * * @param platform an int value - 0 is FAT, 3 is UNIX * @since 1.9 */ @@ -297,6 +305,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Replaces all currently attached extra fields with the new array. + * * @param fields an array of extra fields * @since 1.1 */ @@ -315,6 +324,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Retrieves all extra fields that have been parsed successfully. + * * @return an array of the extra fields */ public ZipExtraField[] getExtraFields() { @@ -323,6 +333,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Retrieves extra fields. + * * @param includeUnparseable whether to also return unparseable * extra fields as {@link UnparseableExtraFieldData} if such data * exists. @@ -378,6 +389,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Get all extra fields, including unparseable ones. + * * @return An array of all extra fields. Not necessarily a copy of internal data structures, hence private method */ private ZipExtraField[] getAllExtraFieldsNoCopy() { @@ -393,6 +405,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { * *

        If no extra field of the same type exists, the field will be * added as last field.

        + * * @param ze an extra field * @since 1.1 */ @@ -420,6 +433,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { * of the same type. * *

        The new extra field will be the first one.

        + * * @param ze an extra field * @since 1.1 */ @@ -443,6 +457,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Remove an extra field. + * * @param type the type of extra field to remove * @since 1.1 */ @@ -477,6 +492,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Looks up an extra field by its header id. * + * @param type ZipShort * @return null if no such field exists. */ public ZipExtraField getExtraField(final ZipShort type) { @@ -503,10 +519,11 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { * Parses the given bytes as extra field data and consumes any * unparseable data as an {@link UnparseableExtraFieldData} * instance. + * * @param extra an array of bytes to be parsed into extra fields * @throws RuntimeException if the bytes cannot be parsed - * @since 1.1 * @throws RuntimeException on error + * @since 1.1 */ @Override public void setExtra(final byte[] extra) throws RuntimeException { @@ -536,6 +553,8 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Sets the central directory part of extra fields. + * + * @param b boolean */ public void setCentralDirectoryExtra(final byte[] b) { try { @@ -550,6 +569,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Retrieves the extra data for the local file data. + * * @return the extra data for local file * @since 1.1 */ @@ -560,6 +580,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Retrieves the extra data for the central directory. + * * @return the central directory extra data * @since 1.1 */ @@ -572,6 +593,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { * *

        This either stores the size for later usage or invokes * setCompressedSize via reflection.

        + * * @param size the size to use * @deprecated since 1.7. * Use setCompressedSize directly. @@ -584,6 +606,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Get the name of the entry. + * * @return the entry name * @since 1.9 */ @@ -594,6 +617,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Is this entry a directory? + * * @return true if the entry is a directory * @since 1.10 */ @@ -604,6 +628,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Set the name of the entry. + * * @param name the name to use */ protected void setName(String name) { @@ -616,6 +641,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Gets the uncompressed size of the entry data. + * * @return the entry size */ @Override @@ -625,6 +651,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Sets the uncompressed size of the entry data. + * * @param size the uncompressed size in bytes * @exception IllegalArgumentException if the specified size is less * than 0 @@ -640,6 +667,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Sets the name using the raw bytes and the string created from * it by guessing or using the configured encoding. + * * @param name the name to use created from the raw bytes using * the guessed or configured encoding * @param rawName the bytes originally read as name from the @@ -656,6 +684,8 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { * *

        This method will return null if this instance has not been * read from an archive.

        + * + * @return byte[] */ public byte[] getRawName() { if (rawName != null) { @@ -669,6 +699,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * Get the hashCode of the entry. * This uses the name as the hashcode. + * * @return a hashcode. * @since Ant 1.7 */ @@ -676,13 +707,15 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { public int hashCode() { // this method has severe consequences on performance. We cannot rely // on the super.hashCode() method since super.getName() always return - // the empty string in the current implemention (there's no setter) + // the empty string in the current implementation (there's no setter) // so it is basically draining the performance of a hashmap lookup return getName().hashCode(); } /** * The "general purpose bit" field. + * + * @return GeneralPurposeBit */ public GeneralPurposeBit getGeneralPurposeBit() { return gpb; @@ -690,6 +723,8 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { /** * The "general purpose bit" field. + * + * @param b GeneralPurposeBit */ public void setGeneralPurposeBit(final GeneralPurposeBit b) { gpb = b; @@ -700,6 +735,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { * data - otherwise merge the fields assuming the existing fields * and the new fields stem from different locations inside the * archive. + * * @param f the extra fields to merge * @param local whether the new fields originate from local data */ diff --git a/src/main/org/apache/tools/zip/ZipFile.java b/src/main/org/apache/tools/zip/ZipFile.java index f963ceb85..a50570ef6 100644 --- a/src/main/org/apache/tools/zip/ZipFile.java +++ b/src/main/org/apache/tools/zip/ZipFile.java @@ -315,7 +315,7 @@ public class ZipFile implements Closeable { * the archive's central directory. * * @param name name of the entry. - * @return the Iterable corresponding to the + * @return the Iterable<ZipEntry> corresponding to the * given name * @since 1.9.2 */ @@ -330,7 +330,7 @@ public class ZipFile implements Closeable { * appear within the archive. * * @param name name of the entry. - * @return the Iterable corresponding to the + * @return the Iterable<ZipEntry> corresponding to the * given name * @since 1.9.2 */ @@ -348,6 +348,9 @@ public class ZipFile implements Closeable { * *

        May return false if it is set up to use encryption or a * compression method that hasn't been implemented yet.

        + * + * @param ze ZipEntry + * @return boolean */ public boolean canReadEntryData(final ZipEntry ze) { return ZipUtil.canHandleEntryData(ze); @@ -366,7 +369,7 @@ public class ZipFile implements Closeable { if (!(ze instanceof Entry)) { return null; } - // cast valididty is checked just above + // cast validity is checked just above final OffsetEntry offsetEntry = ((Entry) ze).getOffsetEntry(); ZipUtil.checkRequestedFeatures(ze); final long start = offsetEntry.dataOffset; diff --git a/src/main/org/apache/tools/zip/ZipOutputStream.java b/src/main/org/apache/tools/zip/ZipOutputStream.java index 228ce614f..3001a72c4 100644 --- a/src/main/org/apache/tools/zip/ZipOutputStream.java +++ b/src/main/org/apache/tools/zip/ZipOutputStream.java @@ -262,9 +262,10 @@ public class ZipOutputStream extends FilterOutputStream { /** * The zip encoding to use for filenames and the file comment. - * + *

        * This field is of internal use and will be set in {@link * #setEncoding(String)}. + *

        */ private ZipEncoding zipEncoding = ZipEncodingHelper.getZipEncoding(DEFAULT_ENCODING); @@ -407,6 +408,8 @@ public class ZipOutputStream extends FilterOutputStream { * encoding is UTF-8. * *

        Defaults to true.

        + * + * @param b boolean */ public void setUseLanguageEncodingFlag(boolean b) { useUTF8Flag = b && ZipEncodingHelper.isUTF8(encoding); @@ -416,6 +419,8 @@ public class ZipOutputStream extends FilterOutputStream { * Whether to create Unicode Extra Fields. * *

        Defaults to NEVER.

        + * + * @param b boolean */ public void setCreateUnicodeExtraFields(UnicodeExtraFieldPolicy b) { createUnicodeExtraFields = b; @@ -426,6 +431,8 @@ public class ZipOutputStream extends FilterOutputStream { * the file name cannot be encoded using the specified encoding. * *

        Defaults to false.

        + * + * @param b boolean */ public void setFallbackToUTF8(boolean b) { fallbackToUTF8 = b; @@ -473,6 +480,7 @@ public class ZipOutputStream extends FilterOutputStream { * size and data is written to a non-seekable stream - in this * case the default is {@link Zip64Mode#Never Never}.

        * + * @param mode Zip64Mode * @since 1.3 */ public void setUseZip64(Zip64Mode mode) { @@ -585,6 +593,12 @@ public class ZipOutputStream extends FilterOutputStream { * the values just written, verifies it isn't too big in the * Zip64Mode.Never case and returns whether the entry would * require a Zip64 extra field. + * + * @param bytesWritten long + * @param crc long + * @param effectiveMode Zip64Mode + * @return boolean + * @throws ZipException if size or CRC is incorrect */ private boolean handleSizesAndCrc(long bytesWritten, long crc, Zip64Mode effectiveMode) @@ -629,6 +643,10 @@ public class ZipOutputStream extends FilterOutputStream { * the values just written, verifies it isn't too big in the * Zip64Mode.Never case and returns whether the entry would * require a Zip64 extra field. + * + * @param effectiveMode Zip64Mode + * @return boolean + * @throws ZipException if the entry is too big for Zip64Mode.Never */ private boolean checkIfNeedsZip64(Zip64Mode effectiveMode) throws ZipException { @@ -652,8 +670,10 @@ public class ZipOutputStream extends FilterOutputStream { /** * When using random access output, write the local file header - * and potentiall the ZIP64 extra containing the correct CRC and + * and potentially the ZIP64 extra containing the correct CRC and * compressed/uncompressed sizes. + * + * @param actuallyNeedsZip64 boolean */ private void rewriteSizesAndCrc(boolean actuallyNeedsZip64) throws IOException { @@ -752,6 +772,8 @@ public class ZipOutputStream extends FilterOutputStream { /** * Provides default values for compression method and last * modification time. + * + * @param entry ZipEntry */ private void setDefaults(ZipEntry entry) { if (entry.getMethod() == -1) { // not specified @@ -768,6 +790,8 @@ public class ZipOutputStream extends FilterOutputStream { * that is written to a non-seekable output or the entry is too * big to be written without Zip64 extra but the mode has been set * to Never. + * + * @param effectiveMode Zip64Mode */ private void validateSizeInformation(Zip64Mode effectiveMode) throws ZipException { @@ -794,7 +818,7 @@ public class ZipOutputStream extends FilterOutputStream { } /** - * Whether to addd a Zip64 extended information extra field to the + * Whether to add a Zip64 extended information extra field to the * local file header. * *

        Returns true if

        @@ -806,6 +830,9 @@ public class ZipOutputStream extends FilterOutputStream { * other implementations if we add it (i.e. we can erase its * usage
      • *
      + * + * @param entry ZipEntry + * @param mode Zip64Mode */ private boolean shouldAddZip64Extra(ZipEntry entry, Zip64Mode mode) { return mode == Zip64Mode.Always @@ -817,6 +844,7 @@ public class ZipOutputStream extends FilterOutputStream { /** * Set the file comment. + * * @param comment the comment */ public void setComment(String comment) { @@ -827,6 +855,7 @@ public class ZipOutputStream extends FilterOutputStream { * Sets the compression level for subsequent entries. * *

      Default is Deflater.DEFAULT_COMPRESSION.

      + * * @param level the compression level. * @throws IllegalArgumentException if an invalid compression * level is specified. @@ -846,6 +875,7 @@ public class ZipOutputStream extends FilterOutputStream { * Sets the default compression method for subsequent entries. * *

      Default is DEFLATED.

      + * * @param method an int from java.util.zip.ZipEntry * @since 1.1 */ @@ -858,6 +888,9 @@ public class ZipOutputStream extends FilterOutputStream { * *

      May return false if it is set up to use encryption or a * compression method that hasn't been implemented yet.

      + * + * @param ae ZipEntry + * @return boolean */ public boolean canWriteEntryData(ZipEntry ae) { return ZipUtil.canHandleEntryData(ae); @@ -865,6 +898,7 @@ public class ZipOutputStream extends FilterOutputStream { /** * Writes bytes to ZIP entry. + * * @param b the byte array to write * @param offset the start position to write from * @param length the number of bytes to write @@ -887,6 +921,7 @@ public class ZipOutputStream extends FilterOutputStream { /** * Write bytes to output or random access file. + * * @param data the byte array to write * @throws IOException on error */ @@ -901,6 +936,10 @@ public class ZipOutputStream extends FilterOutputStream { /** * write implementation for DEFLATED entries. + * + * @param b byte[] + * @param offset int + * @param length int */ private void writeDeflated(byte[]b, int offset, int length) throws IOException { @@ -929,7 +968,7 @@ public class ZipOutputStream extends FilterOutputStream { * Closes this output stream and releases any system resources * associated with the stream. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @throws Zip64RequiredException if the archive's size exceeds 4 * GByte or there are more than 65535 entries inside the archive * and {@link #setUseZip64} is {@link Zip64Mode#Never}. @@ -993,8 +1032,8 @@ public class ZipOutputStream extends FilterOutputStream { /** * Writes next block of compressed data to the output stream. - * @throws IOException on error * + * @throws IOException on error * @since 1.14 */ protected final void deflate() throws IOException { @@ -1006,9 +1045,9 @@ public class ZipOutputStream extends FilterOutputStream { /** * Writes the local file header entry + * * @param ze the entry to write * @throws IOException on error - * * @since 1.1 */ protected void writeLocalFileHeader(ZipEntry ze) throws IOException { @@ -1091,6 +1130,10 @@ public class ZipOutputStream extends FilterOutputStream { * Adds UnicodeExtra fields for name and file comment if mode is * ALWAYS or the data cannot be encoded using the configured * encoding. + * + * @param ze ZipEntry + * @param encodable boolean + * @param name ByteBuffer */ private void addUnicodeExtraFields(ZipEntry ze, boolean encodable, ByteBuffer name) @@ -1124,9 +1167,9 @@ public class ZipOutputStream extends FilterOutputStream { /** * Writes the data descriptor entry. + * * @param ze the entry to write * @throws IOException on error - * * @since 1.1 */ protected void writeDataDescriptor(ZipEntry ze) throws IOException { @@ -1146,6 +1189,7 @@ public class ZipOutputStream extends FilterOutputStream { /** * Writes the central file header entry. + * * @param ze the entry to write * @throws IOException on error * @throws Zip64RequiredException if the archive's size exceeds 4 @@ -1180,6 +1224,7 @@ public class ZipOutputStream extends FilterOutputStream { /** * Writes the central file header entry. + * * @param ze the entry to write * @param name The encoded name * @param lfhOffset Local file header offset for this file @@ -1268,6 +1313,10 @@ public class ZipOutputStream extends FilterOutputStream { /** * If the entry needs Zip64 extra information inside the central * directory then configure its data. + * + * @param ze ZipEntry + * @param lfhOffset long + * @param needsZip64Extra boolean */ private void handleZip64Extra(ZipEntry ze, long lfhOffset, boolean needsZip64Extra) { @@ -1291,6 +1340,7 @@ public class ZipOutputStream extends FilterOutputStream { /** * Writes the "End of central dir record". + * * @throws IOException on error * @throws Zip64RequiredException if the archive's size exceeds 4 * GByte or there are more than 65535 entries inside the archive @@ -1333,6 +1383,7 @@ public class ZipOutputStream extends FilterOutputStream { /** * Convert a Date object to a DOS date/time field. + * * @param time the Date to convert * @return the date as a ZipLong * @since 1.1 @@ -1347,6 +1398,7 @@ public class ZipOutputStream extends FilterOutputStream { * Convert a Date object to a DOS date/time field. * *

      Stolen from InfoZip's fileio.c

      + * * @param t number of milliseconds since the epoch * @return the date as a byte array * @since 1.26 @@ -1360,6 +1412,7 @@ public class ZipOutputStream extends FilterOutputStream { /** * Retrieve the bytes for the given String in the encoding set for * this Stream. + * * @param name the string to get bytes from * @return the bytes as a byte array * @throws ZipException on error @@ -1382,6 +1435,7 @@ public class ZipOutputStream extends FilterOutputStream { /** * Writes the "ZIP64 End of central dir record" and * "ZIP64 End of central dir locator". + * * @throws IOException on error */ protected void writeZip64CentralDirectory() throws IOException { @@ -1448,6 +1502,7 @@ public class ZipOutputStream extends FilterOutputStream { /** * Write bytes to output or random access file. + * * @param data the byte array to write * @throws IOException on error * @@ -1459,6 +1514,7 @@ public class ZipOutputStream extends FilterOutputStream { /** * Write bytes to output or random access file. + * * @param data the byte array to write * @param offset the start position to write from * @param length the number of bytes to write @@ -1478,6 +1534,7 @@ public class ZipOutputStream extends FilterOutputStream { /** * Assumes a negative integer really is a positive integer that * has wrapped around and re-creates the original value. + * * @param i the value to treat as unsigned int. * @return the unsigned int as a long. * @since 1.34 @@ -1521,6 +1578,9 @@ public class ZipOutputStream extends FilterOutputStream { /** * Get the existing ZIP64 extended information extra field or * create a new one and add it to the entry. + * + * @param ze ZipEntry + * @return Zip64ExtendedInformationExtraField */ private Zip64ExtendedInformationExtraField getZip64Extra(ZipEntry ze) { if (entry != null) { @@ -1550,6 +1610,9 @@ public class ZipOutputStream extends FilterOutputStream { /** * Is there a ZIP64 extended information extra field for the * entry? + * + * @param ze ZipEntry + * @return boolean */ private boolean hasZip64Extra(ZipEntry ze) { return ze.getExtraField(Zip64ExtendedInformationExtraField @@ -1561,6 +1624,9 @@ public class ZipOutputStream extends FilterOutputStream { * If the mode is AsNeeded and the entry is a compressed entry of * unknown size that gets written to a non-seekable stream the * change the default to Never. + * + * @param ze ZipEntry + * @return Zip64Mode */ private Zip64Mode getEffectiveZip64Mode(ZipEntry ze) { if (zip64Mode != Zip64Mode.AsNeeded @@ -1588,6 +1654,8 @@ public class ZipOutputStream extends FilterOutputStream { * *

      This method only exists to support tests that generate * corrupt archives so they can clean up any temporary files.

      + * + * @throws IOException if close() fails */ void destroy() throws IOException { if (raf != null) { diff --git a/src/main/org/apache/tools/zip/ZipUtil.java b/src/main/org/apache/tools/zip/ZipUtil.java index c25b8c7f9..9926a298c 100644 --- a/src/main/org/apache/tools/zip/ZipUtil.java +++ b/src/main/org/apache/tools/zip/ZipUtil.java @@ -34,6 +34,7 @@ public abstract class ZipUtil { /** * Convert a Date object to a DOS date/time field. + * * @param time the Date to convert * @return the date as a ZipLong */ @@ -45,6 +46,7 @@ public abstract class ZipUtil { * Convert a Date object to a DOS date/time field. * *

      Stolen from InfoZip's fileio.c

      + * * @param t number of milliseconds since the epoch * @return the date as a byte array */ @@ -58,6 +60,7 @@ public abstract class ZipUtil { * Convert a Date object to a DOS date/time field. * *

      Stolen from InfoZip's fileio.c

      + * * @param t number of milliseconds since the epoch * @param buf the output buffer * @param offset @@ -117,6 +120,9 @@ public abstract class ZipUtil { /** * Converts DOS time to Java time (number of milliseconds since * epoch). + * + * @param dosTime long + * @return long */ public static long dosToJavaTime(long dosTime) { Calendar cal = Calendar.getInstance(); @@ -136,6 +142,10 @@ public abstract class ZipUtil { * If the entry has Unicode*ExtraFields and the CRCs of the * names/comments match those of the extra fields, transfer the * known Unicode values from the extra field. + * + * @param ze ZipEntry + * @param originalNameBytes byte[] + * @param commentBytes byte[] */ static void setNameAndCommentFromExtraFields(ZipEntry ze, byte[] originalNameBytes, @@ -166,6 +176,9 @@ public abstract class ZipUtil { * *

      If the field is null or the CRCs don't match, return null * instead.

      + * + * @param f AbstractUnicodeExtraField + * @param orig byte[] */ private static String getUnicodeStringIfOriginalMatches(AbstractUnicodeExtraField f, @@ -194,6 +207,9 @@ public abstract class ZipUtil { /** * Create a copy of the given array - or return null if the * argument is null. + * + * @param from byte[] + * @return byte[] */ static byte[] copy(byte[] from) { if (from != null) { @@ -206,6 +222,8 @@ public abstract class ZipUtil { /** * Whether this library is able to read or write the given entry. + * + * @return boolean */ static boolean canHandleEntryData(ZipEntry entry) { return supportsEncryptionOf(entry) && supportsMethodOf(entry); diff --git a/src/tests/antunit/core/uuencode/src/task/BaseTask.java b/src/tests/antunit/core/uuencode/src/task/BaseTask.java index 320f753ff..70eb7a32c 100644 --- a/src/tests/antunit/core/uuencode/src/task/BaseTask.java +++ b/src/tests/antunit/core/uuencode/src/task/BaseTask.java @@ -16,6 +16,7 @@ * */ package task; + import org.apache.tools.ant.Task; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.util.FileUtils; diff --git a/src/tests/junit/org/apache/tools/ant/BuildFileRule.java b/src/tests/junit/org/apache/tools/ant/BuildFileRule.java index 52ec87787..2611cb241 100644 --- a/src/tests/junit/org/apache/tools/ant/BuildFileRule.java +++ b/src/tests/junit/org/apache/tools/ant/BuildFileRule.java @@ -139,7 +139,7 @@ public class BuildFileRule extends ExternalResource { /** * Sets up to run the named project * - * @param filename name of project file to run + * @param filename name of project file to run */ public void configureProject(String filename) throws BuildException { configureProject(filename, Project.MSG_DEBUG); @@ -148,7 +148,8 @@ public class BuildFileRule extends ExternalResource { /** * Sets up to run the named project * - * @param filename name of project file to run + * @param filename name of project file to run + * @param logLevel int */ public void configureProject(String filename, int logLevel) throws BuildException { logBuffer = new StringBuffer(); @@ -167,7 +168,7 @@ public class BuildFileRule extends ExternalResource { * Executes a target in the configured Ant build file. Requires #configureProject() * to have been invoked before this call. * - * @param targetName the target in the currently configured build file to run. + * @param targetName the target in the currently configured build file to run. */ public void executeTarget(String targetName) { outputBuffer = new StringBuffer(); diff --git a/src/tests/junit/org/apache/tools/ant/BuildFileTest.java b/src/tests/junit/org/apache/tools/ant/BuildFileTest.java index 02b49e356..681cef34d 100644 --- a/src/tests/junit/org/apache/tools/ant/BuildFileTest.java +++ b/src/tests/junit/org/apache/tools/ant/BuildFileTest.java @@ -103,6 +103,9 @@ public abstract class BuildFileTest extends TestCase { /** * Assert that only the given message has been logged with a * priority <= INFO when running the given target. + * + * @param target String + * @param log String */ public void expectLog(String target, String log) { executeTarget(target); @@ -112,6 +115,8 @@ public abstract class BuildFileTest extends TestCase { /** * Assert that the given substring is in the log messages. + * + * @param substring String */ public void assertLogContaining(String substring) { String realLog = getLog(); @@ -122,6 +127,8 @@ public abstract class BuildFileTest extends TestCase { /** * Assert that the given substring is not in the log messages. + * + * @param substring String */ public void assertLogNotContaining(String substring) { String realLog = getLog(); @@ -132,6 +139,8 @@ public abstract class BuildFileTest extends TestCase { /** * Assert that the given substring is in the output messages. + * + * @param substring String * @since Ant1.7 */ public void assertOutputContaining(String substring) { @@ -140,8 +149,10 @@ public abstract class BuildFileTest extends TestCase { /** * Assert that the given substring is in the output messages. + * * @param message Print this message if the test fails. Defaults to * a meaningful text if null is passed. + * @param substring String * @since Ant1.7 */ public void assertOutputContaining(String message, String substring) { @@ -154,8 +165,10 @@ public abstract class BuildFileTest extends TestCase { /** * Assert that the given substring is not in the output messages. + * * @param message Print this message if the test fails. Defaults to * a meaningful text if null is passed. + * @param substring String * @since Ant1.7 */ public void assertOutputNotContaining(String message, String substring) { @@ -169,6 +182,9 @@ public abstract class BuildFileTest extends TestCase { /** * Assert that the given message has been logged with a priority <= INFO when running the * given target. + * + * @param target String + * @param log String */ public void expectLogContaining(String target, String log) { executeTarget(target); @@ -178,6 +194,9 @@ public abstract class BuildFileTest extends TestCase { /** * Assert that the given message has not been logged with a * priority <= INFO when running the given target. + * + * @param target String + * @param log String */ public void expectLogNotContaining(String target, String log) { executeTarget(target); @@ -189,7 +208,7 @@ public abstract class BuildFileTest extends TestCase { * Only valid if configureProject() has been called. * * @pre logBuffer!=null - * @return The log value + * @return The log value */ public String getLog() { return logBuffer.toString(); @@ -198,6 +217,9 @@ public abstract class BuildFileTest extends TestCase { /** * Assert that the given message has been logged with a priority * >= VERBOSE when running the given target. + * + * @param target String + * @param log String */ public void expectDebuglog(String target, String log) { executeTarget(target); @@ -207,6 +229,8 @@ public abstract class BuildFileTest extends TestCase { /** * Assert that the given substring is in the log messages. + * + * @param substring String */ public void assertDebuglogContaining(String substring) { String realLog = getFullLog(); @@ -231,8 +255,8 @@ public abstract class BuildFileTest extends TestCase { /** * execute the target, verify output matches expectations * - * @param target target to execute - * @param output output to look for + * @param target target to execute + * @param output output to look for */ public void expectOutput(String target, String output) { executeTarget(target); @@ -244,9 +268,9 @@ public abstract class BuildFileTest extends TestCase { * Executes the target, verify output matches expectations * and that we got the named error at the end * - * @param target target to execute - * @param output output to look for - * @param error Description of Parameter + * @param target target to execute + * @param output output to look for + * @param error Description of Parameter */ public void expectOutputAndError(String target, String output, String error) { executeTarget(target); @@ -282,7 +306,7 @@ public abstract class BuildFileTest extends TestCase { /** * Sets up to run the named project * - * @param filename name of project file to run + * @param filename name of project file to run */ public void configureProject(String filename) throws BuildException { configureProject(filename, Project.MSG_DEBUG); @@ -291,7 +315,8 @@ public abstract class BuildFileTest extends TestCase { /** * Sets up to run the named project * - * @param filename name of project file to run + * @param filename name of project file to run + * @param logLevel int */ public void configureProject(String filename, int logLevel) throws BuildException { @@ -312,7 +337,7 @@ public abstract class BuildFileTest extends TestCase { * Executes a target we have set up * * @pre configureProject has been called - * @param targetName target to run + * @param targetName target to run */ public void executeTarget(String targetName) { PrintStream sysOut = System.out; @@ -367,10 +392,10 @@ public abstract class BuildFileTest extends TestCase { /** * Runs a target, wait for a build exception. * - * @param target target to run - * @param cause information string to reader of report - * @param msg the message value of the build exception we are waiting - * for set to null for any build exception to be valid + * @param target target to run + * @param cause information string to reader of report + * @param msg the message value of the build exception we are waiting + * for set to null for any build exception to be valid */ public void expectSpecificBuildException(String target, String cause, String msg) { try { @@ -391,9 +416,9 @@ public abstract class BuildFileTest extends TestCase { * run a target, expect an exception string * containing the substring we look for (case sensitive match) * - * @param target target to run - * @param cause information string to reader of report - * @param contains substring of the build exception to look for + * @param target target to run + * @param cause information string to reader of report + * @param contains substring of the build exception to look for */ public void expectBuildExceptionContaining(String target, String cause, String contains) { try { @@ -479,7 +504,7 @@ public abstract class BuildFileTest extends TestCase { * relative to the package name or absolute from the root path. * * @param resource the resource to retrieve its url. - * @throws junit.framework.AssertionFailedError if the resource is not found. + * @return URL ditto */ public URL getResource(String resource) { URL url = getClass().getResource(resource); diff --git a/src/tests/junit/org/apache/tools/ant/ImmutableTest.java b/src/tests/junit/org/apache/tools/ant/ImmutableTest.java index cd65a5a61..933bd28c4 100644 --- a/src/tests/junit/org/apache/tools/ant/ImmutableTest.java +++ b/src/tests/junit/org/apache/tools/ant/ImmutableTest.java @@ -65,6 +65,7 @@ public class ImmutableTest { buildRule.executeTarget("test4"); assertEquals("original", buildRule.getProject().getProperty("test")); } + // ensure follows the immutability rule @Test public void test5() { diff --git a/src/tests/junit/org/apache/tools/ant/PropertyExpansionTest.java b/src/tests/junit/org/apache/tools/ant/PropertyExpansionTest.java index 4ac8c5f78..601391e49 100644 --- a/src/tests/junit/org/apache/tools/ant/PropertyExpansionTest.java +++ b/src/tests/junit/org/apache/tools/ant/PropertyExpansionTest.java @@ -76,7 +76,7 @@ public class PropertyExpansionTest { /** - * old things we dont want; not a test no more + * old things we don't want; not a test anymore */ @Test @Ignore("Previously disabled through naming convention") @@ -95,5 +95,4 @@ public class PropertyExpansionTest { assertEquals(source,expected,actual); } -//end class } diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/AntTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/AntTest.java index b38857ee2..1d7c25250 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/AntTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/AntTest.java @@ -636,5 +636,4 @@ public class AntTest { } - } diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/DeleteTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/DeleteTest.java index fb2442139..4d343411e 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/DeleteTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/DeleteTest.java @@ -52,7 +52,7 @@ public class DeleteTest { public void test2() { buildRule.executeTarget("test2"); } -//where oh where has my test case 3 gone? + //where oh where has my test case 3 gone? @Test public void test4() { buildRule.executeTarget("test4"); diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/MacroDefTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/MacroDefTest.java index ebcd01553..9ee7b20d2 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/MacroDefTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/MacroDefTest.java @@ -132,26 +132,31 @@ public class MacroDefTest { //TODO assert value } } + @Test public void testEscape() { buildRule.executeTarget("escape"); assertEquals("a@b or a@b is avalue@bvalue", buildRule.getLog()); } + @Test public void testAttributeDescription() { buildRule.executeTarget("attribute.description"); assertEquals("description is hello world", buildRule.getLog()); } + @Test public void testOverrideDefault() { buildRule.executeTarget("override.default"); assertEquals("value is new", buildRule.getLog()); } + @Test public void testImplicit() { buildRule.executeTarget("implicit"); assertEquals("Before implicitIn implicitAfter implicit", buildRule.getLog()); } + @Test public void testImplicitNotOptional() { try { @@ -161,11 +166,13 @@ public class MacroDefTest { assertEquals("Missing nested elements for implicit element implicit", ex.getMessage()); } } + @Test public void testImplicitOptional() { buildRule.executeTarget("implicit.optional"); assertEquals("Before implicitAfter implicit", buildRule.getLog()); } + @Test public void testImplicitExplicit() { try { diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/ManifestClassPathTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/ManifestClassPathTest.java index 6fb3d1316..7f78b7b4f 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/ManifestClassPathTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/ManifestClassPathTest.java @@ -191,7 +191,6 @@ public class ManifestClassPathTest { buildRule.executeTarget("international-german"); buildRule.executeTarget("run-two-jars"); assertContains("beta alpha", buildRule.getLog()); - } @Test diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/ParallelTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/ParallelTest.java index 97667e461..4f7a4d0e7 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/ParallelTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/ParallelTest.java @@ -92,10 +92,10 @@ public class ParallelTest { /** * the test result string should match the regex - * ^(\|\d+\/(+-)*)+\|$ for someting like + * ^(\|\d+\/(+-)*)+\|$ for something like * |3/++--+-|5/+++++-----| * - *@return -1 no more tests + * @return -1 no more tests * # start pos of next test */ static int countThreads(String s, int start) { diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/RenameTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/RenameTest.java index 0cb134410..ca3779952 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/RenameTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/RenameTest.java @@ -80,6 +80,7 @@ public class RenameTest { public void test5() { buildRule.executeTarget("test5"); } + @Test public void test6() { buildRule.executeTarget("test6"); diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/RmicAdvancedTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/RmicAdvancedTest.java index 2748cf26f..604e683dd 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/RmicAdvancedTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/RmicAdvancedTest.java @@ -227,7 +227,6 @@ public class RmicAdvancedTest { } } - /** * A unit test for JUnit */ @@ -243,7 +242,6 @@ public class RmicAdvancedTest { AntAssert.assertContains("unimplemented.class", buildRule.getLog()); } - /** * A unit test for JUnit */ @@ -270,13 +268,11 @@ public class RmicAdvancedTest { } } - @Test public void testMagicPropertyIsEmptyString() throws Exception { buildRule.executeTarget("testMagicPropertyIsEmptyString"); } - @Test @Ignore("Previously named to prevent execution") public void NotestFailingAdapter() throws Exception { @@ -288,7 +284,6 @@ public class RmicAdvancedTest { } } - /** * test that version 1.1 stubs are good * @throws Exception if something goes wrong diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/SQLExecTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/SQLExecTest.java index dac694110..979ec23d4 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/SQLExecTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/SQLExecTest.java @@ -179,6 +179,8 @@ public class SQLExecTest { * If you want to test on your specific base, you'd better * tweak this to make it run or add your own database. * The driver lib should be dropped into the system classloader. + * + * @param database int */ protected Properties getProperties(int database) { Properties props = null; @@ -200,7 +202,14 @@ public class SQLExecTest { return props; } - /** helper method to build properties */ + /** + * helper method to build properties + * + * @param driver String + * @param user String + * @param pwd String + * @param url String + */ protected Properties getProperties(String driver, String user, String pwd, String url) { Properties props = new Properties(); props.put(DRIVER, driver); diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/condition/TypeFoundTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/condition/TypeFoundTest.java index ab2849430..6c73188cb 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/condition/TypeFoundTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/condition/TypeFoundTest.java @@ -87,5 +87,4 @@ public class TypeFoundTest { assertEquals("true", buildRule.getProject().getProperty("testMacro")); } - } diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/AbstractXSLTLiaisonTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/AbstractXSLTLiaisonTest.java index d7dedfc6c..9a77203b2 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/AbstractXSLTLiaisonTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/AbstractXSLTLiaisonTest.java @@ -53,7 +53,13 @@ public abstract class AbstractXSLTLiaisonTest { // to override protected abstract XSLTLiaison createLiaison() throws Exception; - /** load the file from the caller classloader that loaded this class */ + /** + * Load the file from the caller classloader that loaded this class + * + * @param name String + * @return File + * @throws FileNotFoundException if file is not found + */ protected File getFile(String name) throws FileNotFoundException { URL url = getClass().getResource(name); if (url == null) { @@ -62,7 +68,11 @@ public abstract class AbstractXSLTLiaisonTest { return new File(FILE_UTILS.fromURI(url.toExternalForm())); } - /** keep it simple stupid */ + /** + * Keep it simple stupid + * + * @throws Exception if something goes wrong + */ @Test public void testTransform() throws Exception { File xsl = getFile("/taskdefs/optional/xsltliaison-in.xsl"); diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/TraXLiaisonTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/TraXLiaisonTest.java index d11893ac3..c4f28ab05 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/TraXLiaisonTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/TraXLiaisonTest.java @@ -27,8 +27,6 @@ import java.security.Permission; import javax.xml.transform.TransformerFactory; import javax.xml.transform.TransformerFactoryConfigurationError; -import junit.framework.AssertionFailedError; - import org.apache.tools.ant.BuildException; import org.apache.tools.ant.taskdefs.XSLTLiaison; import org.apache.tools.ant.taskdefs.XSLTLogger; @@ -170,7 +168,7 @@ public class TraXLiaisonTest extends AbstractXSLTLiaisonTest } public void log(String message) { - throw new AssertionFailedError("Liaison sent message: " + message); + throw new AssertionError("Liaison sent message: " + message); } } diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XmlValidateTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XmlValidateTest.java index 58f7a4b1f..d5f27a66a 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XmlValidateTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XmlValidateTest.java @@ -131,7 +131,6 @@ public class XmlValidateTest { try { buildRule.executeTarget("testSchemaBad"); fail("Should throw BuildException because 'Bad Schema Validation'"); - } catch (BuildException e) { if (e .getMessage() diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XsltTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XsltTest.java index 0a57cc556..b45505b3a 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XsltTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XsltTest.java @@ -45,7 +45,6 @@ public class XsltTest { buildRule.configureProject(TASKDEFS_DIR + "xslt.xml"); } - @Test public void testCatchNoDtd() { try { diff --git a/src/tests/junit/org/apache/tools/ant/types/AbstractFileSetTest.java b/src/tests/junit/org/apache/tools/ant/types/AbstractFileSetTest.java index aa4fd39c3..56ee49819 100644 --- a/src/tests/junit/org/apache/tools/ant/types/AbstractFileSetTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/AbstractFileSetTest.java @@ -39,7 +39,6 @@ public abstract class AbstractFileSetTest { private Project project; - @Before public void setUp() { project = new Project(); diff --git a/src/tests/junit/org/apache/tools/ant/types/CommandlineJavaTest.java b/src/tests/junit/org/apache/tools/ant/types/CommandlineJavaTest.java index 53aa27c70..db70ac49e 100644 --- a/src/tests/junit/org/apache/tools/ant/types/CommandlineJavaTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/CommandlineJavaTest.java @@ -39,7 +39,6 @@ public class CommandlineJavaTest { private String cloneVm; - private Project project; @Before diff --git a/src/tests/junit/org/apache/tools/ant/types/CommandlineTest.java b/src/tests/junit/org/apache/tools/ant/types/CommandlineTest.java index ce728e88f..6807a3345 100644 --- a/src/tests/junit/org/apache/tools/ant/types/CommandlineTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/CommandlineTest.java @@ -26,8 +26,7 @@ import static org.junit.Assert.fail; import static org.junit.Assert.assertNotNull; /** - * JUnit 3 testcases for org.apache.tools.ant.CommandLine - * + * JUnit 4 testcases for org.apache.tools.ant.CommandLine */ public class CommandlineTest { diff --git a/src/tests/junit/org/apache/tools/ant/types/DirSetTest.java b/src/tests/junit/org/apache/tools/ant/types/DirSetTest.java index 8c659ba79..e9162f198 100644 --- a/src/tests/junit/org/apache/tools/ant/types/DirSetTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/DirSetTest.java @@ -20,6 +20,7 @@ package org.apache.tools.ant.types; import java.io.File; import java.io.FileOutputStream; + import org.apache.tools.ant.BuildException; import org.junit.Test; @@ -27,8 +28,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; /** - * JUnit 3 testcases for org.apache.tools.ant.types.DirSet. - * + * JUnit 4 testcases for org.apache.tools.ant.types.DirSet. */ public class DirSetTest extends AbstractFileSetTest { diff --git a/src/tests/junit/org/apache/tools/ant/types/EnumeratedAttributeTest.java b/src/tests/junit/org/apache/tools/ant/types/EnumeratedAttributeTest.java index b20412ec1..af1a88b66 100644 --- a/src/tests/junit/org/apache/tools/ant/types/EnumeratedAttributeTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/EnumeratedAttributeTest.java @@ -18,7 +18,6 @@ package org.apache.tools.ant.types; - import org.apache.tools.ant.BuildException; import org.junit.Test; diff --git a/src/tests/junit/org/apache/tools/ant/types/FileSetTest.java b/src/tests/junit/org/apache/tools/ant/types/FileSetTest.java index 8a1c35ac0..e5aa8758f 100644 --- a/src/tests/junit/org/apache/tools/ant/types/FileSetTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/FileSetTest.java @@ -20,15 +20,13 @@ package org.apache.tools.ant.types; /** - * JUnit 3 testcases for org.apache.tools.ant.types.FileSet. - * - *

      This doesn't actually test much, mainly reference handling. + * JUnit 4 testcases for org.apache.tools.ant.types.FileSet. * + *

      This doesn't actually test much, mainly reference handling.

      */ public class FileSetTest extends AbstractFileSetTest { - protected AbstractFileSet getInstance() { return new FileSet(); } diff --git a/src/tests/junit/org/apache/tools/ant/types/FlexIntegerTest.java b/src/tests/junit/org/apache/tools/ant/types/FlexIntegerTest.java index 3e08b2cbb..dd01ff7e9 100644 --- a/src/tests/junit/org/apache/tools/ant/types/FlexIntegerTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/FlexIntegerTest.java @@ -18,9 +18,9 @@ package org.apache.tools.ant.types; +import org.apache.tools.ant.BuildException; import org.apache.tools.ant.BuildFileRule; import org.apache.tools.ant.Project; -import org.apache.tools.ant.BuildException; import org.junit.Before; import org.junit.Rule; import org.junit.Test; diff --git a/src/tests/junit/org/apache/tools/ant/types/PatternSetTest.java b/src/tests/junit/org/apache/tools/ant/types/PatternSetTest.java index 065d757db..1dbacfc79 100644 --- a/src/tests/junit/org/apache/tools/ant/types/PatternSetTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/PatternSetTest.java @@ -29,10 +29,9 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; /** - * JUnit 3 testcases for org.apache.tools.ant.types.PatternSet. + * JUnit 4 testcases for org.apache.tools.ant.types.PatternSet. * *

      This doesn't actually test much, mainly reference handling.

      - * */ public class PatternSetTest { diff --git a/src/tests/junit/org/apache/tools/ant/types/PermissionsTest.java b/src/tests/junit/org/apache/tools/ant/types/PermissionsTest.java index 7ff856537..091258879 100644 --- a/src/tests/junit/org/apache/tools/ant/types/PermissionsTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/PermissionsTest.java @@ -25,8 +25,7 @@ import org.junit.Test; import static org.junit.Assert.fail; /** - * JUnit 3 testcases for org.apache.tools.ant.types.Permissions. - * + * JUnit 4 testcases for org.apache.tools.ant.types.Permissions. */ public class PermissionsTest { diff --git a/src/tests/junit/org/apache/tools/ant/types/TarFileSetTest.java b/src/tests/junit/org/apache/tools/ant/types/TarFileSetTest.java index efaa47482..28251e0d1 100644 --- a/src/tests/junit/org/apache/tools/ant/types/TarFileSetTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/TarFileSetTest.java @@ -28,12 +28,10 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; /** - * JUnit 3 testcases for org.apache.tools.ant.types.TarFileSet. - * - *

      This doesn't actually test much, mainly reference handling. + * JUnit 4 testcases for org.apache.tools.ant.types.TarFileSet. * + *

      This doesn't actually test much, mainly reference handling.

      */ - public class TarFileSetTest extends AbstractFileSetTest { @@ -119,5 +117,4 @@ public class TarFileSetTest extends AbstractFileSetTest { f.getDirMode(getProject()) == zid.getDirMode(getProject())); } - } diff --git a/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java b/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java index 2422c7999..e2df448f0 100644 --- a/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java @@ -204,6 +204,7 @@ public class XMLCatalogTest { be.getMessage()); } } + // inspired by Bugzilla Report 23913 // a problem used to happen under Windows when the location of the DTD was given as an absolute path // possibly with a mixture of file separators @@ -225,7 +226,6 @@ public class XMLCatalogTest { @Test public void testSimpleEntry() throws IOException, SAXException { - ResourceLocation dtd = new ResourceLocation(); dtd.setPublicId("-//stevo//DTD doc 1.0//EN"); String sysid = "src/etc/testcases/taskdefs/optional/xml/doc.dtd"; @@ -311,7 +311,6 @@ public class XMLCatalogTest { Source result = catalog.resolve(uri, null); assertNotNull(result); assertEquals(toURLString(xmlFile), result.getSystemId()); - } @Test @@ -329,7 +328,6 @@ public class XMLCatalogTest { Source result = catalog.resolve(uri, base); assertNotNull(result); assertEquals(toURLString(xmlFile), result.getSystemId()); - } @Test @@ -367,6 +365,5 @@ public class XMLCatalogTest { assertNotNull(result); String resultStr = new URL(result.getSystemId()).getFile(); assertTrue(toURLString(xmlFile).endsWith(resultStr)); - } } diff --git a/src/tests/junit/org/apache/tools/ant/types/ZipFileSetTest.java b/src/tests/junit/org/apache/tools/ant/types/ZipFileSetTest.java index f9265feee..d89b0bd1d 100644 --- a/src/tests/junit/org/apache/tools/ant/types/ZipFileSetTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/ZipFileSetTest.java @@ -28,12 +28,10 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; /** - * JUnit 3 testcases for org.apache.tools.ant.types.ZipFileSet. + * JUnit 4 testcases for org.apache.tools.ant.types.ZipFileSet. * *

      This doesn't actually test much, mainly reference handling.

      - * */ - public class ZipFileSetTest extends AbstractFileSetTest { protected AbstractFileSet getInstance() { @@ -118,5 +116,4 @@ public class ZipFileSetTest extends AbstractFileSetTest { f.getDirMode(getProject()), zid.getDirMode(getProject())); } - } diff --git a/src/tests/junit/org/apache/tools/ant/types/mappers/GlobMapperTest.java b/src/tests/junit/org/apache/tools/ant/types/mappers/GlobMapperTest.java index d48e52973..c73c2fe38 100644 --- a/src/tests/junit/org/apache/tools/ant/types/mappers/GlobMapperTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/mappers/GlobMapperTest.java @@ -41,6 +41,8 @@ public class GlobMapperTest { public void testIgnoreCase() { buildRule.executeTarget("ignore.case"); } + + @Test public void testHandleDirSep() { buildRule.executeTarget("handle.dirsep"); } diff --git a/src/tests/junit/org/apache/tools/ant/types/resources/MultiRootFileSetTest.java b/src/tests/junit/org/apache/tools/ant/types/resources/MultiRootFileSetTest.java index 6c05963b8..267663223 100644 --- a/src/tests/junit/org/apache/tools/ant/types/resources/MultiRootFileSetTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/resources/MultiRootFileSetTest.java @@ -36,7 +36,6 @@ import static org.junit.Assert.fail; */ public class MultiRootFileSetTest extends AbstractFileSetTest { - protected AbstractFileSet getInstance() { return new MultiRootFileSet() { // overriding so set/getDir works as expected by the base test class diff --git a/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorRule.java b/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorRule.java index 643dbeb0c..64bf741b3 100644 --- a/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorRule.java +++ b/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorRule.java @@ -86,6 +86,8 @@ public class BaseSelectorRule extends BuildFileRule { * This is a helper method that takes a selector and calls its * isSelected() method on each file in the testbed. It returns * a string of "T"s amd "F"s + * + * @param selector FileSelector */ public String selectionString(FileSelector selector) { return selectionString(beddir,files,selector); @@ -97,6 +99,8 @@ public class BaseSelectorRule extends BuildFileRule { * variation is used for dependency checks and to get around the * limitations in the touch task when running JDK 1.1. It returns * a string of "T"s amd "F"s. + * + * @param selector FileSelector */ public String mirrorSelectionString(FileSelector selector) { return selectionString(mirrordir, mirrorfiles, selector); @@ -106,6 +110,10 @@ public class BaseSelectorRule extends BuildFileRule { * Worker method for the two convenience methods above. Applies a * selector on a set of files passed in and returns a string of * "T"s and "F"s from applying the selector to each file. + * + * @param basedir File + * @param files File[] + * @param selector FileSelector */ public String selectionString(File basedir, File[] files, FileSelector selector) { StringBuilder buf = new StringBuilder(); diff --git a/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorTest.java b/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorTest.java index e9c0e9903..34c135a1b 100644 --- a/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorTest.java @@ -113,6 +113,8 @@ public abstract class BaseSelectorTest extends BuildFileTest { * This is a helper method that takes a selector and calls its * isSelected() method on each file in the testbed. It returns * a string of "T"s amd "F"s + * + * @param selector FileSelector */ public String selectionString(FileSelector selector) { return selectionString(beddir,files,selector); @@ -124,6 +126,8 @@ public abstract class BaseSelectorTest extends BuildFileTest { * variation is used for dependency checks and to get around the * limitations in the touch task when running JDK 1.1. It returns * a string of "T"s amd "F"s. + * + * @param selector FileSelector */ public String mirrorSelectionString(FileSelector selector) { return selectionString(mirrordir,mirrorfiles,selector); @@ -133,6 +137,10 @@ public abstract class BaseSelectorTest extends BuildFileTest { * Worker method for the two convenience methods above. Applies a * selector on a set of files passed in and returns a string of * "T"s amd "F"s from applying the selector to each file. + * + * @param basedir File + * @param files File[] + * @param selector FileSelector */ public String selectionString(File basedir, File[] files, FileSelector selector) { StringBuilder buf = new StringBuilder(); @@ -150,6 +158,7 @@ public abstract class BaseSelectorTest extends BuildFileTest { * Does the selection test for a given selector and prints the * filenames of the differing files (selected but shouldn't, * not selected but should). + * * @param selector The selector to test * @param expected The expected result */ @@ -161,12 +170,13 @@ public abstract class BaseSelectorTest extends BuildFileTest { } /** - * Checks which files are selected and shouldn't be or which - * are not selected but should. - * @param expected String containing 'F's and 'T's - * @param result String containing 'F's and 'T's - * @return Difference as String containing '-' (equal) and - * 'X' (difference). + * Checks which files are selected and shouldn't be or which + * are not selected but should. + * + * @param expected String containing 'F's and 'T's + * @param result String containing 'F's and 'T's + * @return Difference as String containing '-' (equal) and + * 'X' (difference). */ public String diff(String expected, String result) { int length1 = expected.length(); @@ -184,6 +194,7 @@ public abstract class BaseSelectorTest extends BuildFileTest { /** * Resolves a diff-String (@see diff()) against the (inherited) filenames- * and files arrays. + * * @param filelist Diff-String * @return String containing the filenames for all differing files, * separated with semicolons ';' @@ -204,10 +215,10 @@ public abstract class BaseSelectorTest extends BuildFileTest { /** - *

      Creates a testbed. We avoid the dreaded "test" word so that we + * Creates a testbed. We avoid the dreaded "test" word so that we * don't falsely identify this as a test to be run. The actual * setting up of the testbed is done in the - * src/etc/testcases/types/selectors.xml build file.

      + * src/etc/testcases/types/selectors.xml build file. * *

      Note that the right way to call this is within a try block, * with a finally clause that calls cleanupBed(). You place tests of @@ -232,7 +243,7 @@ public abstract class BaseSelectorTest extends BuildFileTest { /** - *

      Creates a mirror of the testbed for use in dependency checks.

      + * Creates a mirror of the testbed for use in dependency checks. * *

      Note that the right way to call this is within a try block, * with a finally clause that calls cleanupMirror(). You place tests of diff --git a/src/tests/junit/org/apache/tools/ant/types/selectors/ContainsSelectorTest.java b/src/tests/junit/org/apache/tools/ant/types/selectors/ContainsSelectorTest.java index e964e8438..1b19c053d 100644 --- a/src/tests/junit/org/apache/tools/ant/types/selectors/ContainsSelectorTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/selectors/ContainsSelectorTest.java @@ -72,7 +72,6 @@ public class ContainsSelectorTest { ContainsSelector s; String results; - s = new ContainsSelector(); s.setText("no such string in test files"); results = selectorRule.selectionString(s); @@ -106,9 +105,6 @@ public class ContainsSelectorTest { s.setIgnorewhitespace(true); results = selectorRule.selectionString(s); assertEquals("TFFFTFFFFFFT", results); - - - } } diff --git a/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java b/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java index 92c0b948d..bac48958a 100644 --- a/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java @@ -71,13 +71,9 @@ public class ModifiedSelectorTest { // ===================== attributes ===================== - /** Path where the testclasses are. */ private Path testclasses = null; - - - // ===================== JUnit stuff ===================== @@ -88,11 +84,9 @@ public class ModifiedSelectorTest { testclasses = new Path(prj, prj.getProperty("build.tests.value")); } - // ======= testcases for the attributes and nested elements of the selector ===== - - /** Test right use of cache names. */ + /** Test correct use of cache names. */ @Test public void testValidateWrongCache() { String name = "this-is-not-a-valid-cache-name"; @@ -106,8 +100,7 @@ public class ModifiedSelectorTest { } } - - /** Test right use of cache names. */ + /** Test correct use of cache names. */ @Test public void testValidateWrongAlgorithm() { String name = "this-is-not-a-valid-algorithm-name"; @@ -122,8 +115,7 @@ public class ModifiedSelectorTest { } } - - /** Test right use of comparator names. */ + /** Test correct use of comparator names. */ @Test public void testValidateWrongComparator() { String name = "this-is-not-a-valid-comparator-name"; @@ -138,7 +130,7 @@ public class ModifiedSelectorTest { } } - + /** Test correct use of algorithm names. */ @Test public void testIllegalCustomAlgorithm() { try { @@ -152,7 +144,7 @@ public class ModifiedSelectorTest { } } - + /** Test correct use of algorithm names. */ @Test public void testNonExistentCustomAlgorithm() { try { @@ -178,12 +170,12 @@ public class ModifiedSelectorTest { assertTrue("Wrong algorithm used: " + algo, algo.startsWith("MockAlgorithm")); } - @Test public void testCustomClasses() { Assume.assumeNotNull("Ant home not set", selectorRule.getProject().getProperty("ant.home")); BFT bft = new BFT(); bft.setUp(); + // don't catch the JUnit exceptions try { // do the actions bft.doTarget("modifiedselectortest-customClasses"); @@ -198,7 +190,6 @@ public class ModifiedSelectorTest { assertNotNull("'fs.mod.value' must be set.", fsModValue); // must be empty according to the Mock* implementations assertTrue("'fs.mod.value' must be empty.", "".equals(fsModValue)); - // don't catch the JUnit exceptions } finally { bft.doTarget("modifiedselectortest-scenario-clean"); bft.deletePropertiesfile(); @@ -206,25 +197,21 @@ public class ModifiedSelectorTest { } } - @Test public void testDelayUpdateTaskFinished() { doDelayUpdateTest(1); } - @Test public void testDelayUpdateTargetFinished() { doDelayUpdateTest(2); } - @Test public void testDelayUpdateBuildFinished() { doDelayUpdateTest(3); } - public void doDelayUpdateTest(int kind) { // no check for 1<=kind<=3 - only internal use therefore check it // while development @@ -273,11 +260,9 @@ public class ModifiedSelectorTest { break; } assertTrue("Cache must be saved after " + kinds[kind - 1] + "Finished-Event.", cache.saved); - // MockCache doesn't create a file - therefore no cleanup needed } - /** * Extracts the real used algorithm name from the ModifiedSelector using * its toString() method. @@ -308,10 +293,8 @@ public class ModifiedSelectorTest { return algo; } - // ================ testcases for the cache implementations ================ - /** * Propertycache must have a set 'cachefile' attribute. * The default in ModifiedSelector "cache.properties" is set by the selector. @@ -323,7 +306,6 @@ public class ModifiedSelectorTest { fail("PropertyfilesCache does not check its configuration."); } - @Test public void testPropertyfileCache() { PropertiesfileCache cache = new PropertiesfileCache(); @@ -333,7 +315,6 @@ public class ModifiedSelectorTest { assertFalse("Cache file not deleted.", cachefile.exists()); } - /** Checks whether a cache file is created. */ @Test public void testCreatePropertiesCacheDirect() { @@ -351,7 +332,6 @@ public class ModifiedSelectorTest { assertFalse("Cachefile not deleted.", cachefile.exists()); } - /** Checks whether a cache file is created. */ @Test public void testCreatePropertiesCacheViaModifiedSelector() { @@ -373,10 +353,8 @@ public class ModifiedSelectorTest { // evaluate correctness assertTrue("Cache file is not created.", cachefile.exists()); cachefile.delete(); - } - /** * In earlier implementations there were problems with the order * of the s. The scenario was

      @@ -405,17 +383,14 @@ public class ModifiedSelectorTest {
               // evaluate correctness
               assertTrue("Cache file is not created.", cachefile.exists());
               cachefile.delete();
      -
           }
       
      -
           @Test
           @Ignore("same logic as on algorithm, no testcases created")
           public void testCustomCache() {
               // same logic as on algorithm, no testcases created
           }
       
      -
           /**
            * Test the interface semantic of Caches.
            * This method does some common test for cache implementations.
      @@ -459,17 +434,14 @@ public class ModifiedSelectorTest {
               assertFalse("Cache is not empty", it3.hasNext());
           }
       
      -
           // ==============  testcases for the algorithm implementations  ==============
       
      -
           @Test
           public void testHashvalueAlgorithm() {
               HashvalueAlgorithm algo = new HashvalueAlgorithm();
               doTest(algo);
           }
       
      -
           @Test
           public void testDigestAlgorithmMD5() {
               DigestAlgorithm algo = new DigestAlgorithm();
      @@ -477,7 +449,6 @@ public class ModifiedSelectorTest {
               doTest(algo);
           }
       
      -
           @Test
           public void testDigestAlgorithmSHA() {
               DigestAlgorithm algo = new DigestAlgorithm();
      @@ -485,14 +456,12 @@ public class ModifiedSelectorTest {
               doTest(algo);
           }
       
      -
           @Test
           public void testChecksumAlgorithm() {
               ChecksumAlgorithm algo = new ChecksumAlgorithm();
               doTest(algo);
           }
       
      -
           @Test
           public void testChecksumAlgorithmCRC() {
               ChecksumAlgorithm algo = new ChecksumAlgorithm();
      @@ -500,7 +469,6 @@ public class ModifiedSelectorTest {
               doTest(algo);
           }
       
      -
           @Test
           public void testChecksumAlgorithmAdler() {
               ChecksumAlgorithm algo = new ChecksumAlgorithm();
      @@ -508,7 +476,6 @@ public class ModifiedSelectorTest {
               doTest(algo);
           }
       
      -
           /**
            * Test the interface semantic of Algorithms.
            * This method does some common test for algorithm implementations.
      @@ -769,7 +736,6 @@ public class ModifiedSelectorTest {
               }
           }
       
      -
           /**
            * This scenario is based on scenario 1, but does not use any
            * default value and its based on <custom> selector. Used values are:
      @@ -836,28 +802,24 @@ public class ModifiedSelectorTest {
               }
           }
       
      -
           @Test
           public void testScenarioCoreSelectorDefaults() {
               Assume.assumeNotNull("Ant home not set", selectorRule.getProject().getProperty("ant.home"));
               doScenarioTest("modifiedselectortest-scenario-coreselector-defaults", "cache.properties");
           }
       
      -
           @Test
           public void testScenarioCoreSelectorSettings() {
               Assume.assumeNotNull("Ant home not set", selectorRule.getProject().getProperty("ant.home"));
               doScenarioTest("modifiedselectortest-scenario-coreselector-settings", "core.cache.properties");
           }
       
      -
           @Test
           public void testScenarioCustomSelectorSettings() {
               Assume.assumeNotNull("Ant home not set", selectorRule.getProject().getProperty("ant.home"));
               doScenarioTest("modifiedselectortest-scenario-customselector-settings", "core.cache.properties");
           }
       
      -
           public void doScenarioTest(String target, String cachefilename) {
               BFT bft = new BFT();
               bft.setUp();
      @@ -886,10 +848,8 @@ public class ModifiedSelectorTest {
               }
           }
       
      -
           //  =====================  helper methods and classes  ====================
       
      -
           /**
            * Creates a configured parameter object.
            * @param name   name of the parameter
      @@ -903,7 +863,6 @@ public class ModifiedSelectorTest {
               return p;
           }
       
      -
           /**
            * The BFT class wrapps the selector test-builfile inside an
            * ant project. It supports target execution
      @@ -916,20 +875,17 @@ public class ModifiedSelectorTest {
       
               boolean isConfigured = false;
       
      -
               public void setUp() {
                   super.configureProject(buildfile);
                   isConfigured = true;
               }
       
      -
               /**
                * This stub teardown is here because the outer class needs to call the
                * tearDown method, and in the superclass it is protected.
                */
               public void tearDown() {
                   super.after();
      -
               }
       
               public void doTarget(String target) {
      @@ -1067,5 +1023,4 @@ public class ModifiedSelectorTest {
               return sb.toString();
           }
       
      -
       }
      diff --git a/src/tests/junit/org/apache/tools/ant/types/selectors/SizeSelectorTest.java b/src/tests/junit/org/apache/tools/ant/types/selectors/SizeSelectorTest.java
      index 23ba36fd5..467b42a31 100644
      --- a/src/tests/junit/org/apache/tools/ant/types/selectors/SizeSelectorTest.java
      +++ b/src/tests/junit/org/apache/tools/ant/types/selectors/SizeSelectorTest.java
      @@ -19,6 +19,7 @@
       package org.apache.tools.ant.types.selectors;
       
       import java.util.Locale;
      +
       import org.apache.tools.ant.BuildException;
       import org.apache.tools.ant.types.Parameter;
       import org.junit.Rule;
      diff --git a/src/tests/junit/org/apache/tools/ant/util/DeweyDecimalTest.java b/src/tests/junit/org/apache/tools/ant/util/DeweyDecimalTest.java
      index ad1f8e0fc..e8e8cbd5c 100644
      --- a/src/tests/junit/org/apache/tools/ant/util/DeweyDecimalTest.java
      +++ b/src/tests/junit/org/apache/tools/ant/util/DeweyDecimalTest.java
      @@ -26,7 +26,8 @@ import org.junit.Test;
       
       public class DeweyDecimalTest {
       
      -    @Test public void parse() {
      +    @Test
      +    public void parse() {
               assertEquals("1.2.3", new DeweyDecimal("1.2.3").toString());
           }
       
      diff --git a/src/tests/junit/org/apache/tools/ant/util/LayoutPreservingPropertiesTest.java b/src/tests/junit/org/apache/tools/ant/util/LayoutPreservingPropertiesTest.java
      index 48c52b3f9..4309098f8 100644
      --- a/src/tests/junit/org/apache/tools/ant/util/LayoutPreservingPropertiesTest.java
      +++ b/src/tests/junit/org/apache/tools/ant/util/LayoutPreservingPropertiesTest.java
      @@ -20,8 +20,8 @@ package org.apache.tools.ant.util;
       import java.io.File;
       import java.io.FileInputStream;
       import java.io.FileOutputStream;
      -import java.io.InputStreamReader;
       import java.io.IOException;
      +import java.io.InputStreamReader;
       import java.util.Properties;
       
       import org.junit.Test;
      diff --git a/src/tests/junit/org/apache/tools/ant/util/LineOrientedOutputStreamTest.java b/src/tests/junit/org/apache/tools/ant/util/LineOrientedOutputStreamTest.java
      index d4b417df9..68a81648a 100644
      --- a/src/tests/junit/org/apache/tools/ant/util/LineOrientedOutputStreamTest.java
      +++ b/src/tests/junit/org/apache/tools/ant/util/LineOrientedOutputStreamTest.java
      @@ -135,6 +135,7 @@ public class LineOrientedOutputStreamTest {
       
           private class DummyStream extends LineOrientedOutputStream {
               private boolean invoked;
      +
               protected void processLine(String line) {
                   assertFalse("Only one line", invoked);
                   assertEquals(LINE, line);
      @@ -144,6 +145,7 @@ public class LineOrientedOutputStreamTest {
               private void assertInvoked() {
                   assertTrue("At least one line", invoked);
               }
      +
               private void assertNotInvoked() {
                   assertTrue("No output", !invoked);
               }
      diff --git a/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaOroMatcherTest.java b/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaOroMatcherTest.java
      index d1405f4ad..c05ea2244 100644
      --- a/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaOroMatcherTest.java
      +++ b/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaOroMatcherTest.java
      @@ -28,8 +28,4 @@ public class JakartaOroMatcherTest extends RegexpMatcherTest {
               return new JakartaOroMatcher();
           }
       
      -    public JakartaOroMatcherTest(String name) {
      -        super(name);
      -    }
      -
       }
      diff --git a/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaOroRegexpTest.java b/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaOroRegexpTest.java
      index e869c62e1..ae82f7553 100644
      --- a/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaOroRegexpTest.java
      +++ b/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaOroRegexpTest.java
      @@ -28,8 +28,4 @@ public class JakartaOroRegexpTest extends RegexpTest {
               return new JakartaOroRegexp();
           }
       
      -    public JakartaOroRegexpTest(String name) {
      -        super(name);
      -    }
      -
       }
      diff --git a/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaRegexpMatcherTest.java b/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaRegexpMatcherTest.java
      index b93beb3a7..ce42c8cbf 100644
      --- a/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaRegexpMatcherTest.java
      +++ b/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaRegexpMatcherTest.java
      @@ -20,7 +20,9 @@ package org.apache.tools.ant.util.regexp;
       
       import java.io.IOException;
       
      -import junit.framework.AssertionFailedError;
      +import org.junit.Test;
      +
      +import static org.junit.Assert.fail;
       
       /**
        * Tests for the jakarta-regexp implementation of the RegexpMatcher interface.
      @@ -32,30 +34,27 @@ public class JakartaRegexpMatcherTest extends RegexpMatcherTest {
               return new JakartaRegexpMatcher();
           }
       
      -    public JakartaRegexpMatcherTest(String name) {
      -        super(name);
      -    }
      -
      +    @Test
           public void testWindowsLineSeparator2() throws IOException {
               try {
                   super.testWindowsLineSeparator2();
                   fail("Should trigger when this bug is fixed. {@since 1.2}");
      -        } catch (AssertionFailedError e) {
      +        } catch (AssertionError e) {
               }
           }
       
           /**
            * Fails for the same reason as "default" mode in doEndTest2.
            */
      +    @Test
           public void testUnixLineSeparator() throws IOException {
               try {
                   super.testUnixLineSeparator();
                   fail("Should trigger once this bug is fixed. {@since 1.2}");
      -        } catch (AssertionFailedError e) {
      +        } catch (AssertionError e) {
               }
           }
       
      -
           /**
            * Fails for "default" mode.
            */
      diff --git a/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaRegexpRegexpTest.java b/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaRegexpRegexpTest.java
      index 8edc13c87..4937ff4e5 100644
      --- a/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaRegexpRegexpTest.java
      +++ b/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaRegexpRegexpTest.java
      @@ -20,7 +20,9 @@ package org.apache.tools.ant.util.regexp;
       
       import java.io.IOException;
       
      -import junit.framework.AssertionFailedError;
      +import org.junit.Test;
      +
      +import static org.junit.Assert.fail;
       
       /**
        * Tests for the jakarta-regexp implementation of the Regexp interface.
      @@ -32,26 +34,24 @@ public class JakartaRegexpRegexpTest extends RegexpTest {
               return new JakartaRegexpRegexp();
           }
       
      -    public JakartaRegexpRegexpTest(String name) {
      -        super(name);
      -    }
      -
      +    @Test
           public void testWindowsLineSeparator2() throws IOException {
               try {
                   super.testWindowsLineSeparator2();
                   fail("Should trigger when this bug is fixed. {@since 1.2}");
      -        } catch (AssertionFailedError e) {
      +        } catch (AssertionError e) {
               }
           }
       
           /**
            * Fails for the same reason as "default" mode in doEndTest2.
            */
      +    @Test
           public void testUnixLineSeparator() throws IOException {
               try {
                   super.testUnixLineSeparator();
                   fail("Should trigger once this bug is fixed. {@since 1.2}");
      -        } catch (AssertionFailedError e) {
      +        } catch (AssertionError e) {
               }
           }
       
      diff --git a/src/tests/junit/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcherTest.java b/src/tests/junit/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcherTest.java
      index 40f6dcaf5..5a5f1d2a6 100644
      --- a/src/tests/junit/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcherTest.java
      +++ b/src/tests/junit/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcherTest.java
      @@ -20,7 +20,9 @@ package org.apache.tools.ant.util.regexp;
       
       import java.io.IOException;
       
      -import junit.framework.AssertionFailedError;
      +import org.junit.Test;
      +
      +import static org.junit.Assert.fail;
       
       /**
        * Tests for the JDK 1.4 implementation of the RegexpMatcher interface.
      @@ -32,39 +34,39 @@ public class Jdk14RegexpMatcherTest extends RegexpMatcherTest {
               return new Jdk14RegexpMatcher();
           }
       
      -    public Jdk14RegexpMatcherTest(String name) {
      -        super(name);
      -    }
      -
      +    @Test
           public void testParagraphCharacter() throws IOException {
               try {
                   super.testParagraphCharacter();
                   fail("Should trigger once fixed. {@since JDK 1.4RC1}");
      -        } catch (AssertionFailedError e) {
      +        } catch (AssertionError e) {
               }
           }
       
      +    @Test
           public void testLineSeparatorCharacter() throws IOException {
               try {
                   super.testLineSeparatorCharacter();
                   fail("Should trigger once fixed. {@since JDK 1.4RC1}");
      -        } catch (AssertionFailedError e) {
      +        } catch (AssertionError e) {
               }
           }
       
      +    @Test
           public void testStandaloneCR() throws IOException {
               try {
                   super.testStandaloneCR();
                   fail("Should trigger once fixed. {@since JDK 1.4RC1}");
      -        } catch (AssertionFailedError e) {
      +        } catch (AssertionError e) {
               }
           }
       
      +    @Test
           public void testWindowsLineSeparator() throws IOException {
               try {
                   super.testWindowsLineSeparator();
                   fail("Should trigger once fixed. {@since JDK 1.4RC1}");
      -        } catch (AssertionFailedError e) {
      +        } catch (AssertionError e) {
               }
           }
       }
      diff --git a/src/tests/junit/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexpTest.java b/src/tests/junit/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexpTest.java
      index 5f5342ea8..67b69aa3a 100644
      --- a/src/tests/junit/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexpTest.java
      +++ b/src/tests/junit/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexpTest.java
      @@ -20,7 +20,9 @@ package org.apache.tools.ant.util.regexp;
       
       import java.io.IOException;
       
      -import junit.framework.AssertionFailedError;
      +import org.junit.Test;
      +
      +import static org.junit.Assert.fail;
       
       /**
        * Tests for the JDK 1.4 implementation of the Regexp interface.
      @@ -32,39 +34,39 @@ public class Jdk14RegexpRegexpTest extends RegexpTest {
               return new Jdk14RegexpRegexp();
           }
       
      -    public Jdk14RegexpRegexpTest(String name) {
      -        super(name);
      -    }
      -
      +    @Test
           public void testParagraphCharacter() throws IOException {
               try {
                   super.testParagraphCharacter();
                   fail("Should trigger once fixed. {@since JDK 1.4RC1}");
      -        } catch (AssertionFailedError e) {
      +        } catch (AssertionError e) {
               }
           }
       
      +    @Test
           public void testLineSeparatorCharacter() throws IOException {
               try {
                   super.testLineSeparatorCharacter();
                   fail("Should trigger once fixed. {@since JDK 1.4RC1}");
      -        } catch (AssertionFailedError e) {
      +        } catch (AssertionError e) {
               }
           }
       
      +    @Test
           public void testStandaloneCR() throws IOException {
               try {
                   super.testStandaloneCR();
                   fail("Should trigger once fixed. {@since JDK 1.4RC1}");
      -        } catch (AssertionFailedError e) {
      +        } catch (AssertionError e) {
               }
           }
       
      +    @Test
           public void testWindowsLineSeparator() throws IOException {
               try {
                   super.testWindowsLineSeparator();
                   fail("Should trigger once fixed. {@since JDK 1.4RC1}");
      -        } catch (AssertionFailedError e) {
      +        } catch (AssertionError e) {
               }
           }
       
      diff --git a/src/tests/junit/org/apache/tools/ant/util/regexp/RegexpMatcherTest.java b/src/tests/junit/org/apache/tools/ant/util/regexp/RegexpMatcherTest.java
      index 3129e68e3..77dbdac50 100644
      --- a/src/tests/junit/org/apache/tools/ant/util/regexp/RegexpMatcherTest.java
      +++ b/src/tests/junit/org/apache/tools/ant/util/regexp/RegexpMatcherTest.java
      @@ -18,16 +18,21 @@
       
       package org.apache.tools.ant.util.regexp;
       
      +import org.junit.Before;
      +import org.junit.Test;
      +
       import java.io.IOException;
       import java.util.Vector;
       
      -import junit.framework.TestCase;
      +import static org.junit.Assert.assertEquals;
      +import static org.junit.Assert.assertFalse;
      +import static org.junit.Assert.assertTrue;
       
       /**
        * Tests for all implementations of the RegexpMatcher interface.
        *
        */
      -public abstract class RegexpMatcherTest extends TestCase {
      +public abstract class RegexpMatcherTest {
       
           public final static String UNIX_LINE = "\n";
       
      @@ -39,14 +44,12 @@ public abstract class RegexpMatcherTest extends TestCase {
               return reg;
           }
       
      -    public RegexpMatcherTest(String name) {
      -        super(name);
      -    }
      -
      +    @Before
           public void setUp() {
               reg = getImplementation();
           }
       
      +    @Test
           public void testMatches() {
               reg.setPattern("aaaa");
               assertTrue("aaaa should match itself", reg.matches("aaaa"));
      @@ -73,6 +76,7 @@ public abstract class RegexpMatcherTest extends TestCase {
               assertTrue("([0-9]+)=\\1 shouldn\'t match 1=2", !reg.matches("1=2"));
           }
       
      +    @Test
           public void testGroups() {
               reg.setPattern("aaaa");
               Vector v = reg.getGroups("xaaaa");
      @@ -96,6 +100,7 @@ public abstract class RegexpMatcherTest extends TestCase {
               assertEquals("b", (String) v.elementAt(2));
           }
       
      +    @Test
           public void testBugzillaReport14619() {
               reg.setPattern("^(.*)/src/((.*/)*)([a-zA-Z0-9_\\.]+)\\.java$");
               Vector v = reg.getGroups("de/tom/src/Google.java");
      @@ -106,6 +111,7 @@ public abstract class RegexpMatcherTest extends TestCase {
               assertEquals("Google", v.elementAt(4));
           }
       
      +    @Test
           public void testCaseInsensitiveMatch() {
               reg.setPattern("aaaa");
               assertTrue("aaaa doesn't match AAaa", !reg.matches("AAaa"));
      @@ -113,46 +119,52 @@ public abstract class RegexpMatcherTest extends TestCase {
                          reg.matches("AAaa", RegexpMatcher.MATCH_CASE_INSENSITIVE));
           }
       
      +    // make sure there are no issues concerning line separator interpretation
      +    // a line separator for regex (perl) is always a unix line (ie \n)
       
      -// make sure there are no issues concerning line separator interpretation
      -// a line separator for regex (perl) is always a unix line (ie \n)
      -
      +    @Test
           public void testParagraphCharacter() throws IOException {
               reg.setPattern("end of text$");
               assertTrue("paragraph character", !reg.matches("end of text\u2029"));
           }
       
      +    @Test
           public void testLineSeparatorCharacter() throws IOException {
               reg.setPattern("end of text$");
               assertTrue("line-separator character", !reg.matches("end of text\u2028"));
           }
       
      +    @Test
           public void testNextLineCharacter() throws IOException {
               reg.setPattern("end of text$");
               assertTrue("next-line character", !reg.matches("end of text\u0085"));
           }
       
      +    @Test
           public void testStandaloneCR() throws IOException {
               reg.setPattern("end of text$");
               assertTrue("standalone CR", !reg.matches("end of text\r"));
           }
       
      +    @Test
           public void testWindowsLineSeparator() throws IOException {
               reg.setPattern("end of text$");
               assertTrue("Windows line separator", !reg.matches("end of text\r\n"));
           }
       
      +    @Test
           public void testWindowsLineSeparator2() throws IOException {
               reg.setPattern("end of text\r$");
               assertTrue("Windows line separator", reg.matches("end of text\r\n"));
           }
       
      +    @Test
           public void testUnixLineSeparator() throws IOException {
               reg.setPattern("end of text$");
               assertTrue("Unix line separator", reg.matches("end of text\n"));
           }
       
      -
      +    @Test
           public void testMultiVersusSingleLine() throws IOException {
               StringBuilder buf = new StringBuilder();
               buf.append("Line1").append(UNIX_LINE);
      diff --git a/src/tests/junit/org/apache/tools/ant/util/regexp/RegexpTest.java b/src/tests/junit/org/apache/tools/ant/util/regexp/RegexpTest.java
      index 5cfe8c976..08a8416f9 100644
      --- a/src/tests/junit/org/apache/tools/ant/util/regexp/RegexpTest.java
      +++ b/src/tests/junit/org/apache/tools/ant/util/regexp/RegexpTest.java
      @@ -18,6 +18,11 @@
       
       package org.apache.tools.ant.util.regexp;
       
      +import org.junit.Test;
      +
      +import static org.junit.Assert.assertEquals;
      +import static org.junit.Assert.assertTrue;
      +
       /**
        * Tests for all implementations of the Regexp interface.
        *
      @@ -27,16 +32,13 @@ public abstract class RegexpTest extends RegexpMatcherTest {
           private static final String test = "abcdefg-abcdefg";
           private static final String pattern = "ab([^d]*)d([^f]*)f";
       
      -    public RegexpTest(String name) {
      -        super(name);
      -    }
      -
           public final RegexpMatcher getImplementation() {
               return getRegexpImplementation();
           }
       
           public abstract Regexp getRegexpImplementation();
       
      +    @Test
           public void testSubstitution() {
               Regexp reg = (Regexp) getReg();
               reg.setPattern(pattern);
      @@ -45,6 +47,7 @@ public abstract class RegexpTest extends RegexpMatcherTest {
                                                              Regexp.MATCH_DEFAULT));
           }
       
      +    @Test
           public void testReplaceFirstSubstitution() {
               Regexp reg = (Regexp) getReg();
               reg.setPattern(pattern);
      @@ -53,6 +56,7 @@ public abstract class RegexpTest extends RegexpMatcherTest {
                                                              Regexp.REPLACE_FIRST));
           }
       
      +    @Test
           public void testReplaceAllSubstitution() {
               Regexp reg = (Regexp) getReg();
               reg.setPattern(pattern);
      diff --git a/src/tests/junit/org/apache/tools/mail/MailMessageTest.java b/src/tests/junit/org/apache/tools/mail/MailMessageTest.java
      index 9a1aa8c77..cabeef51b 100644
      --- a/src/tests/junit/org/apache/tools/mail/MailMessageTest.java
      +++ b/src/tests/junit/org/apache/tools/mail/MailMessageTest.java
      @@ -175,7 +175,6 @@ public class MailMessageTest {
               assertFalse(testMailClient.getFailMessage(), testMailClient.isFailed());
           }
       
      -
           /**
            *  Test a MailMessage with no to or bcc lines
            * @throws InterruptedException if something goes wrong
      @@ -227,7 +226,6 @@ public class MailMessageTest {
               assertFalse(testMailClient.getFailMessage(), testMailClient.isFailed());
           }
       
      -
           /**
            *  Test a MailMessage with no to or cc lines
            * @throws InterruptedException if something goes wrong
      @@ -278,7 +276,6 @@ public class MailMessageTest {
               assertFalse(testMailClient.getFailMessage(), testMailClient.isFailed());
           }
       
      -
           /**
            *  Test a MailMessage with no subject line
            *  Subject is an optional field (RFC 822 s4.1)
      @@ -329,7 +326,6 @@ public class MailMessageTest {
               assertFalse(testMailClient.getFailMessage(), testMailClient.isFailed());
           }
       
      -
           /**
            *  Test a MailMessage with empty body message
            * @throws InterruptedException if something goes wrong
      @@ -379,7 +375,6 @@ public class MailMessageTest {
               assertFalse(testMailClient.getFailMessage(), testMailClient.isFailed());
           }
       
      -
           /**
            *  Test a MailMessage with US-ASCII character set
            *  The next four testcase can be kinda hard to debug as Ant will often
      @@ -504,7 +499,6 @@ public class MailMessageTest {
                           } else {
                               // sb.append(response + "\r\n");
                           }
      -
                       } // while
                   } catch (IOException ioe) {
                       throw new BuildException(ioe);
      diff --git a/src/tests/junit/org/apache/tools/zip/ExtraFieldUtilsTest.java b/src/tests/junit/org/apache/tools/zip/ExtraFieldUtilsTest.java
      index 15b1b6db6..841a2fc81 100644
      --- a/src/tests/junit/org/apache/tools/zip/ExtraFieldUtilsTest.java
      +++ b/src/tests/junit/org/apache/tools/zip/ExtraFieldUtilsTest.java
      @@ -26,8 +26,7 @@ import static org.junit.Assert.assertTrue;
       import static org.junit.Assert.fail;
       
       /**
      - * JUnit 3 testcases for org.apache.tools.zip.ExtraFieldUtils.
      - *
      + * JUnit 4 testcases for org.apache.tools.zip.ExtraFieldUtils.
        */
       public class ExtraFieldUtilsTest implements UnixStat {
       
      diff --git a/src/tests/junit/org/apache/tools/zip/ZipEntryTest.java b/src/tests/junit/org/apache/tools/zip/ZipEntryTest.java
      index 96bbd45b2..1fd9fd101 100644
      --- a/src/tests/junit/org/apache/tools/zip/ZipEntryTest.java
      +++ b/src/tests/junit/org/apache/tools/zip/ZipEntryTest.java
      @@ -26,8 +26,7 @@ import static org.junit.Assert.assertSame;
       import static org.junit.Assert.fail;
       
       /**
      - * JUnit 3 testcases for org.apache.tools.zip.ZipEntry.
      - *
      + * JUnit 4 testcases for org.apache.tools.zip.ZipEntry.
        */
       public class ZipEntryTest {
       
      diff --git a/src/tests/junit/org/apache/tools/zip/ZipShortTest.java b/src/tests/junit/org/apache/tools/zip/ZipShortTest.java
      index a6aa3e78b..0e3cf2868 100644
      --- a/src/tests/junit/org/apache/tools/zip/ZipShortTest.java
      +++ b/src/tests/junit/org/apache/tools/zip/ZipShortTest.java
      @@ -25,8 +25,7 @@ import static org.junit.Assert.assertNotSame;
       import static org.junit.Assert.assertTrue;
       
       /**
      - * JUnit 3 testcases for org.apache.tools.zip.ZipShort.
      - *
      + * JUnit 4 testcases for org.apache.tools.zip.ZipShort.
        */
       public class ZipShortTest {
       
      
      From 4796589e815565d9bc93d2c79500bbb01dcd0dd4 Mon Sep 17 00:00:00 2001
      From: Stefan Bodewig 
      Date: Sun, 10 Dec 2017 08:47:19 +0100
      Subject: [PATCH 2/3] seems Sun's native2ascii doesn't always close input
       properly on win
      
      ---
       .../taskdefs/optional/native2ascii-test.xml        | 14 ++++++++++----
       1 file changed, 10 insertions(+), 4 deletions(-)
      
      diff --git a/src/tests/antunit/taskdefs/optional/native2ascii-test.xml b/src/tests/antunit/taskdefs/optional/native2ascii-test.xml
      index 560ead30f..8eff37c66 100644
      --- a/src/tests/antunit/taskdefs/optional/native2ascii-test.xml
      +++ b/src/tests/antunit/taskdefs/optional/native2ascii-test.xml
      @@ -18,6 +18,11 @@
       
         
       
      +  
      +    
      +  
      +
         
           
           
       
         
      -    
      +    
      +    
           
      -    äöü=ÄÖÜ
      +    äöü=ÄÖÜ
           
         
      @@ -98,14 +104,14 @@ public class Adapter implements Native2AsciiAdapter {
         
      -    
      +    
           
         
       
         
      -    
      +    
           
         
      
      From 168b405e3e27fe1d2f55bfa14c3ce1cc5d9d58c4 Mon Sep 17 00:00:00 2001
      From: Stefan Bodewig 
      Date: Sun, 10 Dec 2017 08:52:30 +0100
      Subject: [PATCH 3/3] make sure stream is close so file can be deleted on
       windows
      
      ---
       src/tests/junit/org/apache/tools/ant/taskdefs/CopyTest.java | 6 +++++-
       1 file changed, 5 insertions(+), 1 deletion(-)
      
      diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/CopyTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/CopyTest.java
      index fc03f28a4..f7780e3bf 100644
      --- a/src/tests/junit/org/apache/tools/ant/taskdefs/CopyTest.java
      +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/CopyTest.java
      @@ -222,11 +222,15 @@ public class CopyTest {
               buildRule.executeTarget("testFileResourceWithFilter");
               File file1 = new File(buildRule.getProject().getProperty("to.dir") + "/fileNR.txt");
               assertTrue(file1.exists());
      +        FileReader f = null;
               try {
      -            String file1Content = FileUtils.readFully(new FileReader(file1));
      +            f = new FileReader(file1);
      +            String file1Content = FileUtils.readFully(f);
                   assertEquals("This is file 42", file1Content);
               } catch (IOException e) {
                   // no-op: not a real business error
      +        } finally {
      +            FileUtils.close(f);
               }
           }
       
      
      Memory usage by blocksize
      Memory usage by blocksize
      Blocksize Compression
      - * memory usage
      Decompression
      - * memory usage
      BlocksizeCompression
      memory usage
      Decompression
      memory usage
      100k