You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by gi...@apache.org on 2017/11/13 14:56:38 UTC
[1/2] ant-ivy git commit: Checkstyle, continued
Repository: ant-ivy
Updated Branches:
refs/heads/master 5c4da8278 -> 46c7cba7d
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java b/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java
index a9dadbb..97e98b5 100644
--- a/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java
+++ b/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java
@@ -231,11 +231,12 @@ public class URLResolverTest extends AbstractDependencyResolverTest {
assertTrue(repoRoot + " is not a directory", Files.isDirectory(repoRoot));
final DependencyDescriptor dependency = new DefaultDependencyDescriptor(ModuleRevisionId.newInstance("org1", "mod1.1", "2.0"), false);
try (final AutoCloseable httpServer = TestHelper.createHttpServerBackedRepository(fastServerBindAddr, contextRoot, repoRoot)) {
- final String ivyPattern = "http://" + fastServerBindAddr.getHostName() + ":" + fastServerBindAddr.getPort() +
- "/testTimeouts/[organisation]/[module]/ivys/ivy-[revision].xml";
- final String artifactPattern = "http://" + fastServerBindAddr.getHostName() + ":" + fastServerBindAddr.getPort() +
- "/testTimeouts/[organisation]/[module]/[type]s/[artifact]-[revision].[type]";
- // first use a resolver with a high timeout to make sure it can actually fetch the resources
+ final String ivyPattern = "http://" + fastServerBindAddr.getHostName() + ":" + fastServerBindAddr.getPort()
+ + "/testTimeouts/[organisation]/[module]/ivys/ivy-[revision].xml";
+ final String artifactPattern = "http://" + fastServerBindAddr.getHostName() + ":" + fastServerBindAddr.getPort()
+ + "/testTimeouts/[organisation]/[module]/[type]s/[artifact]-[revision].[type]";
+ // first use a resolver with a high timeout to make sure
+ // it can actually fetch the resources
final URLResolver highTimeoutResolver = new URLResolver();
highTimeoutResolver.setName("high-timeout-resolver");
highTimeoutResolver.setAllownomd(false);
@@ -256,18 +257,18 @@ public class URLResolverTest extends AbstractDependencyResolverTest {
assertEquals("Unexpected dependency resolved by resolver " + highTimeoutResolver.getName(), dependency.getDependencyRevisionId(), resolvedModule.getId());
}
- // now test this whole fetch using a resolver with a very low connection timeout and by starting the repo server
- // with a delay so that the connection request can timeout
+ // now test this whole fetch using a resolver with a very low connection timeout and
+ // by starting the repo server with a delay so that the connection request can timeout
// clean the cache before testing to ensure the resource isn't fetched from cache
settings.getDefaultRepositoryCacheManager().clean();
settings.getResolutionCacheManager().clean();
final InetSocketAddress slowServerAddr = new InetSocketAddress("localhost", 23456);
- final String ivyPattern = "http://" + slowServerAddr.getHostName() + ":" + slowServerAddr.getPort() +
- "/testTimeouts/[organisation]/[module]/ivys/ivy-[revision].xml";
- final String artifactPattern = "http://" + slowServerAddr.getHostName() + ":" + slowServerAddr.getPort() +
- "/testTimeouts/[organisation]/[module]/[type]s/[artifact]-[revision].[type]";
+ final String ivyPattern = "http://" + slowServerAddr.getHostName() + ":" + slowServerAddr.getPort()
+ + "/testTimeouts/[organisation]/[module]/ivys/ivy-[revision].xml";
+ final String artifactPattern = "http://" + slowServerAddr.getHostName() + ":" + slowServerAddr.getPort()
+ + "/testTimeouts/[organisation]/[module]/[type]s/[artifact]-[revision].[type]";
final URLResolver lowTimeoutResolver = new URLResolver();
lowTimeoutResolver.setAllownomd(false);
lowTimeoutResolver.setName("low-timeout-resolver");
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/plugins/version/MavenTimedSnapshotVersionMatcherTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/version/MavenTimedSnapshotVersionMatcherTest.java b/test/java/org/apache/ivy/plugins/version/MavenTimedSnapshotVersionMatcherTest.java
index cf97ff5..f984a62 100644
--- a/test/java/org/apache/ivy/plugins/version/MavenTimedSnapshotVersionMatcherTest.java
+++ b/test/java/org/apache/ivy/plugins/version/MavenTimedSnapshotVersionMatcherTest.java
@@ -1,18 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
package org.apache.ivy.plugins.version;
@@ -50,12 +51,14 @@ public class MavenTimedSnapshotVersionMatcherTest {
*/
@Test
public void testSnapshotParsing() throws Exception {
- Assert.assertNull("Revision wasn't expected to be a snapshot", MavenTimedSnapshotVersionMatcher.computeIfSnapshot("1.9.9"));
+ Assert.assertNull("Revision wasn't expected to be a snapshot",
+ MavenTimedSnapshotVersionMatcher.computeIfSnapshot("1.9.9"));
final String regularSnapshot = "1.9.9-SNAPSHOT";
final MavenTimedSnapshotVersionMatcher.MavenSnapshotRevision snapshotRevision = MavenTimedSnapshotVersionMatcher.computeIfSnapshot(regularSnapshot);
Assert.assertNotNull(regularSnapshot + " was expected to be a snapshot", snapshotRevision);
- Assert.assertFalse(regularSnapshot + " wasn't expected to be a timestamped snapshot", snapshotRevision.isTimestampedSnapshot());
+ Assert.assertFalse(regularSnapshot + " wasn't expected to be a timestamped snapshot",
+ snapshotRevision.isTimestampedSnapshot());
final String timestampedRev = "21.03.22-20150925.223013-232";
final MavenTimedSnapshotVersionMatcher.MavenSnapshotRevision timestampedSnapshot = MavenTimedSnapshotVersionMatcher.computeIfSnapshot(timestampedRev);
@@ -63,6 +66,7 @@ public class MavenTimedSnapshotVersionMatcherTest {
Assert.assertTrue(timestampedRev + " was expected to be a timestamped snapshot", timestampedSnapshot.isTimestampedSnapshot());
final String exactRevision = "21.2.2-a20140204.232421-2";
- Assert.assertNull(exactRevision + " wasn't expected to be a snapshot", MavenTimedSnapshotVersionMatcher.computeIfSnapshot(exactRevision));
+ Assert.assertNull(exactRevision + " wasn't expected to be a snapshot",
+ MavenTimedSnapshotVersionMatcher.computeIfSnapshot(exactRevision));
}
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/util/TestXmlHelper.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/util/TestXmlHelper.java b/test/java/org/apache/ivy/util/TestXmlHelper.java
index 440e35a..c895361 100644
--- a/test/java/org/apache/ivy/util/TestXmlHelper.java
+++ b/test/java/org/apache/ivy/util/TestXmlHelper.java
@@ -1,18 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
package org.apache.ivy.util;
@@ -33,8 +34,8 @@ import org.w3c.dom.Document;
public class TestXmlHelper {
/**
- * Evaluates the passed {@link XPathExpression} against the {@link Document} created out of the passed <code>xmlFile</code>
- * and returns the result of the evaluation.
+ * Evaluates the passed {@link XPathExpression} against the {@link Document} created out of the
+ * passed <code>xmlFile</code> and returns the result of the evaluation.
*
* @param xmlFile The XML file to parse
* @param xPathExpression The XPath expression to evaluate
@@ -59,9 +60,11 @@ public class TestXmlHelper {
}
/**
- * Evaluates the passed <code>xpathExpression</code> against the {@link Document} created out of the passed <code>xmlFile</code>
- * and returns the result of the evaluation.
- * This is the same as calling {@link #evaluateXPathExpr(File, XPathExpression, QName)}, with <code>XPathFactory.newInstance().newXPath().compile(xpathExpression)</code> as the {@link XPathExpression} parameter
+ * Evaluates the passed <code>xpathExpression</code> against the {@link Document} created out of
+ * the passed <code>xmlFile</code> and returns the result of the evaluation. This is the same as
+ * calling {@link #evaluateXPathExpr(File, XPathExpression, QName)}, with
+ * <code>XPathFactory.newInstance().newXPath().compile(xpathExpression)</code> as the
+ * {@link XPathExpression} parameter
*
* @param xmlFile The XML file to parse
* @param xpathExpression The XPath expression to evaluate
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java b/test/java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java
index d63cf6d..e30b7b3 100644
--- a/test/java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java
+++ b/test/java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java
@@ -117,8 +117,9 @@ public class HttpclientURLHandlerTest {
}
/**
- * Tests that the {@link HttpClientHandler}, backed by {@link CredentialsStore Ivy credentials store}
- * works as expected when it interacts with a HTTP server which requires authentication for accessing resources.
+ * Tests that the {@link HttpClientHandler}, backed by
+ * {@link CredentialsStore Ivy credentials store} works as expected when it interacts
+ * with a HTTP server which requires authentication for accessing resources.
*
* @throws Exception if something goes wrong
* @see <a href="https://issues.apache.org/jira/browse/IVY-1336">IVY-1336</a>
@@ -148,9 +149,9 @@ public class HttpclientURLHandlerTest {
handler.download(src, target, null, defaultTimeoutConstraint);
assertTrue("File " + target + " was not downloaded from " + src, target.isFile());
}
- // now create a server backed by BASIC auth with a set of credentials that do *not* match with what the
- // Ivy credentials store will return for a given realm+host combination. i.e. Ivy credentials store
- // will return back invalid credentials and the server will reject them
+ // now create a server backed by BASIC auth with a set of credentials that do *not* match
+ // with what the Ivy credentials store will return for a given realm+host combination, i.e.
+ // Ivy credential store will return back invalid credentials and the server will reject them
try (final AutoCloseable server = TestHelper.createBasicAuthHttpServerBackedRepo(serverBindAddr, contextRoot,
repoRoot, realm, Collections.singletonMap("other-" + userName, "other-" + password))) {
@@ -164,9 +165,9 @@ public class HttpclientURLHandlerTest {
Assert.fail("Download from " + src + " was expected to fail due to invalid credentials");
} catch (IOException ioe) {
// we catch it and check for presence of 401 in the exception message.
- // It's not exactly an contract that the IOException will have the 401 message but for now
- // that's how it's implemented and it's fine to check for the presence of that message at the
- // moment
+ // It's not exactly an contract that the IOException will have the 401 message
+ // but for now that's how it's implemented and it's fine to check for the presence
+ // of that message at the moment
assertTrue("Expected to find 401 error message in exception", ioe.getMessage().contains("401"));
}
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/util/url/IvyAuthenticatorTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/util/url/IvyAuthenticatorTest.java b/test/java/org/apache/ivy/util/url/IvyAuthenticatorTest.java
index 002e68d..13375c0 100644
--- a/test/java/org/apache/ivy/util/url/IvyAuthenticatorTest.java
+++ b/test/java/org/apache/ivy/util/url/IvyAuthenticatorTest.java
@@ -1,18 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
package org.apache.ivy.util.url;
@@ -62,9 +63,10 @@ public class IvyAuthenticatorTest {
}
/**
- * Tests that when {@link IvyAuthenticator} can't handle a authentication request and falls back on an authenticator
- * that was previously set, before IvyAuthenticator installed on top of it, the other authenticator gets passed all the
- * relevant requesting information, including the {@link Authenticator#getRequestingURL() requesting URL} and
+ * Tests that when {@link IvyAuthenticator} can't handle a authentication request and falls back
+ * on an authenticator that was previously set, before IvyAuthenticator installed on top of it,
+ * the other authenticator gets passed all the relevant requesting information, including the
+ * {@link Authenticator#getRequestingURL() requesting URL} and
* {@link Authenticator#getRequestorType() request type}
*
* @throws Exception if something goes wrong
[2/2] ant-ivy git commit: Checkstyle, continued
Posted by gi...@apache.org.
Checkstyle, continued
Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/46c7cba7
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/46c7cba7
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/46c7cba7
Branch: refs/heads/master
Commit: 46c7cba7d0aabf179654a0a1c423343552e40210
Parents: 5c4da82
Author: Gintas Grigelionis <gi...@apache.org>
Authored: Mon Nov 13 15:56:43 2017 +0100
Committer: Gintas Grigelionis <gi...@apache.org>
Committed: Mon Nov 13 15:56:43 2017 +0100
----------------------------------------------------------------------
.../org/apache/ivy/ant/IvyCacheFileset.java | 10 +--
.../cache/DefaultRepositoryCacheManager.java | 19 +++--
.../apache/ivy/core/deliver/DeliverOptions.java | 4 +-
.../ivy/core/retrieve/RetrieveOptions.java | 11 +--
.../ivy/plugins/repository/Repository.java | 4 +-
.../ivy/plugins/resolver/IBiblioResolver.java | 44 +++++-----
.../plugins/resolver/LazyTimeoutConstraint.java | 33 ++++----
.../org/apache/ivy/util/ChecksumHelper.java | 3 +-
src/java/org/apache/ivy/util/FileUtil.java | 29 +++----
.../apache/ivy/util/url/HttpClientHandler.java | 5 +-
.../org/apache/ivy/util/url/URLHandler.java | 88 ++++++++++----------
.../apache/ivy/util/url/URLHandlerRegistry.java | 5 +-
.../org/apache/ivy/LocalFileRepoOverHttp.java | 32 +++----
test/java/org/apache/ivy/TestHelper.java | 63 +++++++-------
.../ivy/ant/IvyAntSettingsBuildFileTest.java | 5 +-
.../org/apache/ivy/ant/IvyCachePathTest.java | 5 +-
.../org/apache/ivy/ant/IvyConfigureTest.java | 6 +-
.../ivy/ant/IvyDependencyUpdateCheckerTest.java | 4 +-
.../apache/ivy/ant/IvyPostResolveTaskTest.java | 7 +-
.../java/org/apache/ivy/ant/IvyResolveTest.java | 7 +-
.../core/module/descriptor/IvyMakePomTest.java | 32 +++----
.../apache/ivy/core/module/id/ModuleIdTest.java | 6 +-
.../ivy/core/publish/PublishEventsTest.java | 4 +-
.../ivy/core/report/ResolveReportTest.java | 5 +-
.../apache/ivy/core/retrieve/RetrieveTest.java | 56 ++++++++-----
.../ivy/core/settings/IvySettingsTest.java | 6 +-
.../core/settings/XmlSettingsParserTest.java | 2 +-
.../ivy/osgi/core/OSGiManifestParserTest.java | 3 +-
.../m2/PomModuleDescriptorParserTest.java | 16 ++--
.../xml/XmlModuleDescriptorParserTest.java | 20 +++--
.../repository/vfs/VfsRepositoryTest.java | 5 +-
.../resolver/FileSystemResolverTest.java | 6 +-
.../IBiblioMavenSnapshotsResolutionTest.java | 56 ++++++++-----
.../plugins/resolver/PackagerResolverTest.java | 5 +-
.../plugins/resolver/ResolverTestHelper.java | 5 +-
.../ivy/plugins/resolver/URLResolverTest.java | 23 ++---
.../MavenTimedSnapshotVersionMatcherTest.java | 34 ++++----
.../java/org/apache/ivy/util/TestXmlHelper.java | 37 ++++----
.../ivy/util/url/HttpclientURLHandlerTest.java | 17 ++--
.../ivy/util/url/IvyAuthenticatorTest.java | 32 +++----
40 files changed, 432 insertions(+), 322 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/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 1707ddb..f610950 100644
--- a/src/java/org/apache/ivy/ant/IvyCacheFileset.java
+++ b/src/java/org/apache/ivy/ant/IvyCacheFileset.java
@@ -158,12 +158,12 @@ public class IvyCacheFileset extends IvyCacheTask {
* </p>
*
* @param file1
- * One of the files, for which the common base directory is being sought, may be null.
+ * One of the files, for which the common base directory is being sought, may be null.
* @param file2
- * The other file for which the common base directory should be returned, may be null.
- * @return the common base directory between a <code>file1</code> and <code>file2</code>. Returns
- * null if no common base directory could be determined or if either <code>file1</code>
- * or <code>file2</code> is null
+ * The other file for which the common base directory should be returned, may be null.
+ * @return the common base directory between a <code>file1</code> and <code>file2</code>.
+ * Returns null if no common base directory could be determined or if either
+ * <code>file1</code> or <code>file2</code> is null
*/
File getBaseDir(final File file1, final File file2) {
if (file1 == null || file2 == null) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/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 b2ca78c..8eda88e 100644
--- a/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
+++ b/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
@@ -147,12 +147,14 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
public void setSettings(final IvySettings settings) {
this.settings = settings;
packagingManager.setSettings(settings);
- // process and setup the configured TTLs (which weren't yet processed since they needed a settings instance to be present)
+ // process and setup the configured TTLs (which weren't yet processed since they needed
+ // a settings instance to be present)
for (final ConfiguredTTL configuredTTL : configuredTTLs) {
this.addTTL(configuredTTL.attributes,
configuredTTL.matcher == null ? ExactPatternMatcher.INSTANCE : settings.getMatcher(configuredTTL.matcher), configuredTTL.duration);
}
- // clear off the configured TTLs since we have now processed them and created TTL rules out of them
+ // clear off the configured TTLs since we have now processed them and created TTL rules
+ // out of them
this.configuredTTLs.clear();
}
@@ -267,7 +269,8 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
final long duration = parseDuration(durationValue);
final ConfiguredTTL configuredTTL = new ConfiguredTTL(duration, attributes.get("matcher"), attributes);
// Processing TTLs requires access to an initialized/usable IvySettings instance.
- // we keep track of these configured TTLs and process them when the IvySettings instance becomes usable
+ // We keep track of these configured TTLs and process them when the IvySettings instance
+ // becomes usable
this.configuredTTLs.add(configuredTTL);
}
@@ -340,8 +343,8 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
}
/**
- * True if this cache should use artifacts original location when possible, false if they should
- * be copied to cache.
+ * True if this cache should use artifacts original location when possible, false if they
+ * should be copied to cache.
*
* @return boolean
*/
@@ -1436,9 +1439,9 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
private boolean lockMetadataArtifact(ModuleRevisionId mrid) {
Artifact artifact = getDefaultMetadataArtifact(mrid);
try {
- // we need to provide an artifact origin to be sure we do not end up in a stack overflow
- // if the cache pattern is using original name, and the substitution thus trying to get
- // the saved artifact origin value which in turns calls this method
+ // we need to provide an artifact origin to be sure we do not end up in a stack
+ // overflow if the cache pattern is using original name, and the substitution thus
+ // trying to get the saved artifact origin value which in turns calls this method
return getLockStrategy().lockArtifact(artifact,
getArchiveFileInCache(artifact, getDefaultMetadataArtifactOrigin(mrid)));
} catch (InterruptedException e) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/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 05b70d5..eeffc71 100644
--- a/src/java/org/apache/ivy/core/deliver/DeliverOptions.java
+++ b/src/java/org/apache/ivy/core/deliver/DeliverOptions.java
@@ -205,8 +205,8 @@ public class DeliverOptions {
}
/**
- * 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 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/46c7cba7/src/java/org/apache/ivy/core/retrieve/RetrieveOptions.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/retrieve/RetrieveOptions.java b/src/java/org/apache/ivy/core/retrieve/RetrieveOptions.java
index c74e13e..f977a08 100644
--- a/src/java/org/apache/ivy/core/retrieve/RetrieveOptions.java
+++ b/src/java/org/apache/ivy/core/retrieve/RetrieveOptions.java
@@ -60,9 +60,10 @@ public class RetrieveOptions extends LogOptions {
private Filter<Artifact> artifactFilter = FilterHelper.NO_FILTER;
/**
- * True if a synchronisation of the destination directory should be done, false if a simple copy
- * is enough. Synchronisation means that after the retrieve only files which have been retrieved
- * will be present in the destination directory, which means that some files may be deleted.
+ * True if a synchronisation of the destination directory should be done, false if a simple
+ * copy is enough. Synchronisation means that after the retrieve only files which have been
+ * retrieved will be present in the destination directory, which means that some files may be
+ * deleted.
*/
private boolean sync = false;
@@ -153,8 +154,8 @@ public class RetrieveOptions extends LogOptions {
}
public boolean isMakeSymlinks() {
- // we also do a check on makeSymlinkInMass just to allow backward compatibility for a version
- // or so, to allow users time to move away from symlinkmass option
+ // we also do a check on makeSymlinkInMass just to allow backward compatibility for
+ // a version or so, to allow users time to move away from symlinkmass option
return makeSymlinks || makeSymlinksInMass;
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/src/java/org/apache/ivy/plugins/repository/Repository.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/Repository.java b/src/java/org/apache/ivy/plugins/repository/Repository.java
index e78f20a..54e48e8 100644
--- a/src/java/org/apache/ivy/plugins/repository/Repository.java
+++ b/src/java/org/apache/ivy/plugins/repository/Repository.java
@@ -38,7 +38,9 @@ import org.apache.ivy.core.module.descriptor.Artifact;
* <h3>Resource Publication</h3>
* <p>{@link #put} transfers a file to the repository.</p>
* <h2>resource Listing</h2>
- * <p>{@link #list} returns a listing of file like objects belonging to a specified parent directory.</p>
+ * <p>
+ * {@link #list} returns a listing of file like objects belonging to a specified parent directory.
+ * </p>
*/
public interface Repository {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java b/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java
index 92cf71a..399fe43 100644
--- a/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java
@@ -138,24 +138,26 @@ public class IBiblioResolver extends URLResolver {
// this is a Maven timestamped snapshot revision. Something like 1.0.0-<timestampedRev>
// We now get the base revision from it, which is "1.0.0" and append the "-SNAPSHOT" to it.
final String inferredSnapshotRevision = snapshotRevision.getBaseRevision() + "-SNAPSHOT";
- // we replace the "/[revision]" in the descriptor pattern with the "inferred" snapshot revision
- // which is like "1.0.0-SNAPSHOT".
- // Ultimately, this will translate to something like org/module/1.0.0-SNAPSHOT/artifact-1.0.0-<timestampedRev>(-[classifier]).ext
+ // we replace the "/[revision]" in the descriptor pattern with the "inferred" snapshot
+ // revision which is like "1.0.0-SNAPSHOT". Ultimately, this will translate to
+ // something like
+ // org/module/1.0.0-SNAPSHOT/artifact-1.0.0-<timestampedRev>(-[classifier]).ext
snapshotArtifactPattern = getWholePattern().replaceFirst("/\\[revision\\]", "/" + inferredSnapshotRevision);
} else {
- // it's not a timestamped revision, but a regular snapshot. Try and find
- // any potential timestamped revisions of this regular snapshot, by looking into the maven metadata
+ // it's not a timestamped revision, but a regular snapshot. Try and find any potential
+ // timestamped revisions of this regular snapshot, by looking into the Maven metadata
final String timestampedRev = findTimestampedSnapshotVersion(mrid);
if (timestampedRev == null) {
// no timestamped snapshots found and instead this is just a regular snapshot
- // version. So let's just fallback to our logic of finding resources using configured
- // artifact pattern(s)
+ // version. So let's just fallback to our logic of finding resources using
+ // configured artifact pattern(s)
return null;
}
Message.verbose(mrid + " has been identified as a snapshot revision which has a timestamped snapshot revision " + timestampedRev);
- // we have found a timestamped revision for a snapshot. So we replace the "-[revision]" in the artifact file name to use the
- // timestamped revision.
- // Ultimately, this will translate to something like org/module/1.0.0-SNAPSHOT/artifact-1.0.0-<timestampedRev>(-[classifier]).ext
+ // we have found a timestamped revision for a snapshot. So we replace the "-[revision]"
+ // in the artifact file name to use the timestamped revision.
+ // Ultimately, this will translate to something like
+ // org/module/1.0.0-SNAPSHOT/artifact-1.0.0-<timestampedRev>(-[classifier]).ext
snapshotArtifactPattern = getWholePattern().replaceFirst("\\-\\[revision\\]", "-" + timestampedRev);
}
return findResourceUsingPattern(mrid, snapshotArtifactPattern, artifact, getDefaultRMDParser(artifact
@@ -174,24 +176,26 @@ public class IBiblioResolver extends URLResolver {
// this is a Maven timestamped snapshot revision. Something like 1.0.0-<timestampedRev>
// We now get the base revision from it, which is "1.0.0" and append the "-SNAPSHOT" to it.
final String inferredSnapshotRevision = snapshotRevision.getBaseRevision() + "-SNAPSHOT";
- // we replace the "/[revision]" in the descriptor pattern with the "inferred" snapshot revision
- // which is like "1.0.0-SNAPSHOT".
- // Ultimately, this will translate to something like org/module/1.0.0-SNAPSHOT/artifact-1.0.0-<timestampedRev>(-[classifier]).ext
+ // we replace the "/[revision]" in the descriptor pattern with the "inferred" snapshot
+ // revision which is like "1.0.0-SNAPSHOT".
+ // Ultimately, this will translate to something like
+ // org/module/1.0.0-SNAPSHOT/artifact-1.0.0-<timestampedRev>(-[classifier]).ext
snapshotDescriptorPattern = getWholePattern().replaceFirst("/\\[revision\\]", "/" + inferredSnapshotRevision);
} else {
- // it's not a timestamped revision, but a regular snapshot. Try and find
- // any potential timestamped revisions of this regular snapshot, by looking into the maven metadata
+ // it's not a timestamped revision, but a regular snapshot. Try and find any potential
+ // timestamped revisions of this regular snapshot, by looking into the Maven metadata
final String timestampedRev = findTimestampedSnapshotVersion(mrid);
if (timestampedRev == null) {
// no timestamped snapshots found and instead this is just a regular snapshot
- // version. So let's just fallback to our logic of finding resources using configured
- // Ivy pattern(s)
+ // version. So let's just fallback to our logic of finding resources using
+ // configured Ivy pattern(s)
return null;
}
Message.verbose(mrid + " has been identified as a snapshot revision which has a timestamped snapshot revision " + timestampedRev);
- // we have found a timestamped revision for a snapshot. So we replace the "-[revision]" in the artifact file name to use the
- // timestamped revision.
- // Ultimately, this will translate to something like org/module/1.0.0-SNAPSHOT/artifact-1.0.0-<timestampedRev>(-[classifier]).ext
+ // we have found a timestamped revision for a snapshot. So we replace the "-[revision]"
+ // in the artifact file name to use the timestamped revision.
+ // Ultimately, this will translate to something like
+ // org/module/1.0.0-SNAPSHOT/artifact-1.0.0-<timestampedRev>(-[classifier]).ext
snapshotDescriptorPattern = getWholePattern().replaceFirst("\\-\\[revision\\]", "-" + timestampedRev);
}
// find the descriptor using the snapshot descriptor pattern
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/src/java/org/apache/ivy/plugins/resolver/LazyTimeoutConstraint.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/LazyTimeoutConstraint.java b/src/java/org/apache/ivy/plugins/resolver/LazyTimeoutConstraint.java
index aec17e2..332b81f 100644
--- a/src/java/org/apache/ivy/plugins/resolver/LazyTimeoutConstraint.java
+++ b/src/java/org/apache/ivy/plugins/resolver/LazyTimeoutConstraint.java
@@ -1,18 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
package org.apache.ivy.plugins.resolver;
@@ -20,10 +21,10 @@ package org.apache.ivy.plugins.resolver;
import org.apache.ivy.core.settings.TimeoutConstraint;
/**
- * A {@link TimeoutConstraint} which determines the timeouts by invoking the {@link AbstractResolver underlying resolver}'s
- * {@link AbstractResolver#getTimeoutConstraint()}, whenever the timeouts are requested for.
- * This class can be used when the {@link TimeoutConstraint} is to be created but the underlying resolver, which decides the timeouts,
- * hasn't yet been fully initialized
+ * A {@link TimeoutConstraint} which determines the timeouts by invoking the {@link AbstractResolver
+ * underlying resolver}'s {@link AbstractResolver#getTimeoutConstraint()}, whenever the timeouts are
+ * requested for. This class can be used when the {@link TimeoutConstraint} is to be created but the
+ * underlying resolver, which decides the timeouts, hasn't yet been fully initialized
*/
final class LazyTimeoutConstraint implements TimeoutConstraint {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/src/java/org/apache/ivy/util/ChecksumHelper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/ChecksumHelper.java b/src/java/org/apache/ivy/util/ChecksumHelper.java
index a859fc62..14a9cc3 100644
--- a/src/java/org/apache/ivy/util/ChecksumHelper.java
+++ b/src/java/org/apache/ivy/util/ChecksumHelper.java
@@ -38,7 +38,8 @@ public final class ChecksumHelper {
algorithms.put("md5", "MD5");
algorithms.put("sha1", "SHA-1");
- // higher versions of JRE support these algorithms https://docs.oracle.com/javase/6/docs/technotes/guides/security/StandardNames.html#MessageDigest
+ // higher versions of JRE support these algorithms
+ // https://docs.oracle.com/javase/6/docs/technotes/guides/security/StandardNames.html#MessageDigest
// conditionally add them
if (isAlgorithmSupportedInJRE("SHA-256")) {
algorithms.put("SHA-256", "SHA-256");
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/src/java/org/apache/ivy/util/FileUtil.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/FileUtil.java b/src/java/org/apache/ivy/util/FileUtil.java
index 3f8fa1e..80c3b10 100644
--- a/src/java/org/apache/ivy/util/FileUtil.java
+++ b/src/java/org/apache/ivy/util/FileUtil.java
@@ -61,15 +61,16 @@ public final class FileUtil {
private static final byte[] EMPTY_BUFFER = new byte[0];
/**
- * Creates a symbolic link at {@code link} whose target will be the {@code target}. Depending on the underlying
- * filesystem, this method may not always be able to create a symbolic link, in which case this method returns
- * {@code false}.
+ * Creates a symbolic link at {@code link} whose target will be the {@code target}. Depending
+ * on the underlying filesystem, this method may not always be able to create a symbolic link,
+ * in which case this method returns {@code false}.
*
* @param target The {@link File} which will be the target of the symlink being created
* @param link The path to the symlink that needs to be created
- * @param overwrite {@code true} if any existing file at {@code link} has to be overwritten. False otherwise
- * @return Returns true if the symlink was successfully created. Returns false if the symlink creation couldn't
- * be done
+ * @param overwrite {@code true} if any existing file at {@code link} has to be overwritten.
+ * False otherwise
+ * @return Returns true if the symlink was successfully created. Returns false if the symlink
+ * could not be created
* @throws IOException if {@link Files#createSymbolicLink} fails
*/
public static boolean symlink(final File target, final File link, final boolean overwrite)
@@ -99,14 +100,14 @@ public final class FileUtil {
}
// else it is a file copy
if (dest.exists()) {
- // If overwrite is specified as "true" and the dest file happens to be a
- // symlink, we delete the "link" (a.k.a unlink it). This is for cases
- // like https://issues.apache.org/jira/browse/IVY-1498 where not unlinking
- // the existing symlink can lead to potentially overwriting the wrong "target" file
+ // If overwrite is specified as "true" and the dest file happens to be a symlink,
+ // we delete the "link" (a.k.a unlink it). This is for cases like
+ // https://issues.apache.org/jira/browse/IVY-1498 where not unlinking the existing
+ // symlink can lead to potentially overwriting the wrong "target" file
// TODO: This behaviour is intentionally hardcoded here for now, since I don't
// see a reason (yet) to expose it as a param of this method. If any use case arises
- // we can have this behaviour decided by the callers of this method, by passing a value for this
- // param
+ // we can have this behaviour decided by the callers of this method, by passing
+ // a value for this param
final boolean unlinkSymlinkIfOverwrite = true;
if (!dest.isFile()) {
throw new IOException("impossible to copy: destination is not a file: " + dest);
@@ -116,8 +117,8 @@ public final class FileUtil {
// unlink (a.k.a delete the symlink path)
dest.delete();
} else if (!dest.canWrite()) {
- // if the file *isn't* "writable" (see javadoc of File.canWrite() on what that means)
- // we delete it.
+ // if the file *isn't* "writable" (see javadoc of File.canWrite() on what
+ // that means) we delete it.
dest.delete();
} // if dest is writable, the copy will overwrite it without requiring a delete
} else {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/src/java/org/apache/ivy/util/url/HttpClientHandler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/url/HttpClientHandler.java b/src/java/org/apache/ivy/util/url/HttpClientHandler.java
index c60567d..1e211da 100644
--- a/src/java/org/apache/ivy/util/url/HttpClientHandler.java
+++ b/src/java/org/apache/ivy/util/url/HttpClientHandler.java
@@ -259,8 +259,9 @@ public class HttpClientHandler extends AbstractURLHandler implements AutoCloseab
}
/**
- * Checks the status code of the response and if it's considered as successful response, then this method just returns back.
- * Else it {@link CloseableHttpResponse#close() closes the response} and throws an {@link IOException} for the unsuccessful response.
+ * Checks the status code of the response and if it's considered as successful response, then
+ * this method just returns back. Else it {@link CloseableHttpResponse#close() closes the
+ * response} and throws an {@link IOException} for the unsuccessful response.
*
* @param httpMethod The HTTP method that was used for the source request
* @param sourceURL The URL of the source request
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/src/java/org/apache/ivy/util/url/URLHandler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/url/URLHandler.java b/src/java/org/apache/ivy/util/url/URLHandler.java
index 5f75479..0086d40 100644
--- a/src/java/org/apache/ivy/util/url/URLHandler.java
+++ b/src/java/org/apache/ivy/util/url/URLHandler.java
@@ -32,13 +32,14 @@ import java.net.URL;
public interface URLHandler {
/**
- * Using the slower REQUEST method for getting the basic URL infos. Use this when getting errors
- * behind a problematic/special proxy or firewall chain.
+ * Using the slower REQUEST method for getting the basic URL infos. Use this when getting
+ * errors behind a problematic/special proxy or firewall chain.
*/
int REQUEST_METHOD_GET = 1;
/**
- * Using the faster HEAD method for getting the basic URL infos. Works for most common networks.
+ * Using the faster HEAD method for getting the basic URL infos. Works for most common
+ * networks.
*/
int REQUEST_METHOD_HEAD = 2;
@@ -107,13 +108,13 @@ public interface URLHandler {
* Returns true if the passed <code>URL</code> is reachable. Else returns false. Uses the
* passed <code>timeoutConstraint</code> for determining the connectivity to the URL.
* <p>
- * Please use {@link #getURLInfo(URL, TimeoutConstraint)} if more one information about the <code>url</code>
- * is needed
+ * Please use {@link #getURLInfo(URL, TimeoutConstraint)} if more one information about the
+ * <code>url</code> is needed
* </p>
*
- * @param url The URL to access
- * @param timeoutConstraint The connectivity timeout constraints. Can be null, in which case the timeouts
- * are implementation specific
+ * @param url The URL to access
+ * @param timeoutConstraint The connectivity timeout constraints. Can be null, in which case
+ * the timeouts are implementation specific
* @return boolean
* @since 2.5
*/
@@ -123,8 +124,8 @@ public interface URLHandler {
* Please prefer getURLInfo when several infos are needed.
*
* @param url the url to check
- * @return the length of the target if the given url is reachable, 0 otherwise. No error code in
- * case of http urls.
+ * @return the length of the target if the given url is reachable, 0 otherwise. No error code
+ * in case of http urls.
* @deprecated Use {@link #getContentLength(URL, TimeoutConstraint)} instead
*/
@Deprecated
@@ -134,20 +135,20 @@ public interface URLHandler {
* @param url the url to check
* @param timeout the maximum time before considering an url is not reachable a
* timeout of zero indicates no timeout
- * @return the length of the target if the given url is reachable, 0 otherwise. No error code in
- * case of http urls.
+ * @return the length of the target if the given url is reachable, 0 otherwise. No error code
+ * in case of http urls.
* @deprecated Use {@link #getContentLength(URL, TimeoutConstraint)} instead
*/
@Deprecated
long getContentLength(URL url, int timeout);
/**
- * Returns the number of bytes of data that's available for the resource at the passed <code>url</code>.
- * Returns 0 if the passed <code>url</code> isn't reachable
+ * Returns the number of bytes of data that's available for the resource at the passed
+ * <code>url</code>. Returns 0 if the passed <code>url</code> isn't reachable
*
- * @param url The URL to access
- * @param timeoutConstraint The connectivity timeout constraints. Can be null, in which case the timeouts
- * are implementation specific
+ * @param url The URL to access
+ * @param timeoutConstraint The connectivity timeout constraints. Can be null, in which case
+ * the timeouts are implementation specific
* @return long
* @since 2.5
*/
@@ -175,15 +176,16 @@ public interface URLHandler {
long getLastModified(URL url, int timeout);
/**
- * Returns the last modified timestamp of the resource accessible at the passed <code>url</code>.
+ * Returns the last modified timestamp of the resource accessible at the passed
+ * <code>url</code>.
* <p>
- * Please use {@link #getURLInfo(URL, TimeoutConstraint)} if more one information about the <code>url</code>
- * is needed
+ * Please use {@link #getURLInfo(URL, TimeoutConstraint)} if more one information about the
+ * <code>url</code> is needed
* </p>
*
- * @param url The URL to access
- * @param timeoutConstraint The connectivity timeout constraints. Can be null, in which case the timeouts
- * are implementation specific
+ * @param url The URL to access
+ * @param timeoutConstraint The connectivity timeout constraints. Can be null, in which case
+ * the timeouts are implementation specific
* @return long
* @since 2.5
*/
@@ -201,20 +203,20 @@ public interface URLHandler {
/**
* @param url The url from which information is retrieved.
* @param timeout The timeout in milliseconds.
- * @return The URLInfo extracted from the given url, or {@link #UNAVAILABLE} when the url is not
- * reachable, never null.
+ * @return The URLInfo extracted from the given url, or {@link #UNAVAILABLE} when the url is
+ * not reachable, never null.
* @deprecated Use {@link #getURLInfo(URL, TimeoutConstraint)} instead
*/
@Deprecated
URLInfo getURLInfo(URL url, int timeout);
/**
- * Returns the {@link URLInfo} extracted from the given url, or {@link #UNAVAILABLE} when the url is not
- * reachable. Never returns null.
+ * Returns the {@link URLInfo} extracted from the given url, or {@link #UNAVAILABLE} when the
+ * url is not reachable. Never returns null.
*
- * @param url The URL for which the information is to be retrieved
- * @param timeoutConstraint The connectivity timeout constraints. Can be null, in which case the timeouts
- * are implementation specific
+ * @param url The URL for which the information is to be retrieved
+ * @param timeoutConstraint The connectivity timeout constraints. Can be null, in which case
+ * the timeouts are implementation specific
* @return URLInfo
* @since 2.5
*/
@@ -232,9 +234,9 @@ public interface URLHandler {
/**
* Opens and returns an {@link InputStream} to the passed <code>url</code>.
*
- * @param url The URL to which an {@link InputStream} has to be opened
- * @param timeoutConstraint The connectivity timeout constraints. Can be null, in which case the timeouts
- * are implementation specific
+ * @param url The URL to which an {@link InputStream} has to be opened
+ * @param timeoutConstraint The connectivity timeout constraints. Can be null, in which case
+ * the timeouts are implementation specific
* @return InputStream
* @throws IOException if something goes wrong
* @since 2.5
@@ -254,11 +256,11 @@ public interface URLHandler {
/**
* Downloads the resource available at <code>src</code> to the target <code>dest</code>
*
- * @param src The source URL to download the resource from
- * @param dest The destination {@link File} to download the resource to
- * @param listener The listener that will be notified of the download progress
- * @param timeoutConstraint The connectivity timeout constraints. Can be null, in which case the timeouts
- * are implementation specific
+ * @param src The source URL to download the resource from
+ * @param dest The destination {@link File} to download the resource to
+ * @param listener The listener that will be notified of the download progress
+ * @param timeoutConstraint The connectivity timeout constraints. Can be null, in which case
+ * the timeouts are implementation specific
* @throws IOException if something goes wrong
* @since 2.5
*/
@@ -277,11 +279,11 @@ public interface URLHandler {
/**
* Uploads the <code>src</code> {@link File} to the target <code>dest</code> {@link URL}
*
- * @param src The source {@link File} to upload
- * @param dest The target URL where the {@link File} has to be uploaded
- * @param listener The listener that will be notified of the upload progress
- * @param timeoutConstraint The connectivity timeout constraints. Can be null, in which case the timeouts
- * are implementation specific
+ * @param src The source {@link File} to upload
+ * @param dest The target URL where the {@link File} has to be uploaded
+ * @param listener The listener that will be notified of the upload progress
+ * @param timeoutConstraint The connectivity timeout constraints. Can be null, in which case
+ * the timeouts are implementation specific
* @throws IOException if something goes wrong
* @since 2.5
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/src/java/org/apache/ivy/util/url/URLHandlerRegistry.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/url/URLHandlerRegistry.java b/src/java/org/apache/ivy/util/url/URLHandlerRegistry.java
index 629fd33..b85ea76 100644
--- a/src/java/org/apache/ivy/util/url/URLHandlerRegistry.java
+++ b/src/java/org/apache/ivy/util/url/URLHandlerRegistry.java
@@ -55,8 +55,9 @@ public final class URLHandlerRegistry {
final Field instance = handler.getDeclaredField("DELETE_ON_EXIT_INSTANCE");
return (URLHandler) instance.get(null);
} catch (ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) {
- Message.verbose("Using JDK backed URL handler for HTTP interaction since the " +
- "Apache HttpComponents HttpClient backed handler couldn't be created due to: " + e.getMessage());
+ Message.verbose("Using JDK backed URL handler for HTTP interaction since the "
+ + "Apache HttpComponents HttpClient backed handler couldn't be created due to: "
+ + e.getMessage());
return new BasicURLHandler();
}
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/LocalFileRepoOverHttp.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/LocalFileRepoOverHttp.java b/test/java/org/apache/ivy/LocalFileRepoOverHttp.java
index 7b410bb..1d07577 100644
--- a/test/java/org/apache/ivy/LocalFileRepoOverHttp.java
+++ b/test/java/org/apache/ivy/LocalFileRepoOverHttp.java
@@ -1,18 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
package org.apache.ivy;
@@ -29,9 +30,10 @@ import java.nio.file.Files;
import java.nio.file.Path;
/**
- * A {@link HttpHandler} that can be used in tests to serve local file system based resources over HTTP
- * NOTE: This handler reads the complete file contents, all into memory while serving it and thus isn't suitable
- * with very large files. Use this handler only in test cases where the files to serve are reasonably small in size
+ * A {@link HttpHandler} that can be used in tests to serve local file system based resources over
+ * HTTP NOTE: This handler reads the complete file contents, all into memory while serving it and
+ * thus isn't suitable with very large files. Use this handler only in test cases where the files
+ * to serve are reasonably small in size
*/
final class LocalFileRepoOverHttp implements HttpHandler {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/TestHelper.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/TestHelper.java b/test/java/org/apache/ivy/TestHelper.java
index a006bb1..2a131e9 100644
--- a/test/java/org/apache/ivy/TestHelper.java
+++ b/test/java/org/apache/ivy/TestHelper.java
@@ -90,15 +90,15 @@ public class TestHelper {
public static DefaultRepositoryCacheManager getRepositoryCacheManager(Ivy ivy,
ModuleRevisionId id) {
- // WARN: this doesn't work if the resolver registered is a compound resolver (chain or dual)
- // and a sub resolver doesn't use the same cache manager as the parent
+ // WARN: this doesn't work if the resolver registered is a compound resolver (chain
+ // or dual) and a sub resolver doesn't use the same cache manager as the parent
return (DefaultRepositoryCacheManager) ivy.getSettings().getResolver(id)
.getRepositoryCacheManager();
}
/**
- * Assertion utility methods to test if a collection of {@link ModuleRevisionId} matches a given
- * expected set of mrids.
+ * Assertion utility methods to test if a collection of {@link ModuleRevisionId} matches a
+ * given expected set of mrids.
* <p>
* Expected mrids is given as a String of comma separated string representations of
* {@link ModuleRevisionId}.
@@ -202,8 +202,8 @@ public class TestHelper {
}
/**
- * Parses a collection of module descriptors in the micro ivy format, separated by double semi
- * columns.
+ * Parses a collection of module descriptors in the micro ivy format, separated by double
+ * semicolumns.
*
* @param microIvy
* the text representation of the collection of module descriptors
@@ -358,13 +358,13 @@ public class TestHelper {
}
/**
- * The {@link Authenticator} doesn't have API to get hold of the current system level {@link Authenticator}.
- * This method does a best-effort attempt to try and get hold of the current {@link Authenticator} in a way that's
- * specific to the implementation of this method. There's no guarantee that this method will return the current
- * authenticator.
+ * The {@link Authenticator} doesn't have API to get hold of the current system level
+ * {@link Authenticator}. This method does a best-effort attempt to try and get hold of the
+ * current {@link Authenticator} in a way that's specific to the implementation of this method.
+ * There's no guarantee that this method will return the current authenticator.
*
- * @return Returns the currently setup system level {@link Authenticator}. In cases where this method isn't able to get
- * the current authenticator, this method returns null
+ * @return Returns the currently setup system level {@link Authenticator}. In cases where this
+ * method isn't able to get the current authenticator, this method returns null
*/
public static Authenticator getCurrentAuthenticator() {
// we use reflection to try and get hold of the "current" authenticator
@@ -380,14 +380,16 @@ public class TestHelper {
}
/**
- * Creates a HTTP server, backed by a local file system, which can be used as a repository to serve Ivy module descriptors
- * and artifacts.
- * NOTE: This is supposed to be used only in test cases and only a limited functionality is added in the handler(s) backing the
- * server
+ * Creates a HTTP server, backed by a local file system, which can be used as a repository to
+ * serve Ivy module descriptors and artifacts.
+ * NOTE: This is supposed to be used only in test cases and only a limited functionality is
+ * added in the handler(s) backing the server
*
* @param serverAddress The address to which the server will be bound
- * @param webAppContext The context root of the application which will be handling the requests to the server
- * @param localFilesystemRepoRoot The path to the root directory containing the module descriptors and artifacts
+ * @param webAppContext The context root of the application which will be handling
+ * the requests to the server
+ * @param localFilesystemRepoRoot The path to the root directory containing the module
+ * descriptors and artifacts
* @return AutoCloseable
* @throws IOException if something goes wrong
*/
@@ -409,20 +411,25 @@ public class TestHelper {
}
/**
- * Creates a HTTP server, backed by a local file system, which can be used as a repository to serve Ivy module descriptors
- * and artifacts. The context within the server will be backed by {@code BASIC} authentication mechanism with {@code realm}
- * as the realm and {@code validCredentials} as the credentials that the server will recognize. The server will allow
- * access to resources, only if the credentials that are provided by the request, belong to these credentials.
+ * Creates a HTTP server, backed by a local file system, which can be used as a repository to
+ * serve Ivy module descriptors and artifacts. The context within the server will be backed by
+ * {@code BASIC} authentication mechanism with {@code realm} as the realm and
+ * {@code validCredentials} as the credentials that the server will recognize. The server will
+ * allow access to resources, only if the credentials that are provided by the request, belong
+ * to these credentials.
* <p>
- * NOTE: This is supposed to be used only in test cases and only a limited functionality is added in the handler(s) backing the
- * server
+ * NOTE: This is supposed to be used only in test cases and only a limited functionality is
+ * added in the handler(s) backing the server
*
* @param serverAddress The address to which the server will be bound
- * @param webAppContext The context root of the application which will be handling the requests to the server
- * @param localFilesystemRepoRoot The path to the root directory containing the module descriptors and artifacts
+ * @param webAppContext The context root of the application which will be handling
+ * the requests to the server
+ * @param localFilesystemRepoRoot The path to the root directory containing the module
+ * descriptors and artifacts
* @param realm The realm to use for the {@code BASIC} auth mechanism
- * @param validCredentials A {@link Map} of valid credentials, the key being the user name and the value being the password,
- * that the server will use during the authentication process of the incoming requests
+ * @param validCredentials A {@link Map} of valid credentials, the key being the user
+ * name and the value being the password, that the server will
+ * use during the authentication process of the incoming requests
* @return AutoCloseable
* @throws IOException if something goes wrong
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/ant/IvyAntSettingsBuildFileTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/ant/IvyAntSettingsBuildFileTest.java b/test/java/org/apache/ivy/ant/IvyAntSettingsBuildFileTest.java
index 22b3257..6e1e15f 100644
--- a/test/java/org/apache/ivy/ant/IvyAntSettingsBuildFileTest.java
+++ b/test/java/org/apache/ivy/ant/IvyAntSettingsBuildFileTest.java
@@ -25,7 +25,10 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
public class IvyAntSettingsBuildFileTest {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/ant/IvyCachePathTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/ant/IvyCachePathTest.java b/test/java/org/apache/ivy/ant/IvyCachePathTest.java
index 536022b..aca774b 100644
--- a/test/java/org/apache/ivy/ant/IvyCachePathTest.java
+++ b/test/java/org/apache/ivy/ant/IvyCachePathTest.java
@@ -29,7 +29,10 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
public class IvyCachePathTest {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/ant/IvyConfigureTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/ant/IvyConfigureTest.java b/test/java/org/apache/ivy/ant/IvyConfigureTest.java
index 49f62a9..c729f1b 100644
--- a/test/java/org/apache/ivy/ant/IvyConfigureTest.java
+++ b/test/java/org/apache/ivy/ant/IvyConfigureTest.java
@@ -312,8 +312,8 @@ public class IvyConfigureTest {
}
/**
- * Tests that if the Ivy settings file <code>include</code>s another file as <code>optional</code>,
- * then the absence of that file doesn't lead to failures
+ * Tests that if the Ivy settings file <code>include</code>s another file as
+ * <code>optional</code>, then the absence of that file doesn't lead to failures
*
* @throws Exception if something goes wrong
*/
@@ -325,7 +325,7 @@ public class IvyConfigureTest {
final IvySettings ivySettings = ivy.getSettings();
// just test that it indeed parsed fine
assertTrue("Unexpected number of resolvers in Ivy settings", ivySettings.getResolvers().isEmpty());
- final List<Status> statuses =ivySettings.getStatusManager().getStatuses();
+ final List<Status> statuses = ivySettings.getStatusManager().getStatuses();
assertEquals("Unexpected number of custom status in parsed Ivy settings", 1, statuses.size());
assertEquals("Custom status not found in the parsed Ivy settings", "ivy-1555", statuses.get(0).getName());
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/ant/IvyDependencyUpdateCheckerTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/ant/IvyDependencyUpdateCheckerTest.java b/test/java/org/apache/ivy/ant/IvyDependencyUpdateCheckerTest.java
index 9501a1b..ef4794d 100644
--- a/test/java/org/apache/ivy/ant/IvyDependencyUpdateCheckerTest.java
+++ b/test/java/org/apache/ivy/ant/IvyDependencyUpdateCheckerTest.java
@@ -32,7 +32,9 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.fail;
public class IvyDependencyUpdateCheckerTest extends AntTaskTestCase {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/ant/IvyPostResolveTaskTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/ant/IvyPostResolveTaskTest.java b/test/java/org/apache/ivy/ant/IvyPostResolveTaskTest.java
index 23bbf3f..5c7be0d 100644
--- a/test/java/org/apache/ivy/ant/IvyPostResolveTaskTest.java
+++ b/test/java/org/apache/ivy/ant/IvyPostResolveTaskTest.java
@@ -30,7 +30,12 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
public class IvyPostResolveTaskTest {
private File cache;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/ant/IvyResolveTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/ant/IvyResolveTest.java b/test/java/org/apache/ivy/ant/IvyResolveTest.java
index 3e2ebb2..d5a2a28 100644
--- a/test/java/org/apache/ivy/ant/IvyResolveTest.java
+++ b/test/java/org/apache/ivy/ant/IvyResolveTest.java
@@ -35,7 +35,12 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
public class IvyResolveTest {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/core/module/descriptor/IvyMakePomTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/core/module/descriptor/IvyMakePomTest.java b/test/java/org/apache/ivy/core/module/descriptor/IvyMakePomTest.java
index 9bad4bd..3fdf22b 100644
--- a/test/java/org/apache/ivy/core/module/descriptor/IvyMakePomTest.java
+++ b/test/java/org/apache/ivy/core/module/descriptor/IvyMakePomTest.java
@@ -1,18 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
package org.apache.ivy.core.module.descriptor;
@@ -55,10 +56,9 @@ public class IvyMakePomTest {
}
/**
- * Test case for IVY-1528.
- * An Ivy file containing a <code>classifier</code> extra attribute in its dependency,
- * must retain the <code>classifier</code> in the generated POM when converted to
- * a POM file through {@link IvyMakePom}.
+ * Test case for IVY-1528. An Ivy file containing a <code>classifier</code> extra attribute in
+ * its dependency, must retain the <code>classifier</code> in the generated POM when converted
+ * to a POM file through {@link IvyMakePom}.
*
* @throws Exception if something goes wrong
* @see <a href="https://issues.apache.org/jira/browse/IVY-1528">IVY-1528</a>
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/core/module/id/ModuleIdTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/core/module/id/ModuleIdTest.java b/test/java/org/apache/ivy/core/module/id/ModuleIdTest.java
index a1de1db..ee0fba5 100644
--- a/test/java/org/apache/ivy/core/module/id/ModuleIdTest.java
+++ b/test/java/org/apache/ivy/core/module/id/ModuleIdTest.java
@@ -19,7 +19,11 @@ package org.apache.ivy.core.module.id;
import org.junit.Test;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
public class ModuleIdTest {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/core/publish/PublishEventsTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/core/publish/PublishEventsTest.java b/test/java/org/apache/ivy/core/publish/PublishEventsTest.java
index dab9c2e..5167bcd 100644
--- a/test/java/org/apache/ivy/core/publish/PublishEventsTest.java
+++ b/test/java/org/apache/ivy/core/publish/PublishEventsTest.java
@@ -368,8 +368,8 @@ public class PublishEventsTest {
assertEquals("event declares correct value for " + attributes[i], values[i],
event.getAttributes().get(attributes[i]));
}
- // we test file separately, since it is hard to guarantee an exact path match, but we
- // want to make sure that both paths point to the same canonical location on the
+ // we test file separately, since it is hard to guarantee an exact path match, but
+ // we want to make sure that both paths point to the same canonical location on the
// filesystem
String filePath = event.getAttributes().get("file");
assertEquals("event declares correct value for file",
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/core/report/ResolveReportTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/core/report/ResolveReportTest.java b/test/java/org/apache/ivy/core/report/ResolveReportTest.java
index 0cc0209..6562a17 100644
--- a/test/java/org/apache/ivy/core/report/ResolveReportTest.java
+++ b/test/java/org/apache/ivy/core/report/ResolveReportTest.java
@@ -36,7 +36,10 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
public class ResolveReportTest {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java b/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java
index db03d0b..05c7b91 100644
--- a/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java
+++ b/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java
@@ -259,7 +259,8 @@ public class RetrieveTest {
/**
* This test is here to just test the deprecated {@code symlinkmass} option for retrieve task.
- * A version or two down the line, after 2.5 release, we can remove this test and the option altogether
+ * A version or two down the line, after 2.5 release, we can remove this test and the option
+ * altogether.
*
* @throws Exception if something goes wrong
*/
@@ -288,9 +289,9 @@ public class RetrieveTest {
}
/**
- * If the system {@link #systemHasSymlinkAbility has symlink ability} then asserts that the passed {@code filePath}
- * is a {@link Files#isSymbolicLink(Path) symbolic link}. Else asserts that the {@code filePath}
- * {@link Files#exists(Path, LinkOption...) exists}
+ * If the system {@link #systemHasSymlinkAbility has symlink ability} then asserts that the
+ * passed {@code filePath} is a {@link Files#isSymbolicLink(Path) symbolic link}. Else asserts
+ * that the {@code filePath} {@link Files#exists(Path, LinkOption...) exists}.
*
* @param filePath
*/
@@ -451,28 +452,39 @@ public class RetrieveTest {
* must not lead to repository cache corruption.
* <p>
* The test does the following:
- * - Resolves a module, let's call it "irrelevant-A" which has a dependency on "org:foo-bar:1.2.3"
- * <p>
- * - Invokes a retrieve RT1, with {@link RetrieveOptions#setMakeSymlinks(boolean) symlinks true}
- * on that resolved module with a pattern that translates to a path "a/b/c/foo-bar.jar". When the
- * RT1 retrieve is done, the path "a/b/c/foo-bar.jar" will be a symlink to a path
+ * </p>
+ * <ul>
+ * <li>
+ * Resolves a module, let's call it "irrelevant-A" which has a dependency on
+ * "org:foo-bar:1.2.3"
+ * </li>
+ * <li>
+ * Invokes a retrieve RT1, with {@link RetrieveOptions#setMakeSymlinks(boolean) symlinks true}
+ * on that resolved module with a pattern that translates to a path "a/b/c/foo-bar.jar". When
+ * the RT1 retrieve is done, the path "a/b/c/foo-bar.jar" will be a symlink to a path
* "repo/cache/org/foo-bar/foo-bar-1.2.3.jar" in the Ivy cache.
* All fine so far.
- * <p>
- * - We then resolve another module, let's call it "irrelevant-B" which has a dependency on
+ * </li>
+ * <li>
+ * We then resolve another module, let's call it "irrelevant-B" which has a dependency on
* "org:foo-bar:2.3.4"
- * <p>
- * - Next, do a new retrieve RT2, on this newly resolved module with
+ * </li>
+ * <li>
+ * Next, do a new retrieve RT2, on this newly resolved module with
* {@link RetrieveOptions#setMakeSymlinks(boolean) symlinks false} and
* {@link RetrieveOptions#getOverwriteMode() overwrite semantics enabled}
* and with the same pattern as before), that translates to a path "a/b/c/foo-bar.jar".
+ * </li>
+ * </ul>
* <p>
- * When RT2 retrieve is done, we expect the path "a/b/c/foo-bar.jar" will *not* be a symlink and
- * instead be an actual file that represents the org:foo-bar:2.3.4 artifact jar.
+ * When RT2 retrieve is done, we expect the path "a/b/c/foo-bar.jar" will *not* be a symlink
+ * and instead be an actual file that represents the org:foo-bar:2.3.4 artifact jar.
+ * </p>
* <p>
* We also expect that this RT2 retrieve will not update/overwrite the file at path
* "repo/cache/org/foo-bar/foo-bar-1.2.3.jar" in the Ivy cache - the file that was the end
* target of the symlink generated by the previous RT1.
+ * </p>
*
* @throws Exception if something goes wrong
* @see <a href="https://issues.apache.org/jira/browse/IVY-1498">IVY-1498</a>
@@ -514,9 +526,9 @@ public class RetrieveTest {
assertTrue("Unexpected content in the retrieved artifact at " + retrievedArtifactSymlinkPath,
Arrays.equals(fooBar123ArtifactContentsInCache, retrievedArtifactContent));
- // let this retrieved artifact file stay and let's now try and resolve a module and then retrieve a different version
- // of the same artifact, *without* symlinking enabled, which will end up at this exact location
- // org:mod1:2.0 depends on org:foo-bar:1.2.3
+ // let this retrieved artifact file stay and let's now try and resolve a module and then
+ // retrieve a different version of the same artifact, *without* symlinking enabled, which
+ // will end up at this exact location org:mod1:2.0 depends on org:foo-bar:1.2.3
final ResolveReport resolve2Report = ivy.resolve(new File("test/repositories/1/org/mod1/ivys/ivy-5.0.xml").toURI().toURL(),
getResolveOptions(new String[]{"*"}));
assertNotNull("Resolve report isn't available", resolve2Report);
@@ -543,8 +555,8 @@ public class RetrieveTest {
"2.3.4", "foo-bar", "jar", "jar", "default")).toPath();
assertTrue("Artifact wasn't retrieved to " + secondRetrieveArtifactPath, Files.exists(secondRetrieveArtifactPath));
// expected to be a regular file and not a symlink
- assertFalse("Artifact retrieved at " + secondRetrieveArtifactPath + " wasn't expected to be a " +
- "symlink", Files.isSymbolicLink(secondRetrieveArtifactPath));
+ assertFalse("Artifact retrieved at " + secondRetrieveArtifactPath + " wasn't expected to be a "
+ + "symlink", Files.isSymbolicLink(secondRetrieveArtifactPath));
// get hold of the contents of the retrieved artifact
final byte[] secondRetrievedArtifactContents = Files.readAllBytes(secondRetrieveArtifactPath);
@@ -552,8 +564,8 @@ public class RetrieveTest {
assertTrue("Unexpected content in the retrieved artifact at " + secondRetrieveArtifactPath,
Arrays.equals(foobar234CacheFileContents, secondRetrievedArtifactContents));
- // also make sure that this retrieved content hasn't messed up the other (unrelated) file, in the cache,
- // that was previously symlinked to this retrieved path
+ // also make sure that this retrieved content hasn't messed up the other (unrelated) file,
+ // in the cache, that was previously symlinked to this retrieved path
assertTrue("A second retrieve of an artifact has corrupted an unrelated (previously symlinked) artifact in cache",
Arrays.equals(fooBar123ArtifactContentsInCache, Files.readAllBytes(Paths.get(fooBar123ArtifactInCache.getPath()))));
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/core/settings/IvySettingsTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/core/settings/IvySettingsTest.java b/test/java/org/apache/ivy/core/settings/IvySettingsTest.java
index 11f153b..1c6fb3d 100644
--- a/test/java/org/apache/ivy/core/settings/IvySettingsTest.java
+++ b/test/java/org/apache/ivy/core/settings/IvySettingsTest.java
@@ -25,7 +25,11 @@ import org.apache.ivy.plugins.resolver.DependencyResolver;
import org.junit.Test;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
public class IvySettingsTest {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/core/settings/XmlSettingsParserTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/core/settings/XmlSettingsParserTest.java b/test/java/org/apache/ivy/core/settings/XmlSettingsParserTest.java
index 1dc6866..6299190 100644
--- a/test/java/org/apache/ivy/core/settings/XmlSettingsParserTest.java
+++ b/test/java/org/apache/ivy/core/settings/XmlSettingsParserTest.java
@@ -315,7 +315,7 @@ public class XmlSettingsParserTest {
* Tests that the {@code maven-tsnap-vm} version matcher, configured in the settings file,
* is parsed correctly
*
- * @throws Exception
+ * @throws Exception if something goes wrong
*/
@Test
public void testMavenTimedSnapshotVersionMatcher() throws Exception {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/osgi/core/OSGiManifestParserTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/osgi/core/OSGiManifestParserTest.java b/test/java/org/apache/ivy/osgi/core/OSGiManifestParserTest.java
index 726db64..9e3af94 100644
--- a/test/java/org/apache/ivy/osgi/core/OSGiManifestParserTest.java
+++ b/test/java/org/apache/ivy/osgi/core/OSGiManifestParserTest.java
@@ -71,7 +71,8 @@ public class OSGiManifestParserTest extends AbstractModuleDescriptorParserTester
}
/**
- * Tests that the {@link OSGiManifestParser#parseDescriptor(ParserSettings, URL, Resource, boolean)}
+ * Tests that the
+ * {@link OSGiManifestParser#parseDescriptor(ParserSettings, URL, Resource, boolean)}
* works fine for descriptors that are backed by {@link FileResource}
*
* @throws Exception if something goes wrong
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java b/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
index 7a4abe7..82b42ae 100644
--- a/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
+++ b/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
@@ -636,7 +636,8 @@ public class PomModuleDescriptorParserTest extends AbstractModuleDescriptorParse
new HashSet<>(Arrays.asList(dds[2].getDependencyConfigurations("runtime"))));
assertEquals(0, dds[2].getAllExcludeRules().length);
- // test for IVY-1531 (where the pom.xml can have a exclusion for groupid=* and artifactid=*, implying transitive=false, in ivy land)
+ // test for IVY-1531 (where the pom.xml can have a exclusion for groupid=* and artifactid=*,
+ // implying transitive=false, in Ivy land)
final DependencyDescriptor excludeAllTransitiveDepsDescriptor = dds[3];
assertEquals(ModuleRevisionId.newInstance("org.owasp.esapi", "esapi", "2.1.0"),
excludeAllTransitiveDepsDescriptor.getDependencyRevisionId());
@@ -1091,10 +1092,11 @@ public class PomModuleDescriptorParserTest extends AbstractModuleDescriptorParse
*/
@Test
public void testSystemPropertyAndEnvReferences() throws Exception {
- // the pom we are testing contains reference to a string called "env.THIS_WILL_BE_REPLACED_IN_TEST_BY_A_ENV_VAR".
- // this piece of code replaces it to "env.someenvname" where someenvname is a environment variable we
- // choose in this test case (after randomly picking it from the ones that are set).
- // finally we created the updated pom content in a separate file and test against that file
+ // The pom we are testing contains a reference to a string called
+ // "env.THIS_WILL_BE_REPLACED_IN_TEST_BY_A_ENV_VAR". This piece of code replaces it with
+ // "env.someenvname" where someenvname is a environment variable we choose in this test case
+ // (after randomly picking it from the ones that are set).
+ // Finally we save the updated pom content in a separate file and test against that file
final String envName = chooseSomeEnvVar();
final URL originalPomFile = this.getClass().getResource("test-system-properties.pom");
assertNotNull("Pom file to test, is missing", originalPomFile);
@@ -1107,8 +1109,8 @@ public class PomModuleDescriptorParserTest extends AbstractModuleDescriptorParse
final Path updatedPomFile = Paths.get(workDir.getRoot().toPath().toString(), "updated-test-system-properties.pom");
Files.write(updatedPomFile, replacedContent, Charset.forName("UTF-8"));
- // now start testing
- // we do 2 rounds of testing - one with a system property (referenced in the pom) set and once unset
+ // now start testing - we do 2 rounds -
+ // once with a system property (referenced in the pom) set and once unset
boolean withSystemPropertiesSet = false;
try {
for (int i = 0; i < 2; i++) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java b/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
index d29cbbf..05b365a 100644
--- a/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
+++ b/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
@@ -64,7 +64,11 @@ import java.util.Set;
import static org.apache.ivy.core.module.descriptor.Configuration.Visibility.PRIVATE;
import static org.apache.ivy.core.module.descriptor.Configuration.Visibility.PUBLIC;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
public class XmlModuleDescriptorParserTest extends AbstractModuleDescriptorParserTester {
private IvySettings settings = null;
@@ -1449,10 +1453,11 @@ public class XmlModuleDescriptorParserTest extends AbstractModuleDescriptorParse
}
/**
- * Tests that when the <code>location</code> attribute of the <code>extends</code> element of a module descriptor
- * file, includes an {@link File#isAbsolute() absolute path} with characters that {@link java.net.URI} considers
- * as encoded characters (for example <code>%2F</code>) then the module descriptor and the location of
- * the parent descriptor, are resolved and parsed correctly.
+ * Tests that when the <code>location</code> attribute of the <code>extends</code> element of
+ * a module descriptor file, includes an {@link File#isAbsolute() absolute path} with
+ * characters that {@link java.net.URI} considers as encoded characters (for example,
+ * <code>%2F</code>) then the module descriptor and the location of the parent descriptor
+ * are resolved and parsed correctly.
*
* @throws Exception if something goes wrong
* @see <a href="https://issues.apache.org/jira/browse/IVY-1562">IVY-1562</a>
@@ -1463,8 +1468,9 @@ public class XmlModuleDescriptorParserTest extends AbstractModuleDescriptorParse
assertNotNull("Ivy xml file is missing", ivyXML);
final URL parentIvyXML = this.getClass().getResource("foo%2Fbar/parent-ivy.xml");
assertNotNull("Parent Ivy xml file is missing", parentIvyXML);
- // the ivy xml references a parent ivy xml via extends "location" and expects the parent ivy to be present
- // at a location under java.io.tmpdir, so we copy over the parent ivy file over there
+ // the ivy xml references a parent ivy xml via extends "location" and expects the parent
+ // ivy to be present at a location under java.io.tmpdir, so we copy over the parent ivy
+ // file over there
final Path targetDir = Paths.get(System.getProperty("java.io.tmpdir"), "foo%2Fbar");
Files.createDirectories(targetDir);
final Path parentIvyXMLPath = Paths.get(targetDir.toString(), "parent-ivy.xml");
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/plugins/repository/vfs/VfsRepositoryTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/repository/vfs/VfsRepositoryTest.java b/test/java/org/apache/ivy/plugins/repository/vfs/VfsRepositoryTest.java
index e5cd9b8..925367e 100644
--- a/test/java/org/apache/ivy/plugins/repository/vfs/VfsRepositoryTest.java
+++ b/test/java/org/apache/ivy/plugins/repository/vfs/VfsRepositoryTest.java
@@ -26,7 +26,10 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
/**
* Testing was the single biggest hurdle I faced. I have tried to provide a complete test
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/plugins/resolver/FileSystemResolverTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/resolver/FileSystemResolverTest.java b/test/java/org/apache/ivy/plugins/resolver/FileSystemResolverTest.java
index 6446d9c..07c75e7 100644
--- a/test/java/org/apache/ivy/plugins/resolver/FileSystemResolverTest.java
+++ b/test/java/org/apache/ivy/plugins/resolver/FileSystemResolverTest.java
@@ -55,7 +55,11 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
/**
*
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/plugins/resolver/IBiblioMavenSnapshotsResolutionTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/resolver/IBiblioMavenSnapshotsResolutionTest.java b/test/java/org/apache/ivy/plugins/resolver/IBiblioMavenSnapshotsResolutionTest.java
index a52cb9c..e5374df 100644
--- a/test/java/org/apache/ivy/plugins/resolver/IBiblioMavenSnapshotsResolutionTest.java
+++ b/test/java/org/apache/ivy/plugins/resolver/IBiblioMavenSnapshotsResolutionTest.java
@@ -1,18 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
*/
package org.apache.ivy.plugins.resolver;
@@ -40,8 +41,9 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
/**
- * Tests that the {@link IBiblioResolver} can resolve both regular Maven snapshot (like 1.0.2-SNAPSHOT)
- * and timestamped Maven snapshot (like 1.0.2-20100925.223013-19) dependencies correctly
+ * Tests that the {@link IBiblioResolver} can resolve both regular Maven snapshot (like
+ * 1.0.2-SNAPSHOT) and timestamped Maven snapshot (like 1.0.2-20100925.223013-19) dependencies
+ * correctly.
*/
public class IBiblioMavenSnapshotsResolutionTest {
@@ -62,14 +64,19 @@ public class IBiblioMavenSnapshotsResolutionTest {
}
/**
- * Tests that a Ivy module that depends on regular and timestamped snapshots of Maven artifacts, when resolved using
- * a {@link IBiblioResolver} and with {@link MavenTimedSnapshotVersionMatcher} configured in {@link IvySettings}, is
- * resolved correctly for such snapshot dependencies.
+ * Tests that an Ivy module that depends on regular and timestamped snapshots of Maven
+ * artifacts, when resolved using a {@link IBiblioResolver} and with
+ * {@link MavenTimedSnapshotVersionMatcher} configured in {@link IvySettings}, is resolved
+ * correctly for such snapshot dependencies.
+ *
+ * @throws Exception
+ * if something goes wrong
*/
@Test
public void testSnapshotResolution() throws Exception {
final IvySettings settings = this.ivy.getSettings();
- Assert.assertNotNull("Maven timestamped snapshot revision version matcher is absent", settings.getVersionMatcher(new MavenTimedSnapshotVersionMatcher().getName()));
+ Assert.assertNotNull("Maven timestamped snapshot revision version matcher is absent",
+ settings.getVersionMatcher(new MavenTimedSnapshotVersionMatcher().getName()));
final ResolveOptions resolveOptions = new ResolveOptions();
resolveOptions.setConfs(new String[]{"default"});
final ResolveReport report = ivy.resolve(new File("test/repositories/2/maven-snapshot-deps-test/ivy-with-maven-snapshot-deps.xml"), resolveOptions);
@@ -78,7 +85,8 @@ public class IBiblioMavenSnapshotsResolutionTest {
final ModuleDescriptor md = report.getModuleDescriptor();
assertNotNull("Module descriptor in resolution report was null", md);
- final ModuleRevisionId mrid = ModuleRevisionId.newInstance("org.apache.ivy", "maven-snapshot-deps-test", "1.2.3");
+ final ModuleRevisionId mrid = ModuleRevisionId.newInstance("org.apache.ivy",
+ "maven-snapshot-deps-test", "1.2.3");
assertEquals("Unexpected module resolved", mrid, md.getModuleRevisionId());
final ConfigurationResolveReport crr = report.getConfigurationReport("default");
@@ -88,22 +96,24 @@ public class IBiblioMavenSnapshotsResolutionTest {
assertNotNull("Artifact download report missing for dependency " + exactRevision, dr1);
assertEquals("Unexpected number of artifact download report for dependency " + exactRevision, dr1.length, 1);
final ArtifactDownloadReport exactRevDownloadReport = dr1[0];
- assertEquals("Unexpected download status for dependency " + exactRevision, exactRevDownloadReport.getDownloadStatus(), DownloadStatus.SUCCESSFUL);
-
+ assertEquals("Unexpected download status for dependency " + exactRevision,
+ exactRevDownloadReport.getDownloadStatus(), DownloadStatus.SUCCESSFUL);
final ModuleRevisionId regularSnapshot = ModuleRevisionId.newInstance("org.apache.ivy.maven-snapshot-test", "regular-snapshot", "1.2.3-SNAPSHOT");
final ArtifactDownloadReport[] dr2 = crr.getDownloadReports(regularSnapshot);
assertNotNull("Artifact download report missing for dependency " + regularSnapshot, dr2);
assertEquals("Unexpected number of artifact download report for dependency " + regularSnapshot, dr2.length, 1);
final ArtifactDownloadReport regularSnapshotDownloadReport = dr2[0];
- assertEquals("Unexpected download status for dependency " + regularSnapshot, regularSnapshotDownloadReport.getDownloadStatus(), DownloadStatus.SUCCESSFUL);
+ assertEquals("Unexpected download status for dependency " + regularSnapshot,
+ regularSnapshotDownloadReport.getDownloadStatus(), DownloadStatus.SUCCESSFUL);
final ModuleRevisionId timestampedSnapshot = ModuleRevisionId.newInstance("org.apache.ivy.maven-snapshot-test", "timestamped-snapshot", "5.6.7-20170911.130943-1");
final ArtifactDownloadReport[] dr3 = crr.getDownloadReports(timestampedSnapshot);
assertNotNull("Artifact download report missing for dependency " + timestampedSnapshot, dr3);
assertEquals("Unexpected number of artifact download report for dependency " + timestampedSnapshot, dr3.length, 1);
final ArtifactDownloadReport timestampedSnapshotDownloadReport = dr3[0];
- assertEquals("Unexpected download status for dependency " + timestampedSnapshot, timestampedSnapshotDownloadReport.getDownloadStatus(), DownloadStatus.SUCCESSFUL);
+ assertEquals("Unexpected download status for dependency " + timestampedSnapshot,
+ timestampedSnapshotDownloadReport.getDownloadStatus(), DownloadStatus.SUCCESSFUL);
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/plugins/resolver/PackagerResolverTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/resolver/PackagerResolverTest.java b/test/java/org/apache/ivy/plugins/resolver/PackagerResolverTest.java
index a82cf27..1cd1aa2 100644
--- a/test/java/org/apache/ivy/plugins/resolver/PackagerResolverTest.java
+++ b/test/java/org/apache/ivy/plugins/resolver/PackagerResolverTest.java
@@ -45,7 +45,10 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
/**
* Tests PackagerResolver.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/46c7cba7/test/java/org/apache/ivy/plugins/resolver/ResolverTestHelper.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/resolver/ResolverTestHelper.java b/test/java/org/apache/ivy/plugins/resolver/ResolverTestHelper.java
index 1182ae7..7312b3b 100644
--- a/test/java/org/apache/ivy/plugins/resolver/ResolverTestHelper.java
+++ b/test/java/org/apache/ivy/plugins/resolver/ResolverTestHelper.java
@@ -23,7 +23,10 @@ import org.apache.ivy.core.search.ModuleEntry;
import org.apache.ivy.core.search.OrganisationEntry;
import org.apache.ivy.core.search.RevisionEntry;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
/**
*