More code cleanup Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/6c92f32e Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/6c92f32e Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/6c92f32e
Branch: refs/heads/master Commit: 6c92f32eda9effab1a3641c887538590e13da3c9 Parents: fbbf092 Author: twogee <[email protected]> Authored: Sat May 27 16:53:01 2017 +0200 Committer: twogee <[email protected]> Committed: Sat May 27 19:37:44 2017 +0200 ---------------------------------------------------------------------- ivy.xml | 1 - src/java/org/apache/ivy/Ivy.java | 16 +- src/java/org/apache/ivy/Main.java | 5 +- .../org/apache/ivy/ant/AntBuildTrigger.java | 9 +- src/java/org/apache/ivy/ant/AntCallTrigger.java | 2 +- .../org/apache/ivy/ant/AntMessageLogger.java | 8 +- src/java/org/apache/ivy/ant/IvyAntSettings.java | 8 +- .../apache/ivy/ant/IvyAntVariableContainer.java | 4 +- .../org/apache/ivy/ant/IvyArtifactReport.java | 10 +- src/java/org/apache/ivy/ant/IvyBuildList.java | 8 +- .../org/apache/ivy/ant/IvyCacheFileset.java | 2 +- src/java/org/apache/ivy/ant/IvyCachePath.java | 2 +- src/java/org/apache/ivy/ant/IvyCacheTask.java | 2 +- src/java/org/apache/ivy/ant/IvyCleanCache.java | 2 +- src/java/org/apache/ivy/ant/IvyConflict.java | 6 +- src/java/org/apache/ivy/ant/IvyDeliver.java | 4 +- .../org/apache/ivy/ant/IvyDependencyTree.java | 2 +- .../ivy/ant/IvyDependencyUpdateChecker.java | 5 +- .../apache/ivy/ant/IvyExtractFromSources.java | 4 +- src/java/org/apache/ivy/ant/IvyInstall.java | 6 +- .../org/apache/ivy/ant/IvyPostResolveTask.java | 14 +- src/java/org/apache/ivy/ant/IvyPublish.java | 6 +- src/java/org/apache/ivy/ant/IvyReport.java | 6 +- .../org/apache/ivy/ant/IvyRepositoryReport.java | 2 +- src/java/org/apache/ivy/ant/IvyResolve.java | 6 +- src/java/org/apache/ivy/ant/IvyRetrieve.java | 2 +- src/java/org/apache/ivy/ant/IvyTask.java | 10 +- src/java/org/apache/ivy/ant/PackageMapping.java | 2 +- src/java/org/apache/ivy/core/IvyContext.java | 1 + .../org/apache/ivy/core/IvyPatternHelper.java | 21 +-- src/java/org/apache/ivy/core/IvyThread.java | 2 +- .../apache/ivy/core/RelativeUrlResolver.java | 8 +- .../apache/ivy/core/cache/ArtifactOrigin.java | 14 +- .../cache/DefaultRepositoryCacheManager.java | 39 ++-- .../cache/DefaultResolutionCacheManager.java | 2 +- .../core/cache/ModuleDescriptorMemoryCache.java | 4 +- .../ivy/core/cache/ParserSettingsMonitor.java | 6 +- .../ivy/core/cache/RepositoryCacheManager.java | 187 ++++++++----------- .../apache/ivy/core/deliver/DeliverOptions.java | 4 +- .../PublishingDependencyRevisionResolver.java | 8 +- .../org/apache/ivy/core/event/IvyEvent.java | 4 +- .../apache/ivy/core/event/IvyEventFilter.java | 5 +- .../event/publish/EndArtifactPublishEvent.java | 1 + .../publish/StartArtifactPublishEvent.java | 1 + .../apache/ivy/core/install/InstallEngine.java | 4 +- .../descriptor/AbstractIncludeExcludeRule.java | 2 +- .../core/module/descriptor/Configuration.java | 7 +- .../module/descriptor/ConfigurationGroup.java | 2 +- .../DefaultDependencyArtifactDescriptor.java | 12 +- .../descriptor/DefaultDependencyDescriptor.java | 15 +- .../descriptor/DefaultExtendsDescriptor.java | 5 +- .../descriptor/DefaultModuleDescriptor.java | 16 +- .../module/descriptor/DependencyDescriptor.java | 6 +- .../ivy/core/module/descriptor/ExcludeRule.java | 4 +- .../ivy/core/module/descriptor/IncludeRule.java | 6 +- .../module/descriptor/ModuleDescriptor.java | 47 ++--- .../ivy/core/module/id/MatcherLookup.java | 2 +- .../org/apache/ivy/core/module/id/ModuleId.java | 2 +- .../ivy/core/module/id/ModuleRevisionId.java | 18 +- .../ivy/core/module/status/StatusManager.java | 2 +- .../apache/ivy/core/pack/OsgiBundlePacking.java | 3 +- .../apache/ivy/core/pack/PackagingManager.java | 4 +- .../org/apache/ivy/core/pack/ZipPacking.java | 3 +- .../apache/ivy/core/publish/PublishEngine.java | 10 +- .../core/report/ConfigurationResolveReport.java | 10 +- .../apache/ivy/core/report/ResolveReport.java | 7 +- .../repository/RepositoryManagementEngine.java | 2 +- .../org/apache/ivy/core/resolve/IvyNode.java | 21 ++- .../apache/ivy/core/resolve/IvyNodeCallers.java | 20 +- .../ivy/core/resolve/IvyNodeEviction.java | 14 +- .../apache/ivy/core/resolve/IvyNodeUsage.java | 12 +- .../apache/ivy/core/resolve/ResolveData.java | 6 +- .../apache/ivy/core/resolve/ResolveEngine.java | 21 +-- .../apache/ivy/core/resolve/ResolveOptions.java | 4 +- .../core/resolve/ResolveProcessException.java | 1 + .../core/resolve/ResolvedModuleRevision.java | 5 +- .../ivy/core/resolve/RestartResolveProcess.java | 1 + .../org/apache/ivy/core/resolve/VisitNode.java | 33 ++-- .../ivy/core/retrieve/RetrieveEngine.java | 8 +- .../ivy/core/retrieve/RetrieveOptions.java | 2 +- .../apache/ivy/core/search/SearchEngine.java | 13 +- .../apache/ivy/core/settings/IvySettings.java | 32 ++-- .../ivy/core/settings/XmlSettingsParser.java | 19 +- .../core/sort/CollectionOfModulesToSort.java | 6 +- .../org/apache/ivy/core/sort/ModuleInSort.java | 9 +- .../core/sort/NonMatchingVersionReporter.java | 2 +- .../apache/ivy/osgi/core/BundleInfoAdapter.java | 8 +- .../apache/ivy/osgi/core/ManifestParser.java | 15 +- .../ivy/osgi/core/OSGiManifestParser.java | 7 +- .../ivy/osgi/core/OsgiLatestStrategy.java | 11 +- .../ivy/osgi/core/jvm-packages.properties | 2 +- .../ivy/osgi/filter/OSGiFilterParser.java | 4 +- .../org/apache/ivy/osgi/obr/OBRResolver.java | 2 +- .../ivy/osgi/obr/xml/CapabilityAdapter.java | 3 +- .../apache/ivy/osgi/obr/xml/OBRXMLParser.java | 39 ++-- .../ivy/osgi/obr/xml/RequirementAdapter.java | 11 +- .../obr/xml/UnsupportedFilterException.java | 1 + .../apache/ivy/osgi/p2/P2ArtifactParser.java | 20 +- .../apache/ivy/osgi/p2/P2CompositeParser.java | 4 +- .../org/apache/ivy/osgi/p2/P2Descriptor.java | 4 +- .../apache/ivy/osgi/p2/P2MetadataParser.java | 103 +++++----- .../apache/ivy/osgi/p2/PropertiesParser.java | 2 +- .../osgi/repo/AbstractFSManifestIterable.java | 2 +- .../ivy/osgi/repo/AbstractOSGiResolver.java | 18 +- .../repo/ArtifactReportManifestIterable.java | 5 +- .../ivy/osgi/repo/FSManifestIterable.java | 14 +- .../ivy/osgi/repo/ModuleDescriptorWrapper.java | 6 +- .../ivy/osgi/repo/RelativeURLRepository.java | 2 +- .../osgi/repo/RepositoryManifestIterable.java | 4 +- .../ivy/osgi/updatesite/UpdateSiteResolver.java | 6 +- .../updatesite/xml/EclipseUpdateSiteParser.java | 28 ++- .../ivy/osgi/updatesite/xml/FeatureParser.java | 56 ++---- .../ivy/osgi/updatesite/xml/UpdateSite.java | 2 + .../updatesite/xml/UpdateSiteDigestParser.java | 2 +- .../apache/ivy/osgi/util/DelegatingHandler.java | 11 +- src/java/org/apache/ivy/osgi/util/Version.java | 50 ++--- .../org/apache/ivy/osgi/util/VersionRange.java | 26 +-- .../circular/CircularDependencyException.java | 3 +- .../circular/CircularDependencyHelper.java | 2 +- .../circular/CircularDependencyStrategy.java | 2 +- .../LatestCompatibleConflictManager.java | 6 +- .../plugins/conflict/LatestConflictManager.java | 7 +- .../plugins/conflict/RegexpConflictManager.java | 2 +- .../conflict/StrictConflictException.java | 1 + .../ivy/plugins/latest/LatestStrategy.java | 8 +- .../ivy/plugins/lock/FileBasedLockStrategy.java | 1 + .../ivy/plugins/matcher/GlobPatternMatcher.java | 5 +- .../plugins/matcher/RegexpPatternMatcher.java | 2 +- .../parser/AbstractModuleDescriptorParser.java | 36 ++-- .../parser/m2/PomModuleDescriptorBuilder.java | 12 +- .../parser/m2/PomModuleDescriptorParser.java | 7 +- .../parser/m2/PomModuleDescriptorWriter.java | 1 + .../apache/ivy/plugins/parser/m2/PomReader.java | 10 +- .../parser/xml/XmlModuleDescriptorParser.java | 50 +++-- .../parser/xml/XmlModuleDescriptorUpdater.java | 10 +- .../parser/xml/XmlModuleDescriptorWriter.java | 1 + .../ivy/plugins/report/XmlReportParser.java | 6 +- .../apache/ivy/plugins/repository/Resource.java | 2 +- .../ivy/plugins/repository/TransferEvent.java | 4 +- .../plugins/repository/sftp/SFTPRepository.java | 11 +- .../ssh/AbstractSshBasedRepository.java | 6 +- .../repository/ssh/RemoteScpException.java | 10 +- .../apache/ivy/plugins/repository/ssh/Scp.java | 7 +- .../ivy/plugins/repository/ssh/SshCache.java | 16 +- .../plugins/repository/ssh/SshRepository.java | 11 +- .../ivy/plugins/repository/ssh/SshResource.java | 8 +- .../plugins/repository/url/URLRepository.java | 2 +- .../plugins/repository/vfs/VfsRepository.java | 4 +- .../ivy/plugins/repository/vfs/VfsResource.java | 10 +- .../repository/vsftp/VsftpRepository.java | 13 +- .../resolver/AbstractPatternsBasedResolver.java | 2 +- .../ivy/plugins/resolver/AbstractResolver.java | 15 +- .../resolver/AbstractSshBasedResolver.java | 6 +- .../ivy/plugins/resolver/BasicResolver.java | 28 ++- .../ivy/plugins/resolver/ChainResolver.java | 2 +- .../plugins/resolver/DependencyResolver.java | 2 +- .../plugins/resolver/FileSystemResolver.java | 2 +- .../plugins/resolver/RepositoryResolver.java | 4 +- .../ivy/plugins/resolver/SshResolver.java | 6 +- .../resolver/packager/BuiltFileResource.java | 2 +- .../plugins/resolver/util/ResolverHelper.java | 2 +- .../ivy/plugins/resolver/util/URLLister.java | 4 +- .../plugins/version/AbstractVersionMatcher.java | 4 +- .../plugins/version/ChainVersionMatcher.java | 4 +- .../plugins/version/LatestVersionMatcher.java | 2 +- .../ivy/plugins/version/VersionMatcher.java | 16 +- .../plugins/version/VersionRangeMatcher.java | 2 +- .../org/apache/ivy/util/ChecksumHelper.java | 2 +- .../org/apache/ivy/util/ConfigurationUtils.java | 2 +- .../org/apache/ivy/util/CredentialsUtil.java | 5 +- .../apache/ivy/util/DefaultMessageLogger.java | 2 +- .../apache/ivy/util/EncryptedProperties.java | 65 +++++++ .../org/apache/ivy/util/EncrytedProperties.java | 65 ------- src/java/org/apache/ivy/util/FileResolver.java | 2 +- src/java/org/apache/ivy/util/FileUtil.java | 9 +- src/java/org/apache/ivy/util/MemoryUtil.java | 3 +- src/java/org/apache/ivy/util/MessageLogger.java | 2 +- .../org/apache/ivy/util/PropertiesFile.java | 1 + src/java/org/apache/ivy/util/StringUtils.java | 4 +- src/java/org/apache/ivy/util/XMLHelper.java | 2 +- .../apache/ivy/util/cli/CommandLineParser.java | 1 + .../org/apache/ivy/util/cli/ParseException.java | 1 + .../util/extendable/ExtendableItemHelper.java | 6 +- .../apache/ivy/util/filter/FilterHelper.java | 8 +- .../apache/ivy/util/url/ApacheURLLister.java | 8 +- .../apache/ivy/util/url/BasicURLHandler.java | 1 - .../apache/ivy/util/url/HttpClientHandler.java | 4 +- .../apache/ivy/util/url/IvyAuthenticator.java | 3 +- .../apache/ivy/util/url/URLHandlerRegistry.java | 2 +- test/java/org/apache/ivy/TestHelper.java | 3 +- .../apache/ivy/ant/IvyArtifactPropertyTest.java | 9 +- .../org/apache/ivy/ant/IvyCleanCacheTest.java | 10 +- .../apache/ivy/ant/IvyDependencyTreeTest.java | 4 - .../org/apache/ivy/ant/IvyResourcesTest.java | 9 +- .../DefaultRepositoryCacheManagerTest.java | 14 +- .../core/module/id/ModuleRevisionIdTest.java | 10 +- .../ivy/osgi/core/OSGiManifestParserTest.java | 9 +- .../apache/ivy/osgi/filter/OSGiFilterTest.java | 5 +- .../apache/ivy/osgi/obr/OBRResolverTest.java | 15 +- .../apache/ivy/osgi/obr/OBRXMLWriterTest.java | 2 - .../IgnoreCircularDependencyStrategyTest.java | 7 +- .../WarnCircularDependencyStrategyTest.java | 1 - .../LatestCompatibleConflictManagerTest.java | 7 +- .../conflict/RegexpConflictManagerTest.java | 5 +- .../conflict/StrictConflictManagerTest.java | 5 +- .../matcher/AbstractPatternMatcherTest.java | 7 +- .../ExactOrRegexpPatternMatcherTest.java | 9 +- .../plugins/matcher/GlobPatternMatcherTest.java | 9 +- .../matcher/RegexpPatternMatcherTest.java | 7 +- .../m2/PomModuleDescriptorParserTest.java | 8 +- .../parser/xml/XmlModuleUpdaterTest.java | 13 +- .../plugins/repository/vfs/VfsResourceTest.java | 26 +-- .../apache/ivy/util/IvyPatternHelperTest.java | 5 +- 213 files changed, 962 insertions(+), 1161 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/ivy.xml ---------------------------------------------------------------------- diff --git a/ivy.xml b/ivy.xml index eef5feb..f2f7e86 100644 --- a/ivy.xml +++ b/ivy.xml @@ -57,7 +57,6 @@ <!-- Test dependencies --> <dependency org="junit" name="junit" rev="4.12" conf="test->default"/> <dependency org="org.hamcrest" name="hamcrest-core" rev="1.3" conf="test->default"/> - <dependency org="commons-lang" name="commons-lang" rev="2.6" conf="test->default"/> <dependency org="org.apache.ant" name="ant-testutil" rev="1.9.9" conf="test->default" transitive="false"/> <dependency org="org.apache.ant" name="ant-launcher" rev="1.9.9" conf="test->default" transitive="false"/> <dependency org="ant-contrib" name="ant-contrib" rev="1.0b3" conf="test->default" transitive="false"/> http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/Ivy.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/Ivy.java b/src/java/org/apache/ivy/Ivy.java index fc190ed..1a57ce9 100644 --- a/src/java/org/apache/ivy/Ivy.java +++ b/src/java/org/apache/ivy/Ivy.java @@ -219,7 +219,7 @@ public class Ivy { /** * True if this instance of Ivy has already been bound to its dependencies, false otherwise. * - * @see bind() + * @see #bind() */ private boolean bound; @@ -358,8 +358,8 @@ public class Ivy { * * </p> * - * @param callback - * @return + * @param callback IvyCallback + * @return Object */ public Object execute(IvyCallback callback) { pushContext(); @@ -545,6 +545,7 @@ public class Ivy { // RETRIEVE // /////////////////////////////////////////////////////////////////////// + @SuppressWarnings("deprecation") public int retrieve(ModuleRevisionId mrid, String destFilePattern, RetrieveOptions options) throws IOException { pushContext(); @@ -594,10 +595,10 @@ public class Ivy { * Example of use: deliver(mrid, "1.5", "target/ivy/ivy-[revision].xml", * DeliverOptions.newInstance(settings).setStatus("release").setValidate(false)); * - * @param mrid - * @param revision - * @param destIvyPattern - * @param options + * @param mrid ModuleRevisionId + * @param revision String + * @param destIvyPattern String + * @param options DeliverOptions * @throws IOException * @throws ParseException */ @@ -779,6 +780,7 @@ public class Ivy { * Interrupts the current running operation in the given operating thread, no later than * interruptTimeout milliseconds after the call */ + @SuppressWarnings("deprecation") public void interrupt(Thread operatingThread) { if (operatingThread != null && operatingThread.isAlive()) { if (operatingThread == Thread.currentThread()) { http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/Main.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/Main.java b/src/java/org/apache/ivy/Main.java index a274e64..18d6a5d 100644 --- a/src/java/org/apache/ivy/Main.java +++ b/src/java/org/apache/ivy/Main.java @@ -240,7 +240,7 @@ public final class Main { return; } - boolean validate = line.hasOption("novalidate") ? false : true; + boolean validate = !line.hasOption("novalidate"); Ivy ivy = Ivy.newInstance(); initMessage(line, ivy); @@ -395,7 +395,7 @@ public final class Main { * </p> * * @param line - * the command line in which the cp option shold be parsed + * the command line in which the cp option should be parsed * @return a List of files to include as extra classpath entries, or <code>null</code> if no cp * option was provided. */ @@ -503,6 +503,7 @@ public final class Main { } } + @SuppressWarnings("resource") private static void invoke(Ivy ivy, File cache, ModuleDescriptor md, String[] confs, List fileList, String mainclass, String[] args) { List urls = new ArrayList(); http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/AntBuildTrigger.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/AntBuildTrigger.java b/src/java/org/apache/ivy/ant/AntBuildTrigger.java index 6b0dd3f..96f3813 100644 --- a/src/java/org/apache/ivy/ant/AntBuildTrigger.java +++ b/src/java/org/apache/ivy/ant/AntBuildTrigger.java @@ -35,7 +35,7 @@ import org.apache.tools.ant.taskdefs.Ant; import org.apache.tools.ant.taskdefs.Property; /** - * Triggers an ant build on an event occurence. + * Triggers an ant build on an event occurrence. * <p> * Example of use: * @@ -128,11 +128,8 @@ public class AntBuildTrigger extends AbstractTrigger implements Trigger { } private File getBuildFile(IvyEvent event) { - return IvyContext - .getContext() - .getSettings() - .resolveFile( - IvyPatternHelper.substituteTokens(getBuildFilePattern(), event.getAttributes())); + return IvyContext.getContext().getSettings().resolveFile( + IvyPatternHelper.substituteTokens(getBuildFilePattern(), event.getAttributes())); } public String getBuildFilePattern() { http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/AntCallTrigger.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/AntCallTrigger.java b/src/java/org/apache/ivy/ant/AntCallTrigger.java index 005eea1..0d287c4 100644 --- a/src/java/org/apache/ivy/ant/AntCallTrigger.java +++ b/src/java/org/apache/ivy/ant/AntCallTrigger.java @@ -33,7 +33,7 @@ import org.apache.tools.ant.taskdefs.CallTarget; import org.apache.tools.ant.taskdefs.Property; /** - * Triggers an call to an ant target on an event occurence. + * Triggers an call to an ant target on an event occurrence. * <p> * This trigger only works when ivy is called from an ant build file, otherwise the trigger only log * a failure. http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/AntMessageLogger.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/AntMessageLogger.java b/src/java/org/apache/ivy/ant/AntMessageLogger.java index 85547f9..285e453 100644 --- a/src/java/org/apache/ivy/ant/AntMessageLogger.java +++ b/src/java/org/apache/ivy/ant/AntMessageLogger.java @@ -81,10 +81,10 @@ public class AntMessageLogger extends AbstractMessageLogger { } public void taskFinished(BuildEvent event) { - // NB: There is somtimes task created by an other task + // NB: There is sometimes task created by an other task // in that case, we should not uninit Message. The log should stay associated // with the initial task, except if it was an antcall, ant or subant target - // NB2 : Testing the identity of the task is not enought, event.getTask() return + // NB2 : Testing the identity of the task is not enough, event.getTask() return // an instance of UnknownElement is wrapping the concrete instance stackDepth--; if (stackDepth == -1) { @@ -106,9 +106,9 @@ public class AntMessageLogger extends AbstractMessageLogger { private StringBuffer buf = new StringBuffer(); /** - * Constructs a new AntMEssageImpl instance. + * Constructs a new AntMessageImpl instance. * - * @param antProjectComponent + * @param task * the ant project component this message implementation should use for logging. Must * not be <code>null</code>. */ http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyAntSettings.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyAntSettings.java b/src/java/org/apache/ivy/ant/IvyAntSettings.java index bb67ba7..64efc9e 100644 --- a/src/java/org/apache/ivy/ant/IvyAntSettings.java +++ b/src/java/org/apache/ivy/ant/IvyAntSettings.java @@ -108,7 +108,7 @@ public class IvyAntSettings extends DataType { * Returns the default ivy settings of this classloader. If it doesn't exist yet, a new one is * created using the given project to back the VariableContainer. * - * @param project + * @param task * TODO add text. * @return An IvySetting instance. */ @@ -192,7 +192,7 @@ public class IvyAntSettings extends DataType { super.setProject(p); if ("ivy.instance".equals(id) && !getProject().getReferences().containsKey(id)) { - // register ourselfs as default settings, just in case the id attribute is not set + // register ourselves as default settings, just in case the id attribute is not set getProject().addReference("ivy.instance", this); autoRegistered = true; } @@ -337,7 +337,7 @@ public class IvyAntSettings extends DataType { /** * Set file or url to its default value * - * @param variableContainer + * @param variableContainer IvyVariableContainer */ private void defineDefaultSettingFile(IvyVariableContainer variableContainer, ProjectComponent task) { @@ -362,7 +362,7 @@ public class IvyAntSettings extends DataType { } if (!file.exists()) { file = null; - if (Boolean.valueOf(getProject().getProperty("ivy.14.compatible")).booleanValue()) { + if (Boolean.valueOf(getProject().getProperty("ivy.14.compatible"))) { task.log("no settings file found, using Ivy 1.4 default...", Project.MSG_VERBOSE); url = IvySettings.getDefault14SettingsURL(); } else { http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyAntVariableContainer.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyAntVariableContainer.java b/src/java/org/apache/ivy/ant/IvyAntVariableContainer.java index fa25a8d..e3a3d09 100644 --- a/src/java/org/apache/ivy/ant/IvyAntVariableContainer.java +++ b/src/java/org/apache/ivy/ant/IvyAntVariableContainer.java @@ -64,7 +64,8 @@ class IvyAntVariableContainer extends IvyVariableContainerImpl implements IvyVar * All variables defined in Ivy will be set in the Ant project under two names: * <ul> * <li>the name of the variable</li> - * <li>the name of the variable suffxied with a dot + the given id, if the given id is not null</li> + * <li>the name of the variable suffixed with a dot + the given id, if the given id is not null + * </li> * </ul> * * @param id @@ -98,6 +99,7 @@ class IvyAntVariableContainer extends IvyVariableContainerImpl implements IvyVar } } + @SuppressWarnings("unchecked") public Object clone() { IvyAntVariableContainer result = (IvyAntVariableContainer) super.clone(); result.overwrittenProperties = (HashMap) ((HashMap) this.overwrittenProperties).clone(); http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyArtifactReport.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyArtifactReport.java b/src/java/org/apache/ivy/ant/IvyArtifactReport.java index 88520f1..cc55d43 100644 --- a/src/java/org/apache/ivy/ant/IvyArtifactReport.java +++ b/src/java/org/apache/ivy/ant/IvyArtifactReport.java @@ -126,9 +126,9 @@ public class IvyArtifactReport extends IvyPostResolveTask { private void generateXml(IvyNode[] dependencies, Map moduleRevToArtifactsMap, Map artifactsToCopy) { try { - FileOutputStream fileOuputStream = new FileOutputStream(tofile); + FileOutputStream fileOutputStream = new FileOutputStream(tofile); try { - TransformerHandler saxHandler = createTransformerHandler(fileOuputStream); + TransformerHandler saxHandler = createTransformerHandler(fileOutputStream); saxHandler.startDocument(); saxHandler.startElement(null, "modules", "modules", new AttributesImpl()); @@ -169,7 +169,7 @@ public class IvyArtifactReport extends IvyPostResolveTask { saxHandler.endElement(null, "modules", "modules"); saxHandler.endDocument(); } finally { - fileOuputStream.close(); + fileOutputStream.close(); } } catch (SAXException e) { throw new BuildException("impossible to generate report", e); @@ -180,7 +180,7 @@ public class IvyArtifactReport extends IvyPostResolveTask { } } - private TransformerHandler createTransformerHandler(FileOutputStream fileOuputStream) + private TransformerHandler createTransformerHandler(FileOutputStream fileOutputStream) throws TransformerFactoryConfigurationError, TransformerConfigurationException, SAXException { SAXTransformerFactory transformerFact = (SAXTransformerFactory) SAXTransformerFactory @@ -188,7 +188,7 @@ public class IvyArtifactReport extends IvyPostResolveTask { TransformerHandler saxHandler = transformerFact.newTransformerHandler(); saxHandler.getTransformer().setOutputProperty(OutputKeys.ENCODING, "UTF-8"); saxHandler.getTransformer().setOutputProperty(OutputKeys.INDENT, "yes"); - saxHandler.setResult(new StreamResult(fileOuputStream)); + saxHandler.setResult(new StreamResult(fileOutputStream)); return saxHandler; } http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyBuildList.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyBuildList.java b/src/java/org/apache/ivy/ant/IvyBuildList.java index ba4b1a3..55cbe74 100644 --- a/src/java/org/apache/ivy/ant/IvyBuildList.java +++ b/src/java/org/apache/ivy/ant/IvyBuildList.java @@ -350,12 +350,12 @@ public class IvyBuildList extends IvyTask { } /** - * Returns a collection of ModuleDescriptors that are conatined in the input collection of + * Returns a collection of ModuleDescriptors that are contained in the input collection of * ModuleDescriptors and upon which the root module depends * * @param mds * input collection of ModuleDescriptors - * @param rootmd + * @param rootmds * root module * @return filtered list of modules */ @@ -421,12 +421,12 @@ public class IvyBuildList extends IvyTask { } /** - * Returns a collection of ModuleDescriptors that are conatined in the input collection of + * Returns a collection of ModuleDescriptors that are contained in the input collection of * ModuleDescriptors which depends on the leaf module * * @param mds * input collection of ModuleDescriptors - * @param leafmd + * @param leafmds * leaf module * @return filtered list of modules */ http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyCacheFileset.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyCacheFileset.java b/src/java/org/apache/ivy/ant/IvyCacheFileset.java index 891a336..fbcf043 100644 --- a/src/java/org/apache/ivy/ant/IvyCacheFileset.java +++ b/src/java/org/apache/ivy/ant/IvyCacheFileset.java @@ -108,7 +108,7 @@ public class IvyCacheFileset extends IvyCacheTask { // checks if the basePath ends with the file separator (which can for instance // happen if the basePath is the root on unix) if (!absoluteBasePath.endsWith(File.separator)) { - beginIndex++; // skip the seperator char as well + beginIndex++; // skip the separator char as well } return file.getAbsolutePath().substring(beginIndex); http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyCachePath.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyCachePath.java b/src/java/org/apache/ivy/ant/IvyCachePath.java index 3fe7645..d4b7843 100644 --- a/src/java/org/apache/ivy/ant/IvyCachePath.java +++ b/src/java/org/apache/ivy/ant/IvyCachePath.java @@ -53,7 +53,7 @@ public class IvyCachePath extends IvyCacheTask { /** * @deprecated use setPathid instead - * @param id + * @param id String */ @Deprecated public void setId(String id) { http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyCacheTask.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyCacheTask.java b/src/java/org/apache/ivy/ant/IvyCacheTask.java index 2360860..e8de729 100644 --- a/src/java/org/apache/ivy/ant/IvyCacheTask.java +++ b/src/java/org/apache/ivy/ant/IvyCacheTask.java @@ -38,7 +38,7 @@ import org.apache.ivy.util.Message; import org.apache.tools.ant.BuildException; /** - * Base class for the cache path related classes: cachepath and cachefileset. Most of the behviour + * Base class for the cache path related classes: cachepath and cachefileset. Most of the behaviour * is common to the two, since only the produced element differs. */ public abstract class IvyCacheTask extends IvyPostResolveTask { http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyCleanCache.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyCleanCache.java b/src/java/org/apache/ivy/ant/IvyCleanCache.java index 251f3e2..e22e40a 100644 --- a/src/java/org/apache/ivy/ant/IvyCleanCache.java +++ b/src/java/org/apache/ivy/ant/IvyCleanCache.java @@ -53,7 +53,7 @@ public class IvyCleanCache extends IvyTask { } /** - * Sets weither the resolution cache should be cleaned or not. + * Sets whether the resolution cache should be cleaned or not. * * @param resolution * <code>true</code> if the resolution cache should be cleaned, <code>false</code> http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyConflict.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyConflict.java b/src/java/org/apache/ivy/ant/IvyConflict.java index a4a2a1d..c6b159a 100644 --- a/src/java/org/apache/ivy/ant/IvyConflict.java +++ b/src/java/org/apache/ivy/ant/IvyConflict.java @@ -57,9 +57,9 @@ public class IvyConflict { } void addConflict(DefaultModuleDescriptor md, IvySettings settings) { - String matcherName = matcher == null ? PatternMatcher.EXACT : matcher; - String orgPattern = org == null ? PatternMatcher.ANY_EXPRESSION : org; - String modulePattern = module == null ? PatternMatcher.ANY_EXPRESSION : module; + String matcherName = (matcher == null) ? PatternMatcher.EXACT : matcher; + String orgPattern = (org == null) ? PatternMatcher.ANY_EXPRESSION : org; + String modulePattern = (module == null) ? PatternMatcher.ANY_EXPRESSION : module; ConflictManager cm = null; if (rev != null) { String[] revs = rev.split(","); http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyDeliver.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyDeliver.java b/src/java/org/apache/ivy/ant/IvyDeliver.java index 06473c9..80b775e 100644 --- a/src/java/org/apache/ivy/ant/IvyDeliver.java +++ b/src/java/org/apache/ivy/ant/IvyDeliver.java @@ -359,12 +359,12 @@ public class IvyDeliver extends IvyTask { if (resolveId == null) { if (organisation == null) { throw new BuildException("no organisation provided for ivy deliver task: " - + "It can either be set explicitely via the attribute 'organisation' " + + "It can either be set explicitly via the attribute 'organisation' " + "or via 'ivy.organisation' property or a prior call to <resolve/>"); } if (module == null) { throw new BuildException("no module name provided for ivy deliver task: " - + "It can either be set explicitely via the attribute 'module' " + + "It can either be set explicitly via the attribute 'module' " + "or via 'ivy.module' property or a prior call to <resolve/>"); } } http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyDependencyTree.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyDependencyTree.java b/src/java/org/apache/ivy/ant/IvyDependencyTree.java index bb7c279..b95aa91 100644 --- a/src/java/org/apache/ivy/ant/IvyDependencyTree.java +++ b/src/java/org/apache/ivy/ant/IvyDependencyTree.java @@ -44,7 +44,7 @@ public class IvyDependencyTree extends IvyPostResolveTask { ResolveReport report = getResolvedReport(); log("Dependency tree for " + report.getResolveId()); ModuleRevisionId mrid = report.getModuleDescriptor().getModuleRevisionId(); - // make dependency tree easier to fetch informations + // make dependency tree easier to fetch information for (Iterator iterator = report.getDependencies().iterator(); iterator.hasNext();) { IvyNode dependency = (IvyNode) iterator.next(); populateDependencyTree(dependency, mrid, report); http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyDependencyUpdateChecker.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyDependencyUpdateChecker.java b/src/java/org/apache/ivy/ant/IvyDependencyUpdateChecker.java index 4a71664..83dd5ef 100644 --- a/src/java/org/apache/ivy/ant/IvyDependencyUpdateChecker.java +++ b/src/java/org/apache/ivy/ant/IvyDependencyUpdateChecker.java @@ -101,9 +101,8 @@ public class IvyDependencyUpdateChecker extends IvyPostResolveTask { if (originalDependency.getModuleId().equals(latest.getModuleId())) { if (!originalDependency.getResolvedId().getRevision() .equals(latest.getResolvedId().getRevision())) { - // is this dependency a transitive dependency ? or direct dependency - // (unfortunatly - // .isTranstive() methods doesn't have the same meaning) + // is this dependency a transitive or a direct dependency? + // (unfortunately .isTransitive() methods do not have the same meaning) boolean isTransitiveDependency = latest.getDependencyDescriptor(latest .getRoot()) == null; if ((!isTransitiveDependency) || (isTransitiveDependency && showTransitive)) { http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyExtractFromSources.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyExtractFromSources.java b/src/java/org/apache/ivy/ant/IvyExtractFromSources.java index a7e6cd5..62e4228 100644 --- a/src/java/org/apache/ivy/ant/IvyExtractFromSources.java +++ b/src/java/org/apache/ivy/ant/IvyExtractFromSources.java @@ -173,8 +173,8 @@ public class IvyExtractFromSources extends Task { } /** - * @param pack - * @return + * @param pack String + * @return ModuleRevisionId */ private ModuleRevisionId getMapping(String pack) { String askedPack = pack; http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyInstall.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyInstall.java b/src/java/org/apache/ivy/ant/IvyInstall.java index 1982e19..2104ad7 100644 --- a/src/java/org/apache/ivy/ant/IvyInstall.java +++ b/src/java/org/apache/ivy/ant/IvyInstall.java @@ -64,19 +64,19 @@ public class IvyInstall extends IvyTask { IvySettings settings = ivy.getSettings(); if (organisation == null) { throw new BuildException("no organisation provided for ivy publish task: " - + "It can either be set explicitely via the attribute 'organisation' " + + "It can either be set explicitly via the attribute 'organisation' " + "or via 'ivy.organisation' property or a prior call to <resolve/>"); } if (module == null && PatternMatcher.EXACT.equals(matcher)) { throw new BuildException("no module name provided for ivy publish task: " - + "It can either be set explicitely via the attribute 'module' " + + "It can either be set explicitly via the attribute 'module' " + "or via 'ivy.module' property or a prior call to <resolve/>"); } else if (module == null && !PatternMatcher.EXACT.equals(matcher)) { module = PatternMatcher.ANY_EXPRESSION; } if (revision == null && PatternMatcher.EXACT.equals(matcher)) { throw new BuildException("no module revision provided for ivy publish task: " - + "It can either be set explicitely via the attribute 'revision' " + + "It can either be set explicitly via the attribute 'revision' " + "or via 'ivy.revision' property or a prior call to <resolve/>"); } else if (revision == null && !PatternMatcher.EXACT.equals(matcher)) { revision = PatternMatcher.ANY_EXPRESSION; http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyPostResolveTask.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyPostResolveTask.java b/src/java/org/apache/ivy/ant/IvyPostResolveTask.java index 0e0e6fe..757b724 100644 --- a/src/java/org/apache/ivy/ant/IvyPostResolveTask.java +++ b/src/java/org/apache/ivy/ant/IvyPostResolveTask.java @@ -127,13 +127,13 @@ public abstract class IvyPostResolveTask extends IvyTask { if (organisation == null) { throw new BuildException( "no organisation provided for ivy cache task in inline mode: " - + "It can either be set explicitely via the attribute 'organisation' " + + "It can either be set explicitly via the attribute 'organisation' " + "or via 'ivy.organisation' property"); } if (module == null) { throw new BuildException( "no module name provided for ivy cache task in inline mode: " - + "It can either be set explicitely via the attribute 'module' " + + "It can either be set explicitly via the attribute 'module' " + "or via 'ivy.module' property"); } String[] toResolve = getConfsToResolve(getOrganisation(), getModule() + "-caller", @@ -192,17 +192,17 @@ public abstract class IvyPostResolveTask extends IvyTask { module = getProperty(module, settings, "ivy.module"); if (organisation == null) { throw new BuildException("no organisation provided for ivy cache task: " - + "It can either be set explicitely via the attribute 'organisation' " + + "It can either be set explicitly via the attribute 'organisation' " + "or via 'ivy.organisation' property or a prior call to <resolve/>"); } if (module == null) { throw new BuildException("no module name provided for ivy cache task: " - + "It can either be set explicitely via the attribute 'module' " + + "It can either be set explicitly via the attribute 'module' " + "or via 'ivy.module' property or a prior call to <resolve/>"); } if (conf == null) { throw new BuildException("no conf provided for ivy cache task: " - + "It can either be set explicitely via the attribute 'conf' or " + + "It can either be set explicitly via the attribute 'conf' or " + "via 'ivy.resolved.configurations' property or a prior call to <resolve/>"); } @@ -427,11 +427,11 @@ public abstract class IvyPostResolveTask extends IvyTask { } public void setKeep(boolean keep) { - this.keep = Boolean.valueOf(keep); + this.keep = keep; } public boolean isKeep() { - return this.keep == null ? !isInline() : this.keep.booleanValue(); + return this.keep == null ? !isInline() : this.keep; } public void setChanging(boolean changing) { http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyPublish.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyPublish.java b/src/java/org/apache/ivy/ant/IvyPublish.java index 04df76e..1c2921b 100644 --- a/src/java/org/apache/ivy/ant/IvyPublish.java +++ b/src/java/org/apache/ivy/ant/IvyPublish.java @@ -244,17 +244,17 @@ public class IvyPublish extends IvyTask { status = getProperty(status, settings, "ivy.status"); if (organisation == null) { throw new BuildException("no organisation provided for ivy publish task: " - + "It can either be set explicitely via the attribute 'organisation' " + + "It can either be set explicitly via the attribute 'organisation' " + "or via 'ivy.organisation' property or a prior call to <resolve/>"); } if (module == null) { throw new BuildException("no module name provided for ivy publish task: " - + "It can either be set explicitely via the attribute 'module' " + + "It can either be set explicitly via the attribute 'module' " + "or via 'ivy.module' property or a prior call to <resolve/>"); } if (revision == null) { throw new BuildException("no module revision provided for ivy publish task: " - + "It can either be set explicitely via the attribute 'revision' " + + "It can either be set explicitly via the attribute 'revision' " + "or via 'ivy.revision' property or a prior call to <resolve/>"); } if (artifactspattern.isEmpty()) { http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyReport.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyReport.java b/src/java/org/apache/ivy/ant/IvyReport.java index e4f024e..6ac9d09 100644 --- a/src/java/org/apache/ivy/ant/IvyReport.java +++ b/src/java/org/apache/ivy/ant/IvyReport.java @@ -163,7 +163,7 @@ public class IvyReport extends IvyTask { } if (conf == null) { throw new BuildException("no conf provided for ivy report task: " - + "It can either be set explicitely via the attribute 'conf' or " + + "It can either be set explicitly via the attribute 'conf' or " + "via 'ivy.resolved.configurations' property or a prior call to <resolve/>"); } if (todir == null) { @@ -190,12 +190,12 @@ public class IvyReport extends IvyTask { if (organisation == null) { throw new BuildException("no organisation provided for ivy report task: " - + "It can either be set explicitely via the attribute 'organisation' or " + + "It can either be set explicitly via the attribute 'organisation' or " + "via 'ivy.organisation' property or a prior call to <resolve/>"); } if (module == null) { throw new BuildException("no module name provided for ivy report task: " - + "It can either be set explicitely via the attribute 'module' or " + + "It can either be set explicitly via the attribute 'module' or " + "via 'ivy.module' property or a prior call to <resolve/>"); } http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyRepositoryReport.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyRepositoryReport.java b/src/java/org/apache/ivy/ant/IvyRepositoryReport.java index 0b725fc..86efbf8 100644 --- a/src/java/org/apache/ivy/ant/IvyRepositoryReport.java +++ b/src/java/org/apache/ivy/ant/IvyRepositoryReport.java @@ -81,7 +81,7 @@ public class IvyRepositoryReport extends IvyTask { } if (module == null && PatternMatcher.EXACT.equals(matcher)) { throw new BuildException("no module name provided for ivy repository graph task: " - + "It can either be set explicitely via the attribute 'module' or " + + "It can either be set explicitly via the attribute 'module' or " + "via 'ivy.module' property or a prior call to <resolve/>"); } else if (module == null && !PatternMatcher.EXACT.equals(matcher)) { module = PatternMatcher.ANY_EXPRESSION; http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyResolve.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyResolve.java b/src/java/org/apache/ivy/ant/IvyResolve.java index c700421..5a30ab5 100644 --- a/src/java/org/apache/ivy/ant/IvyResolve.java +++ b/src/java/org/apache/ivy/ant/IvyResolve.java @@ -373,7 +373,7 @@ public class IvyResolve extends IvyTask { Boolean hasChanged = null; if (getCheckIfChanged()) { - hasChanged = Boolean.valueOf(report.hasChanged()); + hasChanged = report.hasChanged(); getProject().setProperty("ivy.deps.changed", hasChanged.toString()); settings.setVariable("ivy.deps.changed", hasChanged.toString()); } @@ -471,11 +471,11 @@ public class IvyResolve extends IvyTask { } public boolean isKeep() { - return keep == null ? organisation == null : keep.booleanValue(); + return (keep == null) ? organisation == null : keep; } public void setKeep(boolean keep) { - this.keep = Boolean.valueOf(keep); + this.keep = keep; } public boolean isInline() { http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyRetrieve.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyRetrieve.java b/src/java/org/apache/ivy/ant/IvyRetrieve.java index e19232b..20695d9 100644 --- a/src/java/org/apache/ivy/ant/IvyRetrieve.java +++ b/src/java/org/apache/ivy/ant/IvyRetrieve.java @@ -225,7 +225,7 @@ public class IvyRetrieve extends IvyPostResolveTask { // checks if the basePath ends with the file separator (which can for instance // happen if the basePath is the root on unix) if (!absoluteBasePath.endsWith(File.separator)) { - beginIndex++; // skip the seperator char as well + beginIndex++; // skip the separator char as well } return file.getAbsolutePath().substring(beginIndex); http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyTask.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/IvyTask.java b/src/java/org/apache/ivy/ant/IvyTask.java index 6d65c34..42997d9 100644 --- a/src/java/org/apache/ivy/ant/IvyTask.java +++ b/src/java/org/apache/ivy/ant/IvyTask.java @@ -44,17 +44,17 @@ public abstract class IvyTask extends Task { protected boolean doValidate(IvySettings ivy) { if (validate != null) { - return validate.booleanValue(); + return validate; } return ivy.doValidate(); } public boolean isValidate() { - return validate == null ? true : validate.booleanValue(); + return validate == null || validate; } public void setValidate(boolean validate) { - this.validate = Boolean.valueOf(validate); + this.validate = validate; } public void setSettingsRef(Reference ref) { @@ -257,13 +257,13 @@ public abstract class IvyTask extends Task { */ protected void finalizeTask() { if (!IvyContext.getContext().pop(ANT_PROJECT_CONTEXT_KEY, getProject())) { - Message.error("ANT project poped from stack not equals current !. Ignoring"); + Message.error("ANT project popped from stack not equals current! Ignoring"); } IvyContext.popContext(); } /** - * Ant task execute. Calls prepareTask, doExecute, finalzeTask + * Ant task execute. Calls prepareTask, doExecute, finalizeTask */ @Override public final void execute() throws BuildException { http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/PackageMapping.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/PackageMapping.java b/src/java/org/apache/ivy/ant/PackageMapping.java index c848057..65950f6 100644 --- a/src/java/org/apache/ivy/ant/PackageMapping.java +++ b/src/java/org/apache/ivy/ant/PackageMapping.java @@ -20,7 +20,7 @@ package org.apache.ivy.ant; import org.apache.ivy.core.module.id.ModuleRevisionId; /** - * Describes a mapping between a package name and an org name revision uple + * Describes a mapping between a package name and an org name revision tuple */ public class PackageMapping { private String pkg; http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/IvyContext.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/core/IvyContext.java b/src/java/org/apache/ivy/core/IvyContext.java index 1e28a4b..4ff0f3b 100644 --- a/src/java/org/apache/ivy/core/IvyContext.java +++ b/src/java/org/apache/ivy/core/IvyContext.java @@ -324,6 +324,7 @@ public class IvyContext { * @param value * value to be saved under the key */ + @SuppressWarnings("unchecked") public void push(String key, Object value) { synchronized (contextMap) { if (!contextMap.containsKey(key)) { http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/IvyPatternHelper.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/core/IvyPatternHelper.java b/src/java/org/apache/ivy/core/IvyPatternHelper.java index 3300b36..e8fb47e 100644 --- a/src/java/org/apache/ivy/core/IvyPatternHelper.java +++ b/src/java/org/apache/ivy/core/IvyPatternHelper.java @@ -86,16 +86,15 @@ public final class IvyPatternHelper { } public static String substitute(String pattern, Artifact artifact, ArtifactOrigin origin) { - return substitute(pattern, artifact.getModuleRevisionId(), artifact, (String) null, origin); + return substitute(pattern, artifact.getModuleRevisionId(), artifact, null, origin); } public static String substitute(String pattern, Artifact artifact, String conf) { - return substitute(pattern, artifact.getModuleRevisionId(), artifact, conf, - (ArtifactOrigin) null); + return substitute(pattern, artifact.getModuleRevisionId(), artifact, conf, null); } public static String substitute(String pattern, ModuleRevisionId mrid, Artifact artifact) { - return substitute(pattern, mrid, artifact, (String) null, (ArtifactOrigin) null); + return substitute(pattern, mrid, artifact, null, null); } public static String substitute(String pattern, ModuleRevisionId mrid, Artifact artifact, @@ -107,22 +106,22 @@ public final class IvyPatternHelper { public static String substitute(String pattern, String org, String module, String revision, String artifact, String type, String ext) { - return substitute(pattern, org, module, (String) null, revision, artifact, type, ext, - (String) null, (ArtifactOrigin) null, (Map) null, (Map) null); + return substitute(pattern, org, module, null, revision, artifact, type, ext, + null, null, null, null); } // CheckStyle:ParameterNumber OFF public static String substitute(String pattern, String org, String module, String revision, String artifact, String type, String ext, String conf) { - return substitute(pattern, org, module, (String) null, revision, artifact, type, ext, conf, - (ArtifactOrigin) null, (Map) null, (Map) null); + return substitute(pattern, org, module, null, revision, artifact, type, ext, conf, + null, null, null); } public static String substitute(String pattern, String org, String module, String revision, String artifact, String type, String ext, String conf, Map extraModuleAttributes, Map extraArtifactAttributes) { - return substitute(pattern, org, module, (String) null, revision, artifact, type, ext, conf, - (ArtifactOrigin) null, extraModuleAttributes, extraArtifactAttributes); + return substitute(pattern, org, module, null, revision, artifact, type, ext, conf, + null, extraModuleAttributes, extraArtifactAttributes); } public static String substitute(String pattern, String org, String module, String branch, @@ -450,7 +449,7 @@ public final class IvyPatternHelper { } /** - * @param origin + * @param origin ArtifactOrigin */ public OriginalArtifactNameValue(ArtifactOrigin origin) { this.origin = origin; http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/IvyThread.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/core/IvyThread.java b/src/java/org/apache/ivy/core/IvyThread.java index b0d2a51..5675160 100644 --- a/src/java/org/apache/ivy/core/IvyThread.java +++ b/src/java/org/apache/ivy/core/IvyThread.java @@ -19,7 +19,7 @@ package org.apache.ivy.core; /** * A simple thread subclass associated the same IvyContext as the thread in which it is - * instanciated. If you override the run target, then you will have to call initContext() to do the + * instantiated. If you override the run target, then you will have to call initContext() to do the * association with the original IvyContext. * * @see IvyContext http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/RelativeUrlResolver.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/core/RelativeUrlResolver.java b/src/java/org/apache/ivy/core/RelativeUrlResolver.java index 2fac8cb..abf6f01 100644 --- a/src/java/org/apache/ivy/core/RelativeUrlResolver.java +++ b/src/java/org/apache/ivy/core/RelativeUrlResolver.java @@ -30,7 +30,7 @@ public abstract class RelativeUrlResolver { * Resolve the url in the context of context. * * @param context - * The URL of the ressource containing the reference url + * The URL of the resource containing the reference url * @param url * a relative or absolution url string * @throws MalformedURLException @@ -38,16 +38,16 @@ public abstract class RelativeUrlResolver { public abstract URL getURL(URL context, String url) throws MalformedURLException; /** - * Relsovle file or url path relatively to a context. file is considered first. If file is not + * Resolve file or url path relatively to a context. file is considered first. If file is not * defined, url will be considered. * * @param context - * The URL of the ressource containing the reference file or url + * The URL of the resource containing the reference file or url * @param file * a relative or absolute path * @param url * a relative or absolution url string - * @return the resulting url or null if faile and url are null. + * @return the resulting url or null if failed and url are null. * @throws MalformedURLException */ public URL getURL(URL context, String file, String url) throws MalformedURLException { http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java b/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java index e132b2e..66dc5f5 100644 --- a/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java +++ b/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java @@ -32,7 +32,7 @@ public class ArtifactOrigin { /** * ArtifactOrigin instance used when the origin is unknown. */ - public static final ArtifactOrigin unkwnown(Artifact artifact) { + public static final ArtifactOrigin unknown(Artifact artifact) { return new ArtifactOrigin(artifact, false, UNKNOWN); } @@ -110,7 +110,7 @@ public class ArtifactOrigin { * The last time the resource was checked to be up to date. Maybe <code>null</code> if this * information is not actually used by in some case. * - * @return + * @return Long timestamp */ public Long getLastChecked() { return lastChecked; @@ -143,10 +143,7 @@ public class ArtifactOrigin { ArtifactOrigin that = (ArtifactOrigin) o; - if (isLocal != that.isLocal) { - return false; - } - if (!location.equals(that.location)) { + if (isLocal != that.isLocal || !location.equals(that.location)) { return false; } if (lastChecked == null) { @@ -156,11 +153,8 @@ public class ArtifactOrigin { } else if (!lastChecked.equals(that.lastChecked)) { return false; } - if (exists != that.exists) { - return false; - } - return true; + return exists == that.exists; } public int hashCode() { http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java b/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java index 86b4a8b..f659d87 100644 --- a/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java +++ b/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java @@ -318,7 +318,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv } public void setCheckmodified(boolean check) { - checkmodified = Boolean.valueOf(check); + checkmodified = check; } /** @@ -329,11 +329,11 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv if (useOrigin == null) { return getSettings() != null && getSettings().isDefaultUseOrigin(); } - return useOrigin.booleanValue(); + return useOrigin; } public void setUseOrigin(boolean b) { - useOrigin = Boolean.valueOf(b); + useOrigin = b; } /** @@ -409,6 +409,8 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv * * @param md * the module descriptor resolved + * @param metadataResolverName + * metadata resolver name * @param artifactResolverName * artifact resolver name */ @@ -471,7 +473,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv ModuleRevisionId mrid = artifact.getModuleRevisionId(); if (!lockMetadataArtifact(mrid)) { Message.error("impossible to acquire lock for " + mrid); - return ArtifactOrigin.unkwnown(artifact); + return ArtifactOrigin.unknown(artifact); } try { PropertiesFile cdf = getCachedDataFile(artifact.getModuleRevisionId()); @@ -481,11 +483,11 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv String exists = cdf.getProperty(getExistsKey(artifact)); String original = cdf.getProperty(getOriginalKey(artifact)); - boolean isLocal = Boolean.valueOf(local).booleanValue(); + boolean isLocal = Boolean.valueOf(local); if (location == null) { // origin has not been specified, return null - return ArtifactOrigin.unkwnown(artifact); + return ArtifactOrigin.unknown(artifact); } if (original != null) { @@ -560,7 +562,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv origin.setLastChecked(Long.valueOf(lastChecked)); } if (exists != null) { - origin.setExist(Boolean.parseBoolean(exists)); + origin.setExist(Boolean.valueOf(exists)); } return origin; @@ -667,16 +669,15 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv public ResolvedModuleRevision findModuleInCache(DependencyDescriptor dd, ModuleRevisionId requestedRevisionId, CacheMetadataOptions options, String expectedResolver) { - ModuleRevisionId mrid = requestedRevisionId; if (isCheckmodified(dd, requestedRevisionId, options)) { - Message.verbose("don't use cache for " + mrid + ": checkModified=true"); + Message.verbose("don't use cache for " + requestedRevisionId + ": checkModified=true"); return null; } if (!options.isUseCacheOnly() && isChanging(dd, requestedRevisionId, options)) { - Message.verbose("don't use cache for " + mrid + ": changing=true"); + Message.verbose("don't use cache for " + requestedRevisionId + ": changing=true"); return null; } - return doFindModuleInCache(mrid, options, expectedResolver); + return doFindModuleInCache(requestedRevisionId, options, expectedResolver); } private ResolvedModuleRevision doFindModuleInCache(ModuleRevisionId mrid, @@ -788,7 +789,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv * * @param moduleDescriptorFile * a given module descriptor - * @return + * @return ModuleDescriptorParser */ protected ModuleDescriptorParser getModuleDescriptorParser(File moduleDescriptorFile) { return XmlModuleDescriptorParser.getInstance(); @@ -1199,8 +1200,8 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv } public void originalToCachedModuleDescriptor(DependencyResolver resolver, - ResolvedResource orginalMetadataRef, Artifact requestedMetadataArtifact, - ResolvedModuleRevision rmr, ModuleDescriptorWriter writer) { + ResolvedResource originalMetadataRef, Artifact requestedMetadataArtifact, + ResolvedModuleRevision rmr, ModuleDescriptorWriter writer) { ModuleDescriptor md = rmr.getDescriptor(); Artifact originalMetadataArtifact = getOriginalMetadataArtifact(requestedMetadataArtifact); File mdFileInCache = getIvyFileInCache(md.getResolvedModuleRevisionId()); @@ -1212,7 +1213,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv } try { File originalFileInCache = getArchiveFileInCache(originalMetadataArtifact); - writer.write(orginalMetadataRef, md, originalFileInCache, mdFileInCache); + writer.write(originalMetadataRef, md, originalFileInCache, mdFileInCache); getMemoryCache().putInCache(mdFileInCache, new ParserSettingsMonitor(settings), true, md); @@ -1226,10 +1227,10 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv throw e; } catch (Exception e) { String metadataRef; - if (orginalMetadataRef == null) { + if (originalMetadataRef == null) { metadataRef = String.valueOf(md.getResolvedModuleRevisionId()); } else { - metadataRef = String.valueOf(orginalMetadataRef); + metadataRef = String.valueOf(originalMetadataRef); } Message.warn("impossible to put metadata file in cache: " + metadataRef, e); } finally { @@ -1486,7 +1487,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv private boolean isCheckmodified(DependencyDescriptor dd, ModuleRevisionId requestedRevisionId, CacheMetadataOptions options) { if (options.isCheckmodified() != null) { - return options.isCheckmodified().booleanValue(); + return options.isCheckmodified(); } return isCheckmodified(); } @@ -1507,7 +1508,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv /** * Resource downloader which makes a copy of the previously existing file before overriding it. * <p> - * The backup file can be restored or cleanuped later + * The backup file can be restored or cleaned up later */ private final class BackupResourceDownloader implements ResourceDownloader { http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java b/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java index 9c42144..2ae9b71 100644 --- a/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java +++ b/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java @@ -169,7 +169,7 @@ public class DefaultResolutionCacheManager implements ResolutionCacheManager, Iv * * @param moduleDescriptorFile * a given module descriptor - * @return + * @return ModuleDescriptorParser */ protected ModuleDescriptorParser getModuleDescriptorParser(File moduleDescriptorFile) { return XmlModuleDescriptorParser.getInstance(); http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCache.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCache.java b/src/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCache.java index c4207a9..97ef10e 100644 --- a/src/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCache.java +++ b/src/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCache.java @@ -42,7 +42,7 @@ class ModuleDescriptorMemoryCache { /** * Create a cache of the given size * - * @param size + * @param size int */ public ModuleDescriptorMemoryCache(int size) { this.maxSize = size; @@ -73,7 +73,7 @@ class ModuleDescriptorMemoryCache { ModuleDescriptor getFromCache(File ivyFile, ParserSettings ivySettings, boolean validated) { if (maxSize <= 0) { - // cache is disbaled + // cache is disabled return null; } CacheEntry entry = (CacheEntry) valueMap.get(ivyFile); http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/cache/ParserSettingsMonitor.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/core/cache/ParserSettingsMonitor.java b/src/java/org/apache/ivy/core/cache/ParserSettingsMonitor.java index 35da0bd..8061ec8 100644 --- a/src/java/org/apache/ivy/core/cache/ParserSettingsMonitor.java +++ b/src/java/org/apache/ivy/core/cache/ParserSettingsMonitor.java @@ -39,7 +39,7 @@ import org.apache.ivy.util.Message; * Keep traces of the usage of a ParserSettings in order to check afterwards that the relevant * settings didn't changed. * <p> - * A ParserSettingsMonitor provide a ParserSettings that must be used in place of the orignal one. + * A ParserSettingsMonitor provide a ParserSettings that must be used in place of the original one. * </p> * <p> * The current implementation consider that a settings changed iff one of the used variable has @@ -58,7 +58,7 @@ class ParserSettingsMonitor { } /** - * @return The parser settings that must be used in place of the orignal settings The returned + * @return The parser settings that must be used in place of the original settings The returned * object delegates all the call to the original settings. */ public ParserSettings getMonitoredSettings() { @@ -66,7 +66,7 @@ class ParserSettingsMonitor { } /** - * Free the ressource used during the monitoring, keeping only the info required to evaluate + * Free the resource used during the monitoring, keeping only the info required to evaluate * hasChanged. */ public void endMonitoring() { http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/cache/RepositoryCacheManager.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/core/cache/RepositoryCacheManager.java b/src/java/org/apache/ivy/core/cache/RepositoryCacheManager.java index a5effa1..6027452 100644 --- a/src/java/org/apache/ivy/core/cache/RepositoryCacheManager.java +++ b/src/java/org/apache/ivy/core/cache/RepositoryCacheManager.java @@ -36,97 +36,79 @@ public interface RepositoryCacheManager { /** * Returns the name of the repository cache manager. - * + * * @return the name of the repository cache manager. */ - public abstract String getName(); + String getName(); /** * Saves the information of which resolvers were used to resolve a module (both for metadata and * artifact), so that this info can be loaded later (even after a jvm restart) for the use of - * {@link #findModuleInCache(DependencyDescriptor, CacheMetadataOptions, String)}. - * - * @param md - * the module descriptor resolved - * @param metadataResolverName - * metadata resolver name - * @param artifactResolverName - * artifact resolver name + * {@link #findModuleInCache(DependencyDescriptor, ModuleRevisionId, CacheMetadataOptions, String)}. + * + * @param descriptor the module descriptor resolved + * @param metadataResolverName metadata resolver name + * @param artifactResolverName artifact resolver name */ - public abstract void saveResolvers(ModuleDescriptor descriptor, String metadataResolverName, - String artifactResolverName); + void saveResolvers(ModuleDescriptor descriptor, String metadataResolverName, + String artifactResolverName); /** * Returns the artifact origin of the given artifact as saved in this cache. * <p> * If the origin is unknown, the returned ArtifactOrigin instance will return true when * {@link ArtifactOrigin#isUnknown(ArtifactOrigin)} is called. - * - * @param artifact - * the artifact for which the saved artifact origin should be returned. + * + * @param artifact the artifact for which the saved artifact origin should be returned. * @return the artifact origin of the given artifact as saved in this cache */ - public abstract ArtifactOrigin getSavedArtifactOrigin(Artifact artifact); + ArtifactOrigin getSavedArtifactOrigin(Artifact artifact); /** * Search a module descriptor in cache for a mrid - * - * @param dd - * the dependency descriptor identifying the module to search - * @param requestedRevisionId - * the requested dependency module revision id identifying the module to search - * @param options - * options on how caching should be handled - * @param expectedResolver - * the resolver with which the md in cache must have been resolved to be returned, - * null if this doesn't matter + * + * @param dd the dependency descriptor identifying the module to search + * @param requestedRevisionId the requested dependency module revision id identifying the module to search + * @param options options on how caching should be handled + * @param expectedResolver the resolver with which the md in cache must have been resolved to be returned, + * null if this doesn't matter * @return the ResolvedModuleRevision corresponding to the module found, null if none correct - * has been found in cache + * has been found in cache */ - public abstract ResolvedModuleRevision findModuleInCache(DependencyDescriptor dd, - ModuleRevisionId requestedRevisionId, CacheMetadataOptions options, - String expectedResolver); + ResolvedModuleRevision findModuleInCache(DependencyDescriptor dd, + ModuleRevisionId requestedRevisionId, CacheMetadataOptions options, + String expectedResolver); /** * Downloads an artifact to this cache. - * - * @param artifact - * the artifact to download - * @param resourceResolver - * a resource resolver to use if the artifact needs to be resolved to a Resource for - * downloading - * @param resourceDownloader - * a resource downloader to use if actual download of the resource is needed - * @param options - * a set of options to adjust the download + * + * @param artifact the artifact to download + * @param resourceResolver a resource resolver to use if the artifact needs to be resolved to a Resource for + * downloading + * @param resourceDownloader a resource downloader to use if actual download of the resource is needed + * @param options a set of options to adjust the download * @return a report indicating how the download was performed */ - public abstract ArtifactDownloadReport download(Artifact artifact, - ArtifactResourceResolver resourceResolver, ResourceDownloader resourceDownloader, - CacheDownloadOptions options); + ArtifactDownloadReport download(Artifact artifact, + ArtifactResourceResolver resourceResolver, ResourceDownloader resourceDownloader, + CacheDownloadOptions options); /** * Download some repository resource and put it in the cache. * <p> * If the cached version is considered enough up to date, no downloading is done. - * - * @param resource - * the resource of the file to put in cache - * @param name - * the descriptive name of the resource (helps while manually looking into the cache - * files) - * @param type - * the type of the resource (helps while manually looking into the cache files) - * @param extension - * the extension of the resource (helps while manually looking into the cache files) - * @param options - * a set of options to adjust the download - * @param repository - * the repository which resolve the content of the resource + * + * @param resource the resource of the file to put in cache + * @param name the descriptive name of the resource (helps while manually looking into the cache + * files) + * @param type the type of the resource (helps while manually looking into the cache files) + * @param extension the extension of the resource (helps while manually looking into the cache files) + * @param options a set of options to adjust the download + * @param repository the repository which resolve the content of the resource * @return a report indicating how the download was performed */ - public ArtifactDownloadReport downloadRepositoryResource(Resource resource, String name, - String type, String extension, CacheResourceOptions options, Repository repository); + ArtifactDownloadReport downloadRepositoryResource(Resource resource, String name, + String type, String extension, CacheResourceOptions options, Repository repository); /** * Caches an original module descriptor. @@ -134,76 +116,59 @@ public interface RepositoryCacheManager { * After this call, the original module descriptor file (with no modification nor conversion) * should be available as a local file. * </p> - * - * @param resolver - * the dependency resolver from which the cache request comes from - * @param orginalMetadataRef - * a resolved resource pointing to the remote original module descriptor - * @param dd - * the dependency descriptor for which the module descriptor should be cached - * @param requestedMetadataArtifact - * the module descriptor artifact as requested originally - * @param downloader - * a ResourceDownloader able to download the original module descriptor resource if - * required by this cache implementation - * @param options - * options to apply to cache this module descriptor + * + * @param resolver the dependency resolver from which the cache request comes from + * @param originalMetadataRef a resolved resource pointing to the remote original module descriptor + * @param dd the dependency descriptor for which the module descriptor should be cached + * @param requestedMetadataArtifact the module descriptor artifact as requested originally + * @param downloader a ResourceDownloader able to download the original module descriptor resource if + * required by this cache implementation + * @param options options to apply to cache this module descriptor * @return a {@link ResolvedModuleRevision} representing the local cached module descriptor, or - * null if it failed - * @throws ParseException - * if an exception occurred while parsing the module descriptor + * null if it failed + * @throws ParseException if an exception occurred while parsing the module descriptor */ - public ResolvedModuleRevision cacheModuleDescriptor(DependencyResolver resolver, - ResolvedResource orginalMetadataRef, DependencyDescriptor dd, - Artifact requestedMetadataArtifact, ResourceDownloader downloader, - CacheMetadataOptions options) throws ParseException; + ResolvedModuleRevision cacheModuleDescriptor(DependencyResolver resolver, + ResolvedResource originalMetadataRef, DependencyDescriptor dd, + Artifact requestedMetadataArtifact, ResourceDownloader downloader, + CacheMetadataOptions options) throws ParseException; /** * Stores a standardized version of an original module descriptor in the cache for later use. - * - * @param resolver - * the dependency resolver from which the cache request comes from - * @param orginalMetadataRef - * a resolved resource pointing to the remote original module descriptor - * @param requestedMetadataArtifact - * the module descriptor artifact as requested originally - * @param rmr - * the {@link ResolvedModuleRevision} representing the local cached module descriptor - * @param writer - * a {@link ModuleDescriptorWriter} able to write the module descriptor to a stream. + * + * @param resolver the dependency resolver from which the cache request comes from + * @param originalMetadataRef a resolved resource pointing to the remote original module descriptor + * @param requestedMetadataArtifact the module descriptor artifact as requested originally + * @param rmr the {@link ResolvedModuleRevision} representing the local cached module descriptor + * @param writer a {@link ModuleDescriptorWriter} able to write the module descriptor to a stream. */ - public void originalToCachedModuleDescriptor(DependencyResolver resolver, - ResolvedResource orginalMetadataRef, Artifact requestedMetadataArtifact, - ResolvedModuleRevision rmr, ModuleDescriptorWriter writer); + void originalToCachedModuleDescriptor(DependencyResolver resolver, + ResolvedResource originalMetadataRef, Artifact requestedMetadataArtifact, + ResolvedModuleRevision rmr, ModuleDescriptorWriter writer); /** * Cleans the whole cache. */ - public void clean(); + void clean(); /** * Caches a dynamic revision constraint resolution. - * - * @param dynamicMrid - * the dynamic module revision id - * @param revision - * the resolved revision + * + * @param dynamicMrid the dynamic module revision id + * @param revision the resolved revision * @deprecated See {@link #saveResolvedRevision(String, ModuleRevisionId, String)} which - * prevents cache + * thrashing when multiple resolvers store the same dynamicMrid + * prevents cache + * thrashing when multiple resolvers store the same dynamicMrid */ - public void saveResolvedRevision(ModuleRevisionId dynamicMrid, String revision); + void saveResolvedRevision(ModuleRevisionId dynamicMrid, String revision); /** * Caches a dynamic revision constraint resolution for a specific resolver. - * - * @param resolverName - * the resolver in which this dynamic revision was resolved - * @param dynamicMrid - * the dynamic module revision id - * @param revision - * the resolved revision + * + * @param resolverName the resolver in which this dynamic revision was resolved + * @param dynamicMrid the dynamic module revision id + * @param revision the resolved revision */ - public void saveResolvedRevision(String resolverName, ModuleRevisionId dynamicMrid, - String revision); + void saveResolvedRevision(String resolverName, ModuleRevisionId dynamicMrid, + String revision); } http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/deliver/DeliverOptions.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/core/deliver/DeliverOptions.java b/src/java/org/apache/ivy/core/deliver/DeliverOptions.java index 577e3dc..6577b7a 100644 --- a/src/java/org/apache/ivy/core/deliver/DeliverOptions.java +++ b/src/java/org/apache/ivy/core/deliver/DeliverOptions.java @@ -197,8 +197,8 @@ public class DeliverOptions { } /** - * Return the configurations which must be deliverd. Returns <tt>null</tt> if all configurations - * has to be deliverd. Attention: the returned array can contain wildcards! + * Return the configurations which must be delivered. Returns <tt>null</tt> if all configurations + * has to be delivered. Attention: the returned array can contain wildcards! * * @return the configurations to deliver */ http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/deliver/PublishingDependencyRevisionResolver.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/core/deliver/PublishingDependencyRevisionResolver.java b/src/java/org/apache/ivy/core/deliver/PublishingDependencyRevisionResolver.java index aa632e3..567de12 100644 --- a/src/java/org/apache/ivy/core/deliver/PublishingDependencyRevisionResolver.java +++ b/src/java/org/apache/ivy/core/deliver/PublishingDependencyRevisionResolver.java @@ -29,10 +29,10 @@ public interface PublishingDependencyRevisionResolver { * Returns the revision of the dependency for the publishing of the 'published' module in * 'publishedStatus' status. * - * @param published - * @param publishedStatus - * @param depMrid - * @param status + * @param published ModuleDescriptor + * @param publishedStatus ditto + * @param depMrid ModuleRevisionId + * @param status ditto * @return the revision of the dependency */ String resolve(ModuleDescriptor published, String publishedStatus, ModuleRevisionId depMrid, http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/event/IvyEvent.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/core/event/IvyEvent.java b/src/java/org/apache/ivy/core/event/IvyEvent.java index b6b938f..18697a0 100644 --- a/src/java/org/apache/ivy/core/event/IvyEvent.java +++ b/src/java/org/apache/ivy/core/event/IvyEvent.java @@ -52,8 +52,8 @@ public class IvyEvent { /** * Should only be called during event object construction, since events should be immutable * - * @param key - * @param value + * @param key ditto + * @param value ditto */ protected void addAttribute(String key, String value) { attributes.put(key, value);
