You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by jh...@apache.org on 2017/05/29 11:17:49 UTC
[01/15] ant-ivy git commit: More code cleanup
Repository: ant-ivy
Updated Branches:
refs/heads/master 90274e109 -> 24b5e00be
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/util/PropertiesFile.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/PropertiesFile.java b/src/java/org/apache/ivy/util/PropertiesFile.java
index f4d2048..f1705ef 100644
--- a/src/java/org/apache/ivy/util/PropertiesFile.java
+++ b/src/java/org/apache/ivy/util/PropertiesFile.java
@@ -26,6 +26,7 @@ import java.util.Properties;
/**
* A simple Properties extension easing the loading and saving of data
*/
+@SuppressWarnings("serial")
public class PropertiesFile extends Properties {
private File file;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/util/StringUtils.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/StringUtils.java b/src/java/org/apache/ivy/util/StringUtils.java
index c60efb7..1151872 100644
--- a/src/java/org/apache/ivy/util/StringUtils.java
+++ b/src/java/org/apache/ivy/util/StringUtils.java
@@ -23,7 +23,7 @@ import java.lang.reflect.InvocationTargetException;
import java.util.Locale;
/**
- * Convenient class used only for uncapitalization Usually use commons lang but here we do not want
+ * Convenient class used only for uncapitalization. Usually use commons lang but here we do not want
* to have such a dependency for only one feature
*/
public final class StringUtils {
@@ -96,7 +96,7 @@ public final class StringUtils {
* The array of objects (<code>toString()</code> is used).
* @param sep
* The separator to use.
- * @return The concatinated string.
+ * @return The concatenated string.
*/
public static String join(Object[] objs, String sep) {
StringBuffer buf = new StringBuffer();
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/util/XMLHelper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/XMLHelper.java b/src/java/org/apache/ivy/util/XMLHelper.java
index 8f64ad8..78d691e 100644
--- a/src/java/org/apache/ivy/util/XMLHelper.java
+++ b/src/java/org/apache/ivy/util/XMLHelper.java
@@ -90,7 +90,7 @@ public abstract class XMLHelper {
canDisableExternalDtds = Boolean.FALSE;
}
}
- return canDisableExternalDtds.booleanValue();
+ return canDisableExternalDtds;
}
/**
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/util/cli/CommandLineParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/cli/CommandLineParser.java b/src/java/org/apache/ivy/util/cli/CommandLineParser.java
index a24ab70..84877f0 100644
--- a/src/java/org/apache/ivy/util/cli/CommandLineParser.java
+++ b/src/java/org/apache/ivy/util/cli/CommandLineParser.java
@@ -45,6 +45,7 @@ public class CommandLineParser {
return this;
}
+ @SuppressWarnings("unchecked")
public CommandLineParser addOption(Option option) {
options.put(option.getName(), option);
if (!categories.isEmpty()) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/util/cli/ParseException.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/cli/ParseException.java b/src/java/org/apache/ivy/util/cli/ParseException.java
index 93fe6dc..1d97ef0 100644
--- a/src/java/org/apache/ivy/util/cli/ParseException.java
+++ b/src/java/org/apache/ivy/util/cli/ParseException.java
@@ -17,6 +17,7 @@
*/
package org.apache.ivy.util.cli;
+@SuppressWarnings("serial")
public class ParseException extends Exception {
public ParseException(String reason) {
super(reason);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/util/extendable/ExtendableItemHelper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/extendable/ExtendableItemHelper.java b/src/java/org/apache/ivy/util/extendable/ExtendableItemHelper.java
index c7c3f57..3cc0f8d 100644
--- a/src/java/org/apache/ivy/util/extendable/ExtendableItemHelper.java
+++ b/src/java/org/apache/ivy/util/extendable/ExtendableItemHelper.java
@@ -43,11 +43,11 @@ public final class ExtendableItemHelper {
/**
* Extract from the XML attribute the extra Ivy ones
*
- * @param settings
- * @param attributes
+ * @param settings ParserSettings
+ * @param attributes Attributes
* @param ignoredAttNames
* the XML attributes names which are not extra but Ivy core ones
- * @return
+ * @return Map<String,String>
*/
public static Map<String, String> getExtraAttributes(ParserSettings settings,
Attributes attributes, String[] ignoredAttNames) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/util/filter/FilterHelper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/filter/FilterHelper.java b/src/java/org/apache/ivy/util/filter/FilterHelper.java
index d491e2d..9e79e13 100644
--- a/src/java/org/apache/ivy/util/filter/FilterHelper.java
+++ b/src/java/org/apache/ivy/util/filter/FilterHelper.java
@@ -54,7 +54,7 @@ public final class FilterHelper {
}
/**
- * Returns a new collection containing only the items from the given collectoin, which are
+ * Returns a new collection containing only the items from the given collection, which are
* accepted by the filter.
*
* @param col
@@ -63,9 +63,9 @@ public final class FilterHelper {
* The filter to use.
* @return A new collection instance containing the only the instance accepted by the filter.
*
- * <br />
- * Comment: We could have used <a
- * href="http://jakarta.apache.org/commons/collections/">Commons-Collections</a>
+ * <br />
+ * Comment: We could have used
+ * <a href="http://jakarta.apache.org/commons/collections/">Commons-Collections</a>
* facility for this. If we accepted to add dependencies on third party jars.
*/
public static <T> Collection<T> filter(Collection<T> col, Filter<T> filter) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/util/url/ApacheURLLister.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/url/ApacheURLLister.java b/src/java/org/apache/ivy/util/url/ApacheURLLister.java
index 24f0f43..b1dc456 100644
--- a/src/java/org/apache/ivy/util/url/ApacheURLLister.java
+++ b/src/java/org/apache/ivy/util/url/ApacheURLLister.java
@@ -52,7 +52,7 @@ public class ApacheURLLister {
* The base URL from which to retrieve the listing.
* @return a list of sub urls of the given url.
* @throws IOException
- * If an error occures retrieving the HTML.
+ * If an error occurs retrieving the HTML.
*/
public List<URL> listAll(URL url) throws IOException {
return retrieveListing(url, true, true);
@@ -65,7 +65,7 @@ public class ApacheURLLister {
* The base URL from which to retrieve the listing.
* @return a list of sub 'directories' of the given url.
* @throws IOException
- * If an error occures retrieving the HTML.
+ * If an error occurs retrieving the HTML.
*/
public List<URL> listDirectories(URL url) throws IOException {
return retrieveListing(url, false, true);
@@ -79,7 +79,7 @@ public class ApacheURLLister {
* The base URL from which to retrieve the listing.
* @return a list of sub 'files' of the given url.
* @throws IOException
- * If an error occures retrieving the HTML.
+ * If an error occurs retrieving the HTML.
*/
public List<URL> listFiles(URL url) throws IOException {
return retrieveListing(url, true, false);
@@ -97,7 +97,7 @@ public class ApacheURLLister {
* If true include directories in the returned list.
* @return A {@link List} of {@link URL}s.
* @throws IOException
- * If an error occures retrieving the HTML.
+ * If an error occurs retrieving the HTML.
*/
public List<URL> retrieveListing(URL url, boolean includeFiles, boolean includeDirectories)
throws IOException {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/util/url/BasicURLHandler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/url/BasicURLHandler.java b/src/java/org/apache/ivy/util/url/BasicURLHandler.java
index 0ad23c5..51e0de1 100644
--- a/src/java/org/apache/ivy/util/url/BasicURLHandler.java
+++ b/src/java/org/apache/ivy/util/url/BasicURLHandler.java
@@ -29,7 +29,6 @@ import java.net.URL;
import java.net.URLConnection;
import java.net.UnknownHostException;
-import org.apache.ivy.Ivy;
import org.apache.ivy.util.CopyProgressListener;
import org.apache.ivy.util.FileUtil;
import org.apache.ivy.util.Message;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/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 64d4a25..a3bcac4 100644
--- a/src/java/org/apache/ivy/util/url/HttpClientHandler.java
+++ b/src/java/org/apache/ivy/util/url/HttpClientHandler.java
@@ -48,7 +48,6 @@ import org.apache.commons.httpclient.methods.HeadMethod;
import org.apache.commons.httpclient.methods.PutMethod;
import org.apache.commons.httpclient.methods.RequestEntity;
import org.apache.commons.httpclient.params.HttpMethodParams;
-import org.apache.ivy.Ivy;
import org.apache.ivy.util.CopyProgressListener;
import org.apache.ivy.util.FileUtil;
import org.apache.ivy.util.HostUtil;
@@ -145,6 +144,7 @@ public class HttpClientHandler extends AbstractURLHandler {
return getURLInfo(url, 0);
}
+ @SuppressWarnings("deprecation")
public URLInfo getURLInfo(URL url, int timeout) {
HttpMethodBase method = null;
try {
@@ -246,6 +246,7 @@ public class HttpClientHandler extends AbstractURLHandler {
return helper.getHttpClientMajorVersion();
}
+ @SuppressWarnings("deprecation")
private GetMethod doGet(URL url, int timeout) throws IOException {
HttpClient client = getClient();
client.setTimeout(timeout);
@@ -257,6 +258,7 @@ public class HttpClientHandler extends AbstractURLHandler {
return get;
}
+ @SuppressWarnings("deprecation")
private HeadMethod doHead(URL url, int timeout) throws IOException {
HttpClient client = getClient();
client.setTimeout(timeout);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/util/url/IvyAuthenticator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/url/IvyAuthenticator.java b/src/java/org/apache/ivy/util/url/IvyAuthenticator.java
index 99cb99d..40fa50a 100644
--- a/src/java/org/apache/ivy/util/url/IvyAuthenticator.java
+++ b/src/java/org/apache/ivy/util/url/IvyAuthenticator.java
@@ -18,7 +18,6 @@
package org.apache.ivy.util.url;
import java.lang.reflect.Field;
-import java.lang.reflect.Method;
import java.net.Authenticator;
import java.net.PasswordAuthentication;
@@ -84,7 +83,7 @@ public final class IvyAuthenticator extends Authenticator {
String proxyUser = System.getProperty("http.proxyUser");
if ((proxyUser != null) && (proxyUser.trim().length() > 0)) {
String proxyPass = System.getProperty("http.proxyPassword", "");
- Message.debug("authenicating to proxy server with username [" + proxyUser + "]");
+ Message.debug("authenticating to proxy server with username [" + proxyUser + "]");
result = new PasswordAuthentication(proxyUser, proxyPass.toCharArray());
}
} else {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/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 21f10f1..8bffe97 100644
--- a/src/java/org/apache/ivy/util/url/URLHandlerRegistry.java
+++ b/src/java/org/apache/ivy/util/url/URLHandlerRegistry.java
@@ -37,7 +37,7 @@ public final class URLHandlerRegistry {
}
/**
- * This method is used to get appropriate http downloader dependening on Jakarta Commons
+ * This method is used to get appropriate http downloader depending on Jakarta Commons
* HttpClient availability in classpath, or simply use jdk url handling in other cases.
*
* @return most accurate http downloader
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/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 35b6783..72d216b 100644
--- a/test/java/org/apache/ivy/TestHelper.java
+++ b/test/java/org/apache/ivy/TestHelper.java
@@ -284,7 +284,8 @@ public class TestHelper {
/**
* Cleans up the test repository and cache.
- *
+ *
+ * @see #newTestRepository()
*/
public static void cleanTest() {
cleanTestRepository();
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/ant/IvyArtifactPropertyTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/ant/IvyArtifactPropertyTest.java b/test/java/org/apache/ivy/ant/IvyArtifactPropertyTest.java
index 7281cc8..44365c6 100644
--- a/test/java/org/apache/ivy/ant/IvyArtifactPropertyTest.java
+++ b/test/java/org/apache/ivy/ant/IvyArtifactPropertyTest.java
@@ -17,21 +17,18 @@
*/
package org.apache.ivy.ant;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
import java.io.File;
import org.apache.ivy.TestHelper;
-
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-
public class IvyArtifactPropertyTest {
private IvyArtifactProperty prop;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/ant/IvyCleanCacheTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/ant/IvyCleanCacheTest.java b/test/java/org/apache/ivy/ant/IvyCleanCacheTest.java
index 1414656..e8b6932 100644
--- a/test/java/org/apache/ivy/ant/IvyCleanCacheTest.java
+++ b/test/java/org/apache/ivy/ant/IvyCleanCacheTest.java
@@ -17,23 +17,19 @@
*/
package org.apache.ivy.ant;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
import java.io.File;
import org.apache.ivy.TestHelper;
-
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
-
-import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
public class IvyCleanCacheTest {
private IvyCleanCache cleanCache;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/ant/IvyDependencyTreeTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/ant/IvyDependencyTreeTest.java b/test/java/org/apache/ivy/ant/IvyDependencyTreeTest.java
index dbda413..23c1ed4 100644
--- a/test/java/org/apache/ivy/ant/IvyDependencyTreeTest.java
+++ b/test/java/org/apache/ivy/ant/IvyDependencyTreeTest.java
@@ -21,16 +21,12 @@ import java.io.File;
import org.apache.ivy.TestHelper;
import org.apache.ivy.ant.testutil.AntTaskTestCase;
-
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import static org.junit.Assert.fail;
-
public class IvyDependencyTreeTest extends AntTaskTestCase {
private IvyDependencyTree dependencyTree;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/ant/IvyResourcesTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/ant/IvyResourcesTest.java b/test/java/org/apache/ivy/ant/IvyResourcesTest.java
index 665e33b..95a9c9d 100644
--- a/test/java/org/apache/ivy/ant/IvyResourcesTest.java
+++ b/test/java/org/apache/ivy/ant/IvyResourcesTest.java
@@ -17,6 +17,9 @@
*/
package org.apache.ivy.ant;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
@@ -24,19 +27,13 @@ import java.util.List;
import org.apache.ivy.Ivy;
import org.apache.ivy.TestHelper;
-
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.resources.FileResource;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
public class IvyResourcesTest {
private IvyResources resources;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManagerTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManagerTest.java b/test/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManagerTest.java
index 7c817ce..a31d826 100644
--- a/test/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManagerTest.java
+++ b/test/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManagerTest.java
@@ -17,6 +17,9 @@
*/
package org.apache.ivy.core.cache;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -45,23 +48,22 @@ import org.apache.ivy.util.DefaultMessageLogger;
import org.apache.ivy.util.Message;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.Delete;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
/**
* @see DefaultResolutionCacheManager
*/
public class DefaultRepositoryCacheManagerTest {
private DefaultRepositoryCacheManager cacheManager;
+
private Artifact artifact;
+
private ArtifactOrigin origin;
+
private Ivy ivy;
@Before
@@ -145,7 +147,7 @@ public class DefaultRepositoryCacheManagerTest {
// and a latest.integration mrid/dd
ModuleRevisionId mridLatest = new ModuleRevisionId(mi, "trunk", "latest.integration");
- DependencyDescriptor ddLatest = new DefaultDependencyDescriptor(mridLatest, false);
+ DependencyDescriptor ddLatest = new DefaultDependencyDescriptor(mridLatest, false);
// and some random options
CacheMetadataOptions options = new CacheMetadataOptions().setCheckTTL(false);
@@ -175,8 +177,8 @@ public class DefaultRepositoryCacheManagerTest {
// latest.integration will resolve to 1.1 in resolver1
ModuleRevisionId mrid11 = new ModuleRevisionId(mi, "trunk", "1.1");
- DependencyDescriptor dd11 = new DefaultDependencyDescriptor(mrid11, false);
DefaultArtifact artifact11 = new DefaultArtifact(mrid11, new Date(), "module-1.1.ivy", "ivy", "ivy", true);
+ DependencyDescriptor dd11 = new DefaultDependencyDescriptor(mrid11, false);
BasicResource resource11 = new BasicResource("/module-1-1.ivy", true, 1, 0, true);
ResolvedResource mdRef11 = new ResolvedResource(resource11, "1.1");
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/core/module/id/ModuleRevisionIdTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/core/module/id/ModuleRevisionIdTest.java b/test/java/org/apache/ivy/core/module/id/ModuleRevisionIdTest.java
index aa647cb..ca257c5 100644
--- a/test/java/org/apache/ivy/core/module/id/ModuleRevisionIdTest.java
+++ b/test/java/org/apache/ivy/core/module/id/ModuleRevisionIdTest.java
@@ -17,16 +17,14 @@
*/
package org.apache.ivy.core.module.id;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
+import static org.junit.Assert.assertEquals;
import java.util.HashMap;
import java.util.Map;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
public class ModuleRevisionIdTest {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/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 219e71b..60971a4 100644
--- a/test/java/org/apache/ivy/osgi/core/OSGiManifestParserTest.java
+++ b/test/java/org/apache/ivy/osgi/core/OSGiManifestParserTest.java
@@ -17,6 +17,10 @@
*/
package org.apache.ivy.osgi.core;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
import java.io.File;
import java.net.URL;
import java.util.Arrays;
@@ -30,14 +34,9 @@ import org.apache.ivy.plugins.repository.Resource;
import org.apache.ivy.plugins.repository.file.FileResource;
import org.apache.ivy.util.DefaultMessageLogger;
import org.apache.ivy.util.Message;
-
import org.junit.Before;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
public class OSGiManifestParserTest extends AbstractModuleDescriptorParserTester {
private IvySettings settings;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/osgi/filter/OSGiFilterTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/osgi/filter/OSGiFilterTest.java b/test/java/org/apache/ivy/osgi/filter/OSGiFilterTest.java
index 4f601f0..6d2d846 100644
--- a/test/java/org/apache/ivy/osgi/filter/OSGiFilterTest.java
+++ b/test/java/org/apache/ivy/osgi/filter/OSGiFilterTest.java
@@ -17,14 +17,13 @@
*/
package org.apache.ivy.osgi.filter;
+import static org.junit.Assert.assertEquals;
+
import java.text.ParseException;
import org.apache.ivy.osgi.filter.CompareFilter.Operator;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
public class OSGiFilterTest {
@Test(expected = ParseException.class)
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/osgi/obr/OBRResolverTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/osgi/obr/OBRResolverTest.java b/test/java/org/apache/ivy/osgi/obr/OBRResolverTest.java
index 6ce7c3e..c4c8a91 100644
--- a/test/java/org/apache/ivy/osgi/obr/OBRResolverTest.java
+++ b/test/java/org/apache/ivy/osgi/obr/OBRResolverTest.java
@@ -17,12 +17,16 @@
*/
package org.apache.ivy.osgi.obr;
+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 java.io.File;
import java.io.FileInputStream;
import java.text.ParseException;
import java.util.Arrays;
import java.util.HashSet;
-import java.util.List;
import java.util.Set;
import java.util.jar.JarInputStream;
import java.util.jar.Manifest;
@@ -52,12 +56,9 @@ import org.apache.ivy.osgi.repo.AbstractOSGiResolver.RequirementStrategy;
import org.apache.ivy.plugins.resolver.DependencyResolver;
import org.apache.ivy.plugins.resolver.DualResolver;
import org.apache.ivy.plugins.resolver.FileSystemResolver;
-
import org.junit.Before;
import org.junit.Test;
-import static org.junit.Assert.*;
-
public class OBRResolverTest {
private static final ModuleRevisionId MRID_TEST_BUNDLE = ModuleRevisionId.newInstance(
@@ -327,9 +328,8 @@ public class OBRResolverTest {
assertFalse("resolve failed " + resolveReport.getAllProblemMessages(),
resolveReport.hasError());
Set<ModuleRevisionId> actual = new HashSet<ModuleRevisionId>();
- List<Artifact> artifacts = resolveReport.getArtifacts();
- for (Artifact artfact : artifacts) {
- actual.add(artfact.getModuleRevisionId());
+ for (Artifact artifact : resolveReport.getArtifacts()) {
+ actual.add(artifact.getModuleRevisionId());
}
Set<ModuleRevisionId> expected = new HashSet<ModuleRevisionId>(Arrays.asList(expectedMrids));
if (expected2Mrids != null) {
@@ -346,6 +346,7 @@ public class OBRResolverTest {
assertEquals(expected, actual);
}
+ @SuppressWarnings("resource")
private void genericTestFailingResolve(String jarName, String conf) throws Exception {
Manifest manifest = new JarInputStream(new FileInputStream("test/test-repo/bundlerepo/"
+ jarName)).getManifest();
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/osgi/obr/OBRXMLWriterTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/osgi/obr/OBRXMLWriterTest.java b/test/java/org/apache/ivy/osgi/obr/OBRXMLWriterTest.java
index 9c84be0..db991db 100644
--- a/test/java/org/apache/ivy/osgi/obr/OBRXMLWriterTest.java
+++ b/test/java/org/apache/ivy/osgi/obr/OBRXMLWriterTest.java
@@ -36,9 +36,7 @@ import org.apache.ivy.osgi.repo.BundleRepoDescriptor;
import org.apache.ivy.osgi.repo.ModuleDescriptorWrapper;
import org.apache.ivy.osgi.util.Version;
import org.apache.ivy.util.CollectionUtils;
-
import org.junit.Test;
-
import org.xml.sax.ContentHandler;
public class OBRXMLWriterTest {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/plugins/circular/IgnoreCircularDependencyStrategyTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/circular/IgnoreCircularDependencyStrategyTest.java b/test/java/org/apache/ivy/plugins/circular/IgnoreCircularDependencyStrategyTest.java
index 60f1fd3..10707f4 100644
--- a/test/java/org/apache/ivy/plugins/circular/IgnoreCircularDependencyStrategyTest.java
+++ b/test/java/org/apache/ivy/plugins/circular/IgnoreCircularDependencyStrategyTest.java
@@ -17,22 +17,21 @@
*/
package org.apache.ivy.plugins.circular;
+import static org.junit.Assert.assertEquals;
+
import org.apache.ivy.TestHelper;
import org.apache.ivy.core.IvyContext;
-import org.apache.ivy.util.Message;
import org.apache.ivy.util.MessageLoggerEngine;
import org.apache.ivy.util.MockMessageLogger;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-
public class IgnoreCircularDependencyStrategyTest {
private CircularDependencyStrategy strategy;
private MockMessageLogger mockMessageImpl;
+
private MessageLoggerEngine messageLoggerEngine;
@Before
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/plugins/circular/WarnCircularDependencyStrategyTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/circular/WarnCircularDependencyStrategyTest.java b/test/java/org/apache/ivy/plugins/circular/WarnCircularDependencyStrategyTest.java
index 714dd84..6e80127 100644
--- a/test/java/org/apache/ivy/plugins/circular/WarnCircularDependencyStrategyTest.java
+++ b/test/java/org/apache/ivy/plugins/circular/WarnCircularDependencyStrategyTest.java
@@ -17,7 +17,6 @@
*/
package org.apache.ivy.plugins.circular;
-import junit.framework.TestCase;
import org.apache.ivy.TestHelper;
import org.apache.ivy.core.IvyContext;
import org.apache.ivy.core.event.EventManager;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManagerTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManagerTest.java b/test/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManagerTest.java
index f7a44c8..104c63b 100644
--- a/test/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManagerTest.java
+++ b/test/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManagerTest.java
@@ -17,6 +17,9 @@
*/
package org.apache.ivy.plugins.conflict;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
import java.io.IOException;
import java.text.ParseException;
@@ -29,10 +32,6 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
public class LatestCompatibleConflictManagerTest {
private TestFixture fixture;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/plugins/conflict/RegexpConflictManagerTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/conflict/RegexpConflictManagerTest.java b/test/java/org/apache/ivy/plugins/conflict/RegexpConflictManagerTest.java
index fc0da2e..94ac7a4 100644
--- a/test/java/org/apache/ivy/plugins/conflict/RegexpConflictManagerTest.java
+++ b/test/java/org/apache/ivy/plugins/conflict/RegexpConflictManagerTest.java
@@ -17,6 +17,8 @@
*/
package org.apache.ivy.plugins.conflict;
+import static org.junit.Assert.fail;
+
import java.io.File;
import org.apache.ivy.Ivy;
@@ -28,9 +30,6 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
public class RegexpConflictManagerTest {
private Ivy ivy;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/plugins/conflict/StrictConflictManagerTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/conflict/StrictConflictManagerTest.java b/test/java/org/apache/ivy/plugins/conflict/StrictConflictManagerTest.java
index 69920b4..0851a87 100644
--- a/test/java/org/apache/ivy/plugins/conflict/StrictConflictManagerTest.java
+++ b/test/java/org/apache/ivy/plugins/conflict/StrictConflictManagerTest.java
@@ -17,6 +17,8 @@
*/
package org.apache.ivy.plugins.conflict;
+import static org.junit.Assert.assertTrue;
+
import java.io.File;
import org.apache.ivy.Ivy;
@@ -26,9 +28,6 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
public class StrictConflictManagerTest {
private Ivy ivy;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/plugins/matcher/AbstractPatternMatcherTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/matcher/AbstractPatternMatcherTest.java b/test/java/org/apache/ivy/plugins/matcher/AbstractPatternMatcherTest.java
index 15892e1..b7f532f 100644
--- a/test/java/org/apache/ivy/plugins/matcher/AbstractPatternMatcherTest.java
+++ b/test/java/org/apache/ivy/plugins/matcher/AbstractPatternMatcherTest.java
@@ -17,10 +17,11 @@
*/
package org.apache.ivy.plugins.matcher;
-import org.junit.Before;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.*;
+import org.junit.Test;
/**
* Base test classes for PatternMatcher testcase implementation
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcherTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcherTest.java b/test/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcherTest.java
index 9f14ac1..791958d 100644
--- a/test/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcherTest.java
+++ b/test/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcherTest.java
@@ -17,14 +17,13 @@
*/
package org.apache.ivy.plugins.matcher;
-import org.junit.Before;
-import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
import java.util.regex.PatternSyntaxException;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import org.junit.Before;
+import org.junit.Test;
/**
*
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/plugins/matcher/GlobPatternMatcherTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/matcher/GlobPatternMatcherTest.java b/test/java/org/apache/ivy/plugins/matcher/GlobPatternMatcherTest.java
index b5c98d5..47b561e 100644
--- a/test/java/org/apache/ivy/plugins/matcher/GlobPatternMatcherTest.java
+++ b/test/java/org/apache/ivy/plugins/matcher/GlobPatternMatcherTest.java
@@ -17,14 +17,13 @@
*/
package org.apache.ivy.plugins.matcher;
-import org.junit.Before;
-import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
import java.util.regex.PatternSyntaxException;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import org.junit.Before;
+import org.junit.Test;
/**
* @see GlobPatternMatcher
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/plugins/matcher/RegexpPatternMatcherTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/matcher/RegexpPatternMatcherTest.java b/test/java/org/apache/ivy/plugins/matcher/RegexpPatternMatcherTest.java
index ead0ae4..9576c27 100644
--- a/test/java/org/apache/ivy/plugins/matcher/RegexpPatternMatcherTest.java
+++ b/test/java/org/apache/ivy/plugins/matcher/RegexpPatternMatcherTest.java
@@ -17,13 +17,12 @@
*/
package org.apache.ivy.plugins.matcher;
-import org.junit.Before;
-import org.junit.Test;
+import static org.junit.Assert.assertTrue;
import java.util.regex.PatternSyntaxException;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import org.junit.Before;
+import org.junit.Test;
/**
* @see RegexpPatternMatcher
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/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 098f3c8..ad80cf8 100644
--- a/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
+++ b/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
@@ -17,6 +17,11 @@
*/
package org.apache.ivy.plugins.parser.m2;
+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 java.io.File;
import java.io.IOException;
import java.net.URL;
@@ -44,15 +49,12 @@ import org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParserTest;
import org.apache.ivy.plugins.repository.url.URLResource;
import org.apache.ivy.plugins.resolver.DependencyResolver;
import org.apache.ivy.plugins.resolver.MockResolver;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import static org.junit.Assert.*;
-
public class PomModuleDescriptorParserTest extends AbstractModuleDescriptorParserTester {
private IvySettings settings = new IvySettings();
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleUpdaterTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleUpdaterTest.java b/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleUpdaterTest.java
index 294d457..68be597 100644
--- a/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleUpdaterTest.java
+++ b/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleUpdaterTest.java
@@ -17,6 +17,12 @@
*/
package org.apache.ivy.plugins.parser.xml;
+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;
+
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
@@ -41,16 +47,9 @@ import org.apache.ivy.core.module.id.ModuleRevisionId;
import org.apache.ivy.core.settings.IvySettings;
import org.apache.ivy.plugins.repository.BasicResource;
import org.apache.ivy.util.FileUtil;
-
import org.junit.After;
-import org.junit.Rule;
import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.xml.sax.SAXParseException;
-
-import static org.junit.Assert.*;
-
public class XmlModuleUpdaterTest {
@After
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/plugins/repository/vfs/VfsResourceTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/repository/vfs/VfsResourceTest.java b/test/java/org/apache/ivy/plugins/repository/vfs/VfsResourceTest.java
index 07e2161..13a311b 100644
--- a/test/java/org/apache/ivy/plugins/repository/vfs/VfsResourceTest.java
+++ b/test/java/org/apache/ivy/plugins/repository/vfs/VfsResourceTest.java
@@ -17,6 +17,12 @@
*/
package org.apache.ivy.plugins.repository.vfs;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
@@ -24,14 +30,10 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-import org.apache.commons.lang.StringUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import static org.junit.Assert.*;
-
public class VfsResourceTest {
private VfsTestHelper helper = null;
@@ -48,7 +50,6 @@ public class VfsResourceTest {
/**
* Validate VFSResource creation for a valid VFS URI pointing to an physically existing file
*/
- @SuppressWarnings("unused")
@Test
public void testCreateResourceThatExists() throws Exception {
Iterator vfsURIs = helper.createVFSUriSet(VfsTestHelper.TEST_IVY_XML).iterator();
@@ -81,23 +82,15 @@ public class VfsResourceTest {
* @return url The querystring with invalid characters escaped
*/
private String escapeUrl(String queryString) {
- queryString = StringUtils.replace(queryString, " ", "%20");
- queryString = StringUtils.replace(queryString, "\"", "%22");
- queryString = StringUtils.replace(queryString, "%", "%26");
- queryString = StringUtils.replace(queryString, "=", "%3D");
- queryString = StringUtils.replace(queryString, "/", "%2F");
- queryString = StringUtils.replace(queryString, "+", "%2B");
- queryString = StringUtils.replace(queryString, "&", "%26");
- queryString = StringUtils.replace(queryString, "~", "%7E");
- queryString = StringUtils.replace(queryString, "?", "%3F");
- return queryString;
+ return queryString.replaceAll(" ", "%20").replaceAll("\"", "%22").replaceAll("%", "%26")
+ .replaceAll("=", "%3D").replaceAll("/", "%2F").replaceAll("\\+", "%2B")
+ .replaceAll("&", "%26").replaceAll("~", "%7E").replaceAll("\\?", "%3F");
}
/**
* Validating that resource can be created for files which don't physically exists - e.g.
* resources that are going to created.
*/
- @SuppressWarnings("unused")
@Test
public void testCreateResourceThatDoesntExist() throws Exception {
Iterator vfsURIs = helper.createVFSUriSet("zzyyxx.zzyyxx").iterator();
@@ -125,7 +118,6 @@ public class VfsResourceTest {
/**
* Validate VFSResource creation when given a poorly formed VFS identifier
*/
- @SuppressWarnings("unused")
@Test
public void testBadURI() throws Exception {
String vfsURI = "smb1:/goobeldygook";
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/test/java/org/apache/ivy/util/IvyPatternHelperTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/util/IvyPatternHelperTest.java b/test/java/org/apache/ivy/util/IvyPatternHelperTest.java
index 55c6fc7..4593953 100644
--- a/test/java/org/apache/ivy/util/IvyPatternHelperTest.java
+++ b/test/java/org/apache/ivy/util/IvyPatternHelperTest.java
@@ -17,15 +17,14 @@
*/
package org.apache.ivy.util;
+import static org.junit.Assert.assertEquals;
+
import java.util.HashMap;
import java.util.Map;
import org.apache.ivy.core.IvyPatternHelper;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
public class IvyPatternHelperTest {
@Test
public void testSubstitute() {
[08/15] ant-ivy git commit: Make Java 8 doclint happy;
adjust javadoc Ant target; remove connection to svn from build.xml
Posted by jh...@apache.org.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/event/IvyEventFilter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/event/IvyEventFilter.java b/src/java/org/apache/ivy/core/event/IvyEventFilter.java
index 6b0d87e..ac9251f 100644
--- a/src/java/org/apache/ivy/core/event/IvyEventFilter.java
+++ b/src/java/org/apache/ivy/core/event/IvyEventFilter.java
@@ -34,6 +34,7 @@ import org.apache.ivy.util.filter.OrFilter;
* attribute values is done using the {@link PatternMatcher} used to construct this object. Here are
* some examples:
* <table>
+ * <caption>Filtering examples</caption>
* <tr>
* <td>expression</td>
* <td>effect</td>
@@ -60,10 +61,10 @@ import org.apache.ivy.util.filter.OrFilter;
* </tr>
* </table>
* Combination of these can be used, but no parentheses are supported right now, so only the default
- * priority can be used. The priority order is this one: AND OR NOT = This means that artifact=foo
- * AND ext=zip OR type=src will match event with artifact matching foo AND (ext matching zip OR type
- * matching src)
- *
+ * priority can be used. The priority order is this one: <code>AND OR NOT =</code> This means that
+ * <code>artifact=foo AND ext=zip OR type=src</code> will match event with artifact matching foo AND
+ * (ext matching zip OR type matching src)
+ *
* @since 1.4
*/
public class IvyEventFilter implements Filter {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
index 00fdea8..10ec684 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
@@ -57,7 +57,7 @@ public class DefaultDependencyDescriptor implements DependencyDescriptor {
* descriptor in the system namespace. <i>Note that exclude rules are not converted in system
* namespace, because they aren't transformable (the name space hasn't the ability to convert
* regular expressions). However, method doesExclude will work with system artifacts.</i>
- *
+ *
* @param dd DependencyDescriptor
* @param ns Namespace
* @return DependencyDescriptor
@@ -76,9 +76,10 @@ public class DefaultDependencyDescriptor implements DependencyDescriptor {
* Transforms a dependency descriptor using the given transformer. Note that no namespace info
* will be attached to the transformed dependency descriptor, so calling doesExclude is not
* recommended (doesExclude only works when namespace is properly set)
- *
+ *
* @param dd DependencyDescriptor
* @param t NamespaceTransformer
+ * @param fromSystem boolean
* @return DefaultDependencyDescriptor
*/
public static DefaultDependencyDescriptor transformInstance(DependencyDescriptor dd,
@@ -252,6 +253,7 @@ public class DefaultDependencyDescriptor implements DependencyDescriptor {
* extending one). Both moduleConfiguration and requestedConfiguration are configurations of the
* caller, the array returned is composed of the required configurations of the dependency
* described by this descriptor.
+ * </p>
*/
public String[] getDependencyConfigurations(String moduleConfiguration,
String requestedConfiguration) {
@@ -288,16 +290,22 @@ public class DefaultDependencyDescriptor implements DependencyDescriptor {
* we do not handle special confs like *!sg or [cond]* in right hand
* confs yet: it would require supporting parenthesis grouping in
* configurations intersection interpretation
- *
- * for (Iterator it2 = depConfs.iterator(); it2.hasNext();) { String
- * depConf = (String) it2.next(); if (depConf.startsWith("*")) { if
- * (intersectedDepConf .indexOf("(" + depConf + ")") != -1) {
- * intersectedDepConfs.add(intersectedDepConf); } else {
- * intersectedDepConfs.add( "(" + intersectedDepConf + ")+(" +
- * depConf + ")"); } } else if (intersectedDepConf.startsWith("*"))
- * { if (depConf .indexOf("(" + intersectedDepConf + ")") != -1) {
- * intersectedDepConfs.add(depConf); } else {
- * intersectedDepConfs.add( depConf + "+" + intersectedDepConf); } }
+ *
+ * for (Iterator it2 = depConfs.iterator(); it2.hasNext();) {
+ * String depConf = (String) it2.next();
+ * if (depConf.startsWith("*")) {
+ * if (intersectedDepConf .indexOf("(" + depConf + ")") != -1) {
+ * intersectedDepConfs.add(intersectedDepConf);
+ * } else {
+ * intersectedDepConfs.add( "(" + intersectedDepConf + ")+(" + depConf + ")");
+ * }
+ * } else if (intersectedDepConf.startsWith("*")) {
+ * if (depConf .indexOf("(" + intersectedDepConf + ")") != -1) {
+ * intersectedDepConfs.add(depConf);
+ * } else {
+ * intersectedDepConfs.add( depConf + "+" + intersectedDepConf);
+ * }
+ * }
* }
*/
}
@@ -406,7 +414,7 @@ public class DefaultDependencyDescriptor implements DependencyDescriptor {
/**
* Replaces fallback patterns with correct values if fallback pattern exists.
- *
+ *
* @param pattern
* pattern to look for
* @param conf
@@ -607,7 +615,7 @@ public class DefaultDependencyDescriptor implements DependencyDescriptor {
}
/**
- *
+ *
* @return true if this descriptor contains any exclusion rule
*/
public boolean canExclude() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
index 1c039b6..b286bc2 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
@@ -133,7 +133,7 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
* descriptor in the system namespace. <i>Note that dependency exclude rules are not converted
* in system namespace, because they aren't transformable (the name space hasn't the ability to
* convert regular expressions)</i>
- *
+ *
* @param md ModuleDescriptor
* @param ns Namespace
* @return ModuleDescriptor
@@ -280,6 +280,9 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
/**
* IMPORTANT : at least call setModuleRevisionId and setResolvedPublicationDate with instances
* created by this constructor !
+ *
+ * @param parser ModuleDescriptorParser
+ * @param res Resource
*/
public DefaultModuleDescriptor(ModuleDescriptorParser parser, Resource res) {
this.parser = parser;
@@ -361,7 +364,7 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
/**
* Artifact configurations are not used since added artifact may not be entirely completed, so
* its configurations data may not be accurate
- *
+ *
* @param conf ditto
* @param artifact ditto
*/
@@ -427,6 +430,8 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
/**
* Returns the configuration object with the given name in the current module descriptor, null
* if not found.
+ *
+ * @param confName String
*/
public Configuration getConfiguration(String confName) {
Configuration configuration = configurations.get(confName);
@@ -599,7 +604,7 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
/**
* regular expressions as explained in Pattern class may be used in ModuleId organisation and
* name
- *
+ *
* @param moduleId ditto
* @param matcher PatternMatcher
* @param manager ConflictManager
@@ -681,7 +686,7 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
}
/**
- * Throws an exception if the module descriptor is inconsistent For the moment, only extended
+ * Throws an exception if the module descriptor is inconsistent. For the moment, only extended
* configurations existence and cycles are checked
*/
public void check() {
@@ -781,8 +786,12 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
}
/**
- * only works when namespace is properly set. The behaviour is not specified if namespace is not
- * set
+ * Only works when namespace is properly set. The behaviour is not specified if namespace is
+ * not set.
+ *
+ * @param moduleConfigurations String[]
+ * @param artifactId ditto
+ * @return boolean
*/
public boolean doesExclude(String[] moduleConfigurations, ArtifactId artifactId) {
if (namespace != null) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/module/descriptor/DependencyArtifactDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/DependencyArtifactDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/DependencyArtifactDescriptor.java
index 1ea78da..f20080f 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/DependencyArtifactDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/DependencyArtifactDescriptor.java
@@ -27,44 +27,32 @@ import org.apache.ivy.util.extendable.ExtendableItem;
*/
public interface DependencyArtifactDescriptor extends ExtendableItem {
/**
- * Returns the dependency descriptor in which this dependency artifact descriptor is declared.
- *
* @return the dependency descriptor in which this dependency artifact descriptor is declared.
*/
public DependencyDescriptor getDependencyDescriptor();
/**
- * Returns the name of the artifact asked
- *
- * @return
+ * @return the name of the artifact asked
*/
public String getName();
/**
- * Returns the type of the artifact asked
- *
- * @return
+ * @return the type of the artifact asked
*/
public String getType();
/**
- * Returns the ext of the artifact asked
- *
- * @return
+ * @return the ext of the artifact asked
*/
public String getExt();
/**
- * Returns the url to look this artifact at
- *
- * @return
+ * @return the url to look this artifact up at
*/
public URL getUrl();
/**
- * Returns the configurations of the module in which the artifact is asked
- *
- * @return an array of configuration names in which the artifact is asked
+ * @return an array of configuration names of the module in which the artifact is asked
*/
public String[] getConfigurations();
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java
index 13973d8..880c0e3 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java
@@ -34,11 +34,11 @@ import org.apache.ivy.util.extendable.ExtendableItem;
* </p>
* <p>
* Then there is the dynamic constraint, which can either be the same as the default constraint, or
- * the original dependency constraint when an Ivy file is delivered an published to a repository.
- * This dynamic constraint is returned by {@link #getDynamicConstraintDependencyRevisionId()}, and
- * corresponds to the <code>revconstraint</code> attribute in the Ivy file. In some resolve mode,
- * this constraint can be used instead of the default dependency constraint when performing
- * dependency resolution.
+ * the original dependency constraint when an Ivy file is delivered an published to a
+ * repository. This dynamic constraint is returned by
+ * {@link #getDynamicConstraintDependencyRevisionId()}, and corresponds to the
+ * <code>revconstraint</code> attribute in the Ivy file. In some resolve mode, this constraint can
+ * be used instead of the default dependency constraint when performing dependency resolution.
* </p>
*/
public interface DependencyDescriptor extends ExtendableItem, InheritableItem {
@@ -47,7 +47,7 @@ public interface DependencyDescriptor extends ExtendableItem, InheritableItem {
/**
* Used to indicate that this revision must be used in case of conflicts, independently of
* conflicts manager. This only works for direct dependencies, and not transitive ones.
- *
+ *
* @return true if this dependency should be used, false if conflicts manager can do its work.
*/
boolean isForce();
@@ -57,7 +57,7 @@ public interface DependencyDescriptor extends ExtendableItem, InheritableItem {
* that the revision may have its artifacts modified without revision change. When new artifacts
* are published a new ivy file should also be published with a new publication date to indicate
* to ivy that artifacts have changed and that they should be downloaded again.
- *
+ *
* @return true if this dependency is a changing one
*/
boolean isChanging();
@@ -68,14 +68,14 @@ public interface DependencyDescriptor extends ExtendableItem, InheritableItem {
/**
* Returns the constraint on dependency this descriptor represents.
- *
+ *
* @return the constraint on dependency.
*/
ModuleRevisionId getDependencyRevisionId();
/**
* Returns the dynamic constraint on dependency this descriptor represents.
- *
+ *
* @return the dynamic constraint on dependency, or exact constraint if no dynamic constraint is
* specified.
*/
@@ -111,7 +111,7 @@ public interface DependencyDescriptor extends ExtendableItem, InheritableItem {
/**
* Returns true if
- *
+ *
* @param moduleConfigurations ditto
* @param artifactId ditto
* @return boolean
@@ -119,8 +119,6 @@ public interface DependencyDescriptor extends ExtendableItem, InheritableItem {
boolean doesExclude(String[] moduleConfigurations, ArtifactId artifactId);
/**
- * Returns true if this descriptor contains any exclusion rule
- *
* @return true if this descriptor contains any exclusion rule
*/
public boolean canExclude();
@@ -129,7 +127,7 @@ public interface DependencyDescriptor extends ExtendableItem, InheritableItem {
/**
* Clones current dependency descriptor with another revision.
- *
+ *
* @param revision
* the revision of the cloned dependency descriptor
* @return the cloned dependency descriptor
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/module/descriptor/ExtendsDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/ExtendsDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/ExtendsDescriptor.java
index 8b7456d..b953104 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/ExtendsDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/ExtendsDescriptor.java
@@ -24,12 +24,18 @@ import org.apache.ivy.core.module.id.ModuleRevisionId;
*/
public interface ExtendsDescriptor {
- /** get the module revision id of the declared parent descriptor */
+ /**
+ * get the module revision id of the declared parent descriptor
+ *
+ * @return ModuleRevisionId
+ */
public ModuleRevisionId getParentRevisionId();
/**
* get the resolved revision id for {@link #getParentRevisionId}, see
* {@link org.apache.ivy.core.module.descriptor.ModuleDescriptor#getResolvedModuleRevisionId()}
+ *
+ * @return ModuleRevisionId
*/
public ModuleRevisionId getResolvedParentRevisionId();
@@ -38,6 +44,8 @@ public interface ExtendsDescriptor {
/**
* If there is an explicit path to check for the parent descriptor, return it. Otherwise returns
* null.
+ *
+ * @return String
*/
public String getLocation();
@@ -46,22 +54,34 @@ public interface ExtendsDescriptor {
* <code>info</code>, <code>description</code>, <code>configurations</code>,
* <code>dependencies</code>, and/or <code>all</code>. Ivy extensions may add support for
* additional extends types.
+ *
+ * @return String[]
*/
public String[] getExtendsTypes();
- /** @return true if the <code>all</code> extend type is specified, implying all other types */
+ /**
+ * @return true if the <code>all</code> extend type is specified, implying all other types
+ */
public boolean isAllInherited();
- /** @return true if parent info attributes are inherited (organisation, branch, revision, etc) */
+ /**
+ * @return true if parent info attributes are inherited (organisation, branch, revision, etc)
+ */
public boolean isInfoInherited();
- /** @return true if parent description is inherited */
+ /**
+ * @return true if parent description is inherited
+ */
public boolean isDescriptionInherited();
- /** @return true if parent configurations are inherited */
+ /**
+ * @return true if parent configurations are inherited
+ */
public boolean areConfigurationsInherited();
- /** @return true if parent dependencies are inherited */
+ /**
+ * @return true if parent dependencies are inherited
+ */
public boolean areDependenciesInherited();
public boolean isLocal();
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
index 1116d88..6b4a2a0 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
@@ -46,35 +46,31 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
public static final String CALLER_ALL_CONFIGURATION = "all";
/**
- * Returns true if this descriptor is a default one, i.e. one generated for a module not
- * actually having one.
- *
- * @return boolean
+ * @return true if this descriptor is a default one, i.e. one generated for a module not
+ * actually having one.
*/
boolean isDefault();
ModuleRevisionId getModuleRevisionId();
/**
- * The module revision id returned here is the resolved one, i.e. it is never a latest one. If
- * the revision has not been resolved, a null revision should be returned by getRevision() of
- * the returned ModuleRevisionId. This revision must be the same as the module descriptor
- * resolved revision id unless no module descriptor is defined
- *
- * @return ModuleRevisionId
+ * @return the resolved module revision id; it is never the latest one. If the revision has not
+ * been resolved, a null revision should be returned by getRevision() of the returned
+ * ModuleRevisionId. This revision must be the same as the module descriptor resolved
+ * revision id unless no module descriptor is defined
*/
ModuleRevisionId getResolvedModuleRevisionId();
/**
- * This method update the resolved module revision id
+ * This method updates the resolved module revision id
*
* @param revId ModuleRevisionId
*/
void setResolvedModuleRevisionId(ModuleRevisionId revId);
/**
- * Get the list of parent descriptors imported via an <extends> element. Only directly
- * imported descriptors are included; the parent's parents are not included.
+ * @return the list of parent descriptors imported via an <extends> element. Only directly
+ * imported descriptors are included; the parent's parents are not included.
*/
ExtendsDescriptor[] getInheritedDescriptors();
@@ -88,9 +84,7 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
String getStatus();
/**
- * May be <code>null</code> if unknown in the descriptor itself.
- *
- * @return The publication date or <code>null</code> when not known.
+ * @return the publication date or null when not known in the descriptor itself.
*/
Date getPublicationDate();
@@ -98,14 +92,14 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
* The publication date of the module revision should be the date at which it has been
* published, i.e. in general the date of any of its published artifacts, since all published
* artifact of a module should follow the same publishing cycle.
+ *
+ * @return Date
*/
Date getResolvedPublicationDate();
/**
- * Returns all the configurations declared by this module as an array. This array is never empty
- * (a 'default' conf is assumed when none is declared in the ivy file)
- *
- * @return all the configurations declared by this module as an array.
+ * @return all the configurations declared by this module as an array. This array is never empty
+ * (a 'default' conf is assumed when none is declared in the ivy file).
*/
Configuration[] getConfigurations();
@@ -116,27 +110,23 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
Artifact[] getArtifacts(String conf);
/**
- * Returns all artifacts of this module, excluding the artifact corresponding to the module
- * descriptor.
- *
- * @return all published artifacts of this module
+ * @return all published artifacts of this module, excluding the artifact corresponding to the
+ * module descriptor.
* @see #getMetadataArtifact()
*/
Artifact[] getAllArtifacts();
/**
- * @return The dependencies of the module. If there is no dependencies return an empty array (non
- * null)
+ * @return The dependencies of the module. If there are no dependencies return an empty array
+ * (non null)
*/
DependencyDescriptor[] getDependencies();
/**
- * Returns true if the module described by this descriptor depends directly upon the given
- * module descriptor
- *
* @param matcher VersionMatcher
* @param md ModuleDescriptor
- * @return boolean
+ * @return true if the module described by this descriptor depends directly upon the given
+ * module descriptor
*/
boolean dependsOn(VersionMatcher matcher, ModuleDescriptor md);
@@ -147,18 +137,14 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
Configuration getConfiguration(String confName);
/**
- * Returns the conflict manager to use for the given ModuleId, or <code>null</code> if no
- * specific conflict manager is associated with the given module id in this module descriptor.
- *
* @param id ModuleId
- * @return ConflictManager
+ * @return the conflict manager to use for the given ModuleId, or null if no specific conflict
+ * manager is associated with the given module id in this module descriptor.
*/
ConflictManager getConflictManager(ModuleId id);
/**
- * Returns the licenses of the module described by this descriptor
- *
- * @return License[]
+ * @return the licenses of the module described by this descriptor
*/
License[] getLicenses();
@@ -175,92 +161,69 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
*
* @param ivyFile
* the destination ivy file
+ * @throws ParseException if something goes wrong
+ * @throws IOException if something goes wrong
*/
void toIvyFile(File ivyFile) throws ParseException, IOException;
/**
- * The ModuleDescriptorParser used to parse this module descriptor, null is no parser was used.
- *
- * @return ModuleDescriptorParser
+ * @return the ModuleDescriptorParser used to parse this module descriptor, null is no parser was used.
*/
ModuleDescriptorParser getParser();
/**
- * The resource being the source of this module descriptor, null if no resource corresponds to
- * this module descriptor
- *
- * @return Resource
+ * @return the resource being the source of this module descriptor, null if no resource
+ * corresponds to this module descriptor.
*/
Resource getResource();
/**
- * Returns the Artifact representing this module descriptor itself.
- * <p>
* Even though the module descriptor is never described as a published artifact of a module in
* the module descriptor itself, it is often useful to consider it as any other artifact of the
* module. This method allows to access to the Artifact object representing this module
* descriptor for this purpose.
- * </p>
*
* @return the Artifact representing this module descriptor itself.
*/
Artifact getMetadataArtifact();
/**
- * Returns true if this descriptor contains any exclusion rule
- *
- * @return true if this descriptor contains any exclusion rule
+ * @return true if this descriptor contains any exclusion rule.
*/
boolean canExclude();
/**
- * Returns true if an exclude rule of this module attached to any of the given configurations
- * matches the given artifact id, and thus exclude it
- *
* @param moduleConfs String[]
* @param artifactId ditto
- * @return boolean
+ * @return true if an exclude rule of this module attached to any of the given configurations
+ * matches the given artifact id, and thus exclude it
*/
boolean doesExclude(String[] moduleConfs, ArtifactId artifactId);
/**
- * Returns an array of all the exclude rules this module descriptor currently holds. Module
- * Descriptor exclude rules are used to exclude (usually transitive) dependencies for the whole
- * module.
+ * Module Descriptor exclude rules are used to exclude (usually transitive) dependencies for the
+ * whole module.
*
- * @return an array of {@link ExcludeRule} this module descriptor holds
+ * @return an array of all {@link ExcludeRule} this module descriptor currently holds.
*/
public ExcludeRule[] getAllExcludeRules();
/**
- * Returns all the dependency descriptor mediators used by this {@link ModuleDescriptor}, as an
- * instance of {@link ModuleRules}.
- * <p>
- * All rules in the {@link ModuleRules} object returned are {@link DependencyDescriptorMediator}
- * .
- * </p>
- *
- * @return all the dependency descriptor mediators used by this {@link ModuleDescriptor}.
+ * @return all the {@link DependencyDescriptorMediator}s used by this
+ * {@link ModuleDescriptor}, as an instance of {@link ModuleRules}.
*/
public ModuleRules/* <DependencyDescriptorMediator> */getAllDependencyDescriptorMediators();
/**
- * Returns the list of xml namespaces used by extra attributes, as Map from prefix to namespace
- * URIs.
- * <p>
- * The returned list is never <code>null</code>, it is empty when no extra attribute is used or
- * if extra attributes are used without xml namespaces
- * </p>
- *
* @return the list of xml namespaces used by extra attributes, as Map from prefix to namespace
- * URIs.
+ * URIs. The returned list is never null, it is empty when no extra attribute is used or
+ * if extra attributes are used without xml namespaces
*/
Map<String, String> getExtraAttributesNamespaces();
/**
- * Returns the custom info provided in the info tag. All the tags except the description are
- * given. The key is the name of the tag, the value is its content. <br />
- *
+ * @return the custom info provided in the info tag. All the tags except the description are
+ * given. The key is the name of the tag, the value is its content.
* @deprecated this method is not returning the full content of the extra info: to get the full
* structure of the extra infos, use getExtraInfos()
*/
@@ -268,27 +231,23 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
Map<String, String> getExtraInfo();
/**
- * Returns a list of extras infos (tag name, attributes and content). All the tags except the
- * description are given.
- *
* @since 2.4.0
- * @return List<ExtraInfoHolder>
+ * @return a list of extras infos (tag name, attributes and content). All the tags except the
+ * description are given.
*/
List<ExtraInfoHolder> getExtraInfos();
/**
- * Returns content from first extrainfo matching with given tag name
- *
* @since 2.4.0
- * @return ditto
+ * @param tagName String
+ * @return content from first extrainfo matching with given tag name.
*/
String getExtraInfoContentByTagName(String tagName);
/**
- * Returns first extrainfo matching with given tag name
- *
* @since 2.4.0
- * @return ExtraInfoHolder
+ * @param tagName String
+ * @return first extrainfo matching with given tag name.
*/
ExtraInfoHolder getExtraInfoByTagName(String tagName);
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/module/id/ArtifactId.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/id/ArtifactId.java b/src/java/org/apache/ivy/core/module/id/ArtifactId.java
index 0991c1f..a174738 100644
--- a/src/java/org/apache/ivy/core/module/id/ArtifactId.java
+++ b/src/java/org/apache/ivy/core/module/id/ArtifactId.java
@@ -19,7 +19,7 @@ package org.apache.ivy.core.module.id;
/**
* Identifies an artifact in a module, without revision information
- *
+ *
* @see <a href="package-summary.html">org.apache.ivy.core.module.id</a>
*/
public class ArtifactId {
@@ -38,6 +38,8 @@ public class ArtifactId {
* The name of the artifact.
* @param type
* The type of the artifact.
+ * @param ext
+ * The name extension of the artifact.
*/
public ArtifactId(ModuleId mid, String name, String type, String ext) {
this.mid = mid;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/module/id/MatcherLookup.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/id/MatcherLookup.java b/src/java/org/apache/ivy/core/module/id/MatcherLookup.java
index c1fa6ad..714643a 100644
--- a/src/java/org/apache/ivy/core/module/id/MatcherLookup.java
+++ b/src/java/org/apache/ivy/core/module/id/MatcherLookup.java
@@ -33,24 +33,22 @@ import org.apache.ivy.plugins.matcher.PatternMatcher;
* matcher's attributes. When matcher is looked up against specific module, the key is recreated
* from module's attributes.
* <p>
- * </p>
* The lookup doesn't target to speed up lookup for non exact pattern matcher. All non exact
* matchers are placed in non-keyed collection.
- * <p>
* </p>
+ * <p>
* At lookup for matchers against specific module, all non exact pattern matchers are iterated to
* match with module attributes, and exact pattern matchers binding to the same key will also
* iterated to match with module attributes.
- * <p>
* </p>
+ * <p>
* If there are much more exact pattern matchers than non exact pattern matchers, the matcher lookup
* speed can benefit from this class significantly. A quick example could be user declares lots of
* dependencyOverrides which are typically exact pattern matchers.
- * <p>
* </p>
+ * <p>
* If there are balanced exact and non exact pattern matchers, the matcher lookup speed doesn't hurt
* by this class.
- * <p>
* </p>
*/
public class MatcherLookup {
@@ -65,12 +63,12 @@ public class MatcherLookup {
/**
* Add matcher.
- *
+ *
* If matcher is exact pattern matcher, it will be associated with a key and placed in keyed
* collection.
- *
+ *
* If matcher is not exact pattern matcher, it will be placed into non-keyed collection
- *
+ *
* @param matcher MapMatcher
*/
public void add(MapMatcher matcher) {
@@ -88,12 +86,10 @@ public class MatcherLookup {
}
/**
- * Get a list of matchers which can apply to module with specified attributes
- *
* @param attrs
* A map of attributes that matcher should match.
- *
- * @return list A list of candidate matchers that matches specified attributes
+ *
+ * @return a list of matchers that can apply to module withs specified attributes
*/
public List<MapMatcher> get(Map<String, String> attrs) {
List<MapMatcher> matchers = new ArrayList<MapMatcher>();
@@ -131,7 +127,7 @@ public class MatcherLookup {
/**
* Create a key from specified attributes
- *
+ *
* @param attrs
* A map of attributes
* @return key object
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/publish/PublishEngine.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/publish/PublishEngine.java b/src/java/org/apache/ivy/core/publish/PublishEngine.java
index d6a7904..a43240c 100644
--- a/src/java/org/apache/ivy/core/publish/PublishEngine.java
+++ b/src/java/org/apache/ivy/core/publish/PublishEngine.java
@@ -73,6 +73,13 @@ public class PublishEngine {
* reports. The extra artifacts array can be null (= no extra artifacts), and if non null only
* the name, type, ext url and extra attributes of the artifacts are really used. Other methods
* can return null safely.
+ *
+ * @param mrid ModuleRevisionId
+ * @param srcArtifactPattern a Collection of String
+ * @param resolverName String
+ * @param options PublishOptions
+ * @return Collection<Artifact>
+ * @throws IOException if something goes wrong
*/
public Collection<Artifact> publish(ModuleRevisionId mrid,
Collection<String> srcArtifactPattern, String resolverName, PublishOptions options)
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java b/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java
index 38296df..47fa680 100644
--- a/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java
+++ b/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java
@@ -78,11 +78,15 @@ public class ConfigurationResolveReport {
}
/**
- * Check if the set of dependencies has changed since the previous execution of a resolution.<br/>
+ * Check if the set of dependencies has changed since the previous execution of a resolution.
+ * <p>
* This function use the report file found in the cache. So the function must be called before
- * the new report is serialized there.</br> This function also use the internal dependencies
- * that must already be filled. This function might be 'heavy' because it may have to parse the
- * previous report.
+ * the new report is serialized there.
+ * </p>
+ * <p>
+ * This function also use the internal dependencies that must already be filled. This function
+ * might be 'heavy' because it may have to parse the previous report.
+ * </p>
*/
public void checkIfChanged() {
ResolutionCacheManager cache = resolveEngine.getSettings().getResolutionCacheManager();
@@ -109,6 +113,7 @@ public class ConfigurationResolveReport {
/**
* @pre checkIfChanged has been called.
+ * @return boolean
*/
public boolean hasChanged() {
return hasChanged;
@@ -117,7 +122,7 @@ public class ConfigurationResolveReport {
/**
* Returns all non evicted and non error dependency mrids The returned set is ordered so that a
* dependency will always be found before their own dependencies
- *
+ *
* @return all non evicted and non error dependency mrids
*/
public Set<ModuleRevisionId> getModuleRevisionIds() {
@@ -235,7 +240,7 @@ public class ConfigurationResolveReport {
/**
* gives all the modules ids concerned by this report, from the most dependent to the least one
- *
+ *
* @return a list of ModuleId
*/
public List<ModuleId> getModuleIds() {
@@ -278,7 +283,7 @@ public class ConfigurationResolveReport {
/**
* Get every report on the download requests.
- *
+ *
* @return the list of reports, never <code>null</code>
*/
public ArtifactDownloadReport[] getAllArtifactsReports() {
@@ -288,7 +293,7 @@ public class ConfigurationResolveReport {
/**
* Get the report on the download requests. The list of download report can be restricted to a
* specific download status, and also remove the download report for the evicted modules.
- *
+ *
* @param downloadStatus
* the status of download to retrieve. Set it to <code>null</code> for no restriction
* on the download status
@@ -321,7 +326,7 @@ public class ConfigurationResolveReport {
/**
* Get the report on the successful download requests with the evicted modules
- *
+ *
* @return the list of reports, never <code>null</code>
*/
public ArtifactDownloadReport[] getDownloadedArtifactsReports() {
@@ -330,7 +335,7 @@ public class ConfigurationResolveReport {
/**
* Get the report on the failed download requests with the evicted modules
- *
+ *
* @return the list of reports, never <code>null</code>
*/
public ArtifactDownloadReport[] getFailedArtifactsReports() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/report/DownloadStatus.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/report/DownloadStatus.java b/src/java/org/apache/ivy/core/report/DownloadStatus.java
index f0364c2..db5fab5 100644
--- a/src/java/org/apache/ivy/core/report/DownloadStatus.java
+++ b/src/java/org/apache/ivy/core/report/DownloadStatus.java
@@ -38,7 +38,8 @@ public final class DownloadStatus {
/**
* Returns the {@link DownloadStatus} corresponding to the given String representation.
- *
+ *
+ * @param status String
* @return the {@link DownloadStatus} corresponding to the given String representation.
* @throws IllegalArgumentException
* if the given String does not correspond to any {@link DownloadStatus}.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/report/ResolveReport.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/report/ResolveReport.java b/src/java/org/apache/ivy/core/report/ResolveReport.java
index 0fb05f0..01be748 100644
--- a/src/java/org/apache/ivy/core/report/ResolveReport.java
+++ b/src/java/org/apache/ivy/core/report/ResolveReport.java
@@ -128,7 +128,7 @@ public class ResolveReport {
/**
* Get every report on the download requests.
- *
+ *
* @return the list of reports, never <code>null</code>
*/
public ArtifactDownloadReport[] getFailedArtifactsReports() {
@@ -138,7 +138,7 @@ public class ResolveReport {
/**
* Get every report on the download requests.
- *
+ *
* @return the list of reports, never <code>null</code>
*/
public ArtifactDownloadReport[] getAllArtifactsReports() {
@@ -148,7 +148,7 @@ public class ResolveReport {
/**
* Get the report on the download requests. The list of download report can be restricted to a
* specific download status, and also remove the download report for the evicted modules.
- *
+ *
* @param downloadStatus
* the status of download to retrieve. Set it to <code>null</code> for no restriction
* on the download status
@@ -184,7 +184,11 @@ public class ResolveReport {
}
}
- /** Can only be called if checkIfChanged has been called */
+ /**
+ * Can only be called if checkIfChanged has been called
+ *
+ * @return boolean
+ */
public boolean hasChanged() {
for (ConfigurationResolveReport report : confReports.values()) {
if (report.hasChanged()) {
@@ -245,7 +249,7 @@ public class ResolveReport {
/**
* Returns the list of all dependencies concerned by this report as a List of IvyNode ordered
* from the more dependent to the least one
- *
+ *
* @return The list of all dependencies.
*/
public List<IvyNode> getDependencies() {
@@ -255,7 +259,7 @@ public class ResolveReport {
/**
* Returns the list of all artifacts which should be downloaded per this resolve To know if the
* artifact have actually been downloaded use information found in ConfigurationResolveReport.
- *
+ *
* @return The list of all artifacts.
*/
public List<Artifact> getArtifacts() {
@@ -264,7 +268,7 @@ public class ResolveReport {
/**
* gives all the modules ids concerned by this report, from the most dependent to the least one
- *
+ *
* @return a list of ModuleId
*/
public List<ModuleId> getModuleIds() {
@@ -305,7 +309,7 @@ public class ResolveReport {
* This only includes artifacts actually downloaded to cache (DownloadStatus.SUCCESSFUL), and
* not artifacts already in cache or used at their original location.
* </p>
- *
+ *
* @return The total size of downloaded artifacts, in bytes.
*/
public long getDownloadSize() {
@@ -319,7 +323,7 @@ public class ResolveReport {
/**
* Get every configuration which extends the specified one. The returned list also includes the
* specified one.
- *
+ *
* @param extended String
* @return String[]
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/resolve/IvyNode.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/resolve/IvyNode.java b/src/java/org/apache/ivy/core/resolve/IvyNode.java
index 4cac6c7..a26146f 100644
--- a/src/java/org/apache/ivy/core/resolve/IvyNode.java
+++ b/src/java/org/apache/ivy/core/resolve/IvyNode.java
@@ -132,7 +132,16 @@ public class IvyNode implements Comparable<IvyNode> {
/**
* After the call node may be discarded. To avoid using discarded node, make sure to get the
- * real node after the call IvyNode node = ... node.loadData(); node = node.getRealNode(); ...
+ * real node after the call
+ * <code>IvyNode node = ... node.loadData(); node = node.getRealNode(); ...</code>
+ *
+ * @param rootModuleConf String
+ * @param parent IvyNode
+ * @param parentConf String
+ * @param conf String
+ * @param shouldBePublic boolean
+ * @param usage IvyNodeUsage
+ * @return boolean
*/
public boolean loadData(String rootModuleConf, IvyNode parent, String parentConf, String conf,
boolean shouldBePublic, IvyNodeUsage usage) {
@@ -312,7 +321,7 @@ public class IvyNode implements Comparable<IvyNode> {
* Load the dependencies of the current node
* <p>
* The resulting collection of nodes may have some configuration to load
- *
+ *
* @param rootModuleConf
* the requested configuration of the root module
* @param conf
@@ -515,7 +524,7 @@ public class IvyNode implements Comparable<IvyNode> {
/**
* returns the required configurations from the given node
- *
+ *
* @param in IvyNode
* @param inConf ditto
* @return array of configuration names
@@ -537,7 +546,7 @@ public class IvyNode implements Comparable<IvyNode> {
/**
* returns all the current required configurations of the node
- *
+ *
* @return array of configuration names
*/
public String[] getRequiredConfigurations() {
@@ -564,7 +573,7 @@ public class IvyNode implements Comparable<IvyNode> {
/**
* Returns the configurations of the dependency required in a given root module configuration.
- *
+ *
* @param rootModuleConf String
* @return array of configuration names
*/
@@ -620,7 +629,7 @@ public class IvyNode implements Comparable<IvyNode> {
/**
* Returns the root module configurations in which this dependency is required
- *
+ *
* @return array of configuration names
*/
public String[] getRootModuleConfigurations() {
@@ -630,7 +639,7 @@ public class IvyNode implements Comparable<IvyNode> {
/**
* Returns the root module configurations in which this dependency is required
- *
+ *
* @return {@link Set} of configuration names
*/
public Set<String> getRootModuleConfigurationsSet() {
@@ -675,7 +684,7 @@ public class IvyNode implements Comparable<IvyNode> {
/**
* Finds and returns a path in callers from the given module id to the current node
- *
+ *
* @param from
* the module id to start the path from
* @return a collection representing the path, starting with the from node, followed by the list
@@ -707,7 +716,7 @@ public class IvyNode implements Comparable<IvyNode> {
/**
* Update data in this node from data of the given node, for the given root module
* configuration.
- *
+ *
* @param node
* the source node from which data should be copied
* @param rootModuleConf
@@ -748,7 +757,7 @@ public class IvyNode implements Comparable<IvyNode> {
/**
* Returns all the artifacts of this dependency required in all the root module configurations
- *
+ *
* @return array of {@link Artifact}s
*/
public Artifact[] getAllArtifacts() {
@@ -762,7 +771,7 @@ public class IvyNode implements Comparable<IvyNode> {
/**
* Returns all the artifacts of this dependency required in the root module configurations in
* which the node is not evicted nor blacklisted
- *
+ *
* @param artifactFilter Filter
* @return array of {@link Artifact}s
*/
@@ -780,7 +789,7 @@ public class IvyNode implements Comparable<IvyNode> {
/**
* Returns the artifacts of this dependency required in the configurations themselves required
* in the given root module configuration
- *
+ *
* @param rootModuleConf String
* @return array of {@link Artifact}s
*/
@@ -995,7 +1004,7 @@ public class IvyNode implements Comparable<IvyNode> {
/**
* Returns the last modified timestamp of the module represented by this Node, or 0 if the last
* modified timestamp is currently unknown (module not loaded)
- *
+ *
* @return the last modified timestamp of the module represented by this Node
*/
public long getLastModified() {
@@ -1085,7 +1094,13 @@ public class IvyNode implements Comparable<IvyNode> {
// EVICTION MANAGEMENT
// /////////////////////////////////////////////////////////////////////////////
- /** A copy of the set of resolved nodes (real nodes) */
+ /**
+ * A copy of the set of resolved nodes (real nodes)
+ *
+ * @param moduleId ditto
+ * @param rootModuleConf String
+ * @return Set<IvyNode>
+ */
public Set<IvyNode> getResolvedNodes(ModuleId moduleId, String rootModuleConf) {
return eviction.getResolvedNodes(moduleId, rootModuleConf);
}
@@ -1190,7 +1205,7 @@ public class IvyNode implements Comparable<IvyNode> {
/**
* Returns a collection of Nodes in conflict for which conflict has been detected but conflict
* resolution hasn't been done yet
- *
+ *
* @param rootModuleConf ditto
* @param mid
* the module id for which pending conflicts should be found
@@ -1217,7 +1232,7 @@ public class IvyNode implements Comparable<IvyNode> {
* implementation which use a best effort strategy to find compatible dependency set, like
* {@link LatestCompatibleConflictManager}
* </p>
- *
+ *
* @param bdata
* the root module configuration in which the node should be blacklisted
*/
@@ -1255,10 +1270,10 @@ public class IvyNode implements Comparable<IvyNode> {
* <p>
* A blacklisted node should be considered as if it doesn't even exist on the repository.
* </p>
- *
+ *
* @param rootModuleConf
* the root module conf for which we'd like to know if the node is blacklisted
- *
+ *
* @return true if this node is blacklisted int he given root module conf, false otherwise
* @see #blacklist(IvyNodeBlacklist)
*/
@@ -1268,7 +1283,7 @@ public class IvyNode implements Comparable<IvyNode> {
/**
* Indicates if this node has been blacklisted in all root module configurations.
- *
+ *
* @return true if this node is blacklisted in all root module configurations, false otherwise
* @see #blacklist(IvyNodeBlacklist)
*/
@@ -1287,7 +1302,7 @@ public class IvyNode implements Comparable<IvyNode> {
/**
* Returns the blacklist data of this node in the given root module conf, or <code>null</code>
* if this node is not blacklisted in this root module conf.
- *
+ *
* @param rootModuleConf
* the root module configuration to consider
* @return the blacklist data if any
@@ -1308,7 +1323,7 @@ public class IvyNode implements Comparable<IvyNode> {
* given root module conf which has a dependency descriptor with transitive == true, then it
* returns true. Otherwise it returns false.
* </p>
- *
+ *
* @param rootModuleConf
* the root module configuration to consider
* @return true if there is any merged usage with transitive dd, false otherwise.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/resolve/IvyNodeCallers.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/resolve/IvyNodeCallers.java b/src/java/org/apache/ivy/core/resolve/IvyNodeCallers.java
index e5f5966..f9c6d57 100644
--- a/src/java/org/apache/ivy/core/resolve/IvyNodeCallers.java
+++ b/src/java/org/apache/ivy/core/resolve/IvyNodeCallers.java
@@ -154,6 +154,7 @@ public class IvyNodeCallers {
* @param rootModuleConf ditto
* @param callerNode IvyNode
* @param callerConf ditto
+ * @param requestedConf ditto
* @param dependencyConfs
* '*' must have been resolved
* @param dd
@@ -251,7 +252,7 @@ public class IvyNodeCallers {
/**
* Returns true if ALL callers exclude the given artifact in the given root module conf
- *
+ *
* @param rootModuleConf ditto
* @param artifact Artifact
* @return boolean
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/resolve/IvyNodeEviction.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/resolve/IvyNodeEviction.java b/src/java/org/apache/ivy/core/resolve/IvyNodeEviction.java
index 940dfa1..3524f21 100644
--- a/src/java/org/apache/ivy/core/resolve/IvyNodeEviction.java
+++ b/src/java/org/apache/ivy/core/resolve/IvyNodeEviction.java
@@ -54,7 +54,7 @@ public class IvyNodeEviction {
/**
* Creates a new object containing the eviction data of an {@link IvyNode}.
- *
+ *
* @param rootModuleConf
* the root module configuration
* @param parent
@@ -73,7 +73,7 @@ public class IvyNodeEviction {
/**
* Creates a new object containing the eviction data of an {@link IvyNode}.
- *
+ *
* @param rootModuleConf
* the root module configuration
* @param parent
@@ -197,6 +197,8 @@ public class IvyNodeEviction {
}
/**
+ * @param mid ModuleId
+ * @param rootModuleConf String
* @return A copy of the set of resolved nodes (real nodes)
*/
public Set<IvyNode> getResolvedNodes(ModuleId mid, String rootModuleConf) {
@@ -337,7 +339,7 @@ public class IvyNodeEviction {
/**
* Returns null if this node has only be evicted transitively, or the the collection of selected
* nodes if it has been evicted by other selected nodes
- *
+ *
* @return Collection<IvyNode>
*/
public Collection<IvyNode> getAllEvictingNodes() {
@@ -385,7 +387,7 @@ public class IvyNodeEviction {
* Returns the eviction data for this node if it has been previously evicted in the root, null
* otherwise (if it hasn't been evicted in root) for the given rootModuleConf. Note that this
* method only works if conflict resolution has already be done in all the ancestors.
- *
+ *
* @param rootModuleConf ditto
* @param ancestor IvyNode
* @return EvictionData
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/resolve/ResolveEngine.java b/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
index 7c0a11a..8356f16 100644
--- a/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
+++ b/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
@@ -76,7 +76,7 @@ import org.apache.ivy.util.filter.Filter;
* {@link #resolve(URL)} which allow to simply resolve dependencies of a single module descriptor,
* or more complete one, like the {@link #resolve(ModuleDescriptor, ResolveOptions)} which allows to
* provide options to the resolution engine.
- *
+ *
* @see ResolveOptions
*/
public class ResolveEngine {
@@ -92,7 +92,7 @@ public class ResolveEngine {
/**
* Constructs a ResolveEngine.
- *
+ *
* @param settings
* the settings to use to configure the engine. Must not be null.
* @param eventManager
@@ -112,7 +112,7 @@ public class ResolveEngine {
/**
* Returns the currently configured dictator resolver, which when non null is used in place of
* any specified resolver in the {@link IvySettings}
- *
+ *
* @return the currently configured dictator resolver, may be null.
*/
public DependencyResolver getDictatorResolver() {
@@ -122,7 +122,7 @@ public class ResolveEngine {
/**
* Sets a dictator resolver, which is used in place of regular dependency resolver for
* subsequent dependency resolution by this engine.
- *
+ *
* @param dictatorResolver
* the dictator resolver to use in this engine, null if regular settings should used
*/
@@ -142,6 +142,13 @@ public class ResolveEngine {
/**
* Resolves the module identified by the given mrid with its dependencies if transitive is set
* to true.
+ *
+ * @param mrid ModuleRevisionId
+ * @param options ResolveOptions
+ * @param changing boolean
+ * @return ResolveReport
+ * @throws ParseException if something goes wrong
+ * @throws IOException if something goes wrong
*/
public ResolveReport resolve(final ModuleRevisionId mrid, ResolveOptions options,
boolean changing) throws ParseException, IOException {
@@ -176,6 +183,12 @@ public class ResolveEngine {
/**
* Resolve dependencies of a module described by an ivy file.
+ *
+ * @param ivySource URL
+ * @param options ResolveOptions
+ * @return ResolveReport
+ * @throws ParseException if something goes wrong
+ * @throws IOException if something goes wrong
*/
public ResolveReport resolve(URL ivySource, ResolveOptions options) throws ParseException,
IOException {
@@ -197,6 +210,11 @@ public class ResolveEngine {
/**
* Resolve dependencies of a module described by a module descriptor.
+ * @param md ModuleDescriptor
+ * @param options ResolveOptions
+ * @return ResolveReport
+ * @throws ParseException if something goes wrong
+ * @throws IOException if something goes wrong
*/
public ResolveReport resolve(ModuleDescriptor md, ResolveOptions options)
throws ParseException, IOException {
@@ -434,9 +452,10 @@ public class ResolveEngine {
* It is possible to track the progression of the download using classical ivy progress
* monitoring feature (see addTransferListener).
* </p>
- *
+ *
* @param artifact
* the artifact to download
+ * @param options DownloadOptions
* @return a report concerning the download
* @see #download(ArtifactOrigin, DownloadOptions)
*/
@@ -449,7 +468,7 @@ public class ResolveEngine {
/**
* Locates an artifact in dependency resolvers, and return its location if it can be located and
* actually exists, or an unknown {@link ArtifactOrigin} in other cases.
- *
+ *
* @param artifact
* the artifact to locate.
* @return the artifact location, should be tested with
@@ -475,9 +494,10 @@ public class ResolveEngine {
* It is possible to track the progression of the download using classical ivy progress
* monitoring feature (see addTransferListener).
* </p>
- *
+ *
* @param origin
* the artifact origin to materialize
+ * @param options DownloadOptions
* @return a report concerning the download
* @see #download(Artifact, DownloadOptions)
* @see #locate(Artifact)
@@ -492,7 +512,7 @@ public class ResolveEngine {
* Resolve the dependencies of a module without downloading corresponding artifacts. The module
* to resolve is given by its ivy file URL. This method requires appropriate configuration of
* the ivy instance, especially resolvers.
- *
+ *
* @param ivySource
* url of the ivy file to use for dependency resolving
* @param options
@@ -517,7 +537,7 @@ public class ResolveEngine {
* <p>
* The <code>IvyNode</code>s are ordered from the most dependent to the less dependent, so that
* an IvyNode is always found in the list after all IvyNode depending directly on it.
- *
+ *
* @param md
* the descriptor of the module for which we want to get dependencies - must not be
* null
@@ -817,7 +837,7 @@ public class ResolveEngine {
/**
* Returns true if we've already fetched the dependencies for this node and configuration
- *
+ *
* @param node
* node to check
* @param conf
@@ -847,11 +867,12 @@ public class ResolveEngine {
/**
* Resolves conflict for the given node in the given ancestor. This method do conflict
* resolution in ancestor parents recursively, unless not necessary.
- *
+ *
* @param node
* the node for which conflict resolution should be done
* @param ancestor
* the ancestor in which the conflict resolution should be done
+ * @param conf String
* @param toevict
* a collection of IvyNode to evict (as computed by conflict resolution in
* descendants of ancestor)
@@ -1033,7 +1054,7 @@ public class ResolveEngine {
/**
* Compute possible conflicts for a node, in the context of an ancestor (a node which has a
* dependency - direct or indirect - on the node for which conflicts should be computed.
- *
+ *
* @param node
* the node for which conflicts should be computed
* @param ancestor
@@ -1159,7 +1180,7 @@ public class ResolveEngine {
* The mediated dependency descriptor must return the actually requested module revision id when
* the method {@link DependencyDescriptor#getDependencyRevisionId()} is called.
* </p>
- *
+ *
* @param dd
* the dependency descriptor for which the requested module revision id should be
* returned
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/resolve/ResolveOptions.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/resolve/ResolveOptions.java b/src/java/org/apache/ivy/core/resolve/ResolveOptions.java
index f71b015..c492a4e 100644
--- a/src/java/org/apache/ivy/core/resolve/ResolveOptions.java
+++ b/src/java/org/apache/ivy/core/resolve/ResolveOptions.java
@@ -29,7 +29,7 @@ import org.apache.ivy.util.filter.FilterHelper;
/**
* A set of options used during resolve related tasks
- *
+ *
* @see ResolveEngine
*/
public class ResolveOptions extends LogOptions {
@@ -153,7 +153,7 @@ public class ResolveOptions extends LogOptions {
/**
* Returns the resolve mode to use, or <code>null</code> to use settings configured resolve
* mode.
- *
+ *
* @return the resolve mode to use.
*/
public String getResolveMode() {
@@ -169,7 +169,8 @@ public class ResolveOptions extends LogOptions {
* Indicates if the configurations use a special configuration * , *(private) or *(public). When
* special configurations are used, you must have the module descriptor in order to get the list
* of configurations.
- *
+ *
+ * @return boolean
* @see #getConfs()
* @see #getConfs(ModuleDescriptor)
*/
@@ -185,6 +186,7 @@ public class ResolveOptions extends LogOptions {
/**
* @pre can only be called if useSpecialConfs()==false. When it is true, you have to provide a
* module descriptor so that configurations can be resolved.
+ * @return String[]
* @see #getConfs(ModuleDescriptor)
*/
public String[] getConfs() {
@@ -197,10 +199,11 @@ public class ResolveOptions extends LogOptions {
/**
* Get the asked confs. Special confs (like *) use the moduleDescriptor to find the values *
- *
+ *
* @param md
* Used to get the exact values for special confs.
- * */
+ * @return String[]
+ */
public String[] getConfs(ModuleDescriptor md) {
// TODO add isInline, in that case, replace * by *(public).
return ConfigurationUtils.replaceWildcards(confs, md);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/resolve/VisitNode.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/resolve/VisitNode.java b/src/java/org/apache/ivy/core/resolve/VisitNode.java
index c38bce1..b5171b9 100644
--- a/src/java/org/apache/ivy/core/resolve/VisitNode.java
+++ b/src/java/org/apache/ivy/core/resolve/VisitNode.java
@@ -40,11 +40,11 @@ import org.apache.ivy.util.Checks;
* dependency graph following the dependencies, thus the same node can be visited several times, if
* it is requested from several module. In this case you will have one VisitNode per parent and per
* root module configuration. Thus VisitNode stores data specific to the visit:
- * <ul>
- * <li>parent</li> the node from which the visit is occurring
- * <li>parentConf</li> the configuration of the parent in which this node is visited
- * <li>rootModuleConf</li> the configuration of the root module which is currently resolved
- * </ul>
+ * <dl>
+ * <dd>parent</dd><dt>the node from which the visit is occurring</dt>
+ * <dd>parentConf</dd><dt>the configuration of the parent in which this node is visited</dt>
+ * <dd>rootModuleConf</dd><dt>the configuration of the root module which is currently resolved</dt>
+ * </dl>
*/
public class VisitNode {
/**
@@ -152,7 +152,7 @@ public class VisitNode {
/**
* Get an ordered collection with the nodes from the root to this node
- *
+ *
* @return Collection<VisitNode>
*/
public Collection<VisitNode> getPath() {
@@ -211,7 +211,7 @@ public class VisitNode {
/**
* Returns true if the current dependency descriptor is transitive and the parent configuration
* is transitive. Otherwise returns false.
- *
+ *
* @return true if current node is transitive and the parent configuration is transitive.
*/
public boolean isTransitive() {
@@ -255,7 +255,7 @@ public class VisitNode {
* resolved to an existing node in the graph, we will return the existing node, and not the one
* originally used which is about to be discarded, since it's not possible to have in the graph
* two nodes for the same ModuleRevisionId
- *
+ *
* @return the 'real' node currently visited.
*/
public IvyNode getRealNode() {
@@ -313,7 +313,7 @@ public class VisitNode {
/**
* Returns a VisitNode for the given node. The given node must be a representation of the same
* module (usually in another revision) as the one visited by this node.
- *
+ *
* @param node
* the node to visit
* @return a VisitNode for the given node
@@ -413,7 +413,7 @@ public class VisitNode {
/**
* Returns true if this node can already be found in the path
- *
+ *
* @return boolean
*/
public boolean isCircular() {
@@ -461,7 +461,7 @@ public class VisitNode {
/**
* Marks the current node as evicted by the the given selected IvyNodes, in the given parent and
* root module configuration, with the given {@link ConflictManager}
- *
+ *
* @param parent
* the VisitNode in which eviction has been made
* @param conflictMgr
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/retrieve/RetrieveEngine.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/retrieve/RetrieveEngine.java b/src/java/org/apache/ivy/core/retrieve/RetrieveEngine.java
index 0e0d68c..4822e89 100644
--- a/src/java/org/apache/ivy/core/retrieve/RetrieveEngine.java
+++ b/src/java/org/apache/ivy/core/retrieve/RetrieveEngine.java
@@ -71,7 +71,12 @@ public class RetrieveEngine {
* localCacheDirectory to determine an ivy report file, used as input for the copy If such a
* file does not exist for any conf (resolve has not been called before ?) then an
* IllegalStateException is thrown and nothing is copied.
- *
+ *
+ * @param mrid ModuleRevisionId
+ * @param destFilePattern String
+ * @param options RetrieveOptions
+ * @return int
+ * @throws IOException if something goes wrong
* @deprecated Use
* {@link #retrieve(org.apache.ivy.core.module.id.ModuleRevisionId, RetrieveOptions)}
* instead
@@ -485,7 +490,7 @@ public class RetrieveEngine {
/**
* The returned comparator should consider greater the artifact which gains the conflict battle.
* This is used only during retrieve... prefer resolve conflict manager to resolve conflicts.
- *
+ *
* @return Comparator<ArtifactDownloadReport>
*/
private Comparator<ArtifactDownloadReport> getConflictResolvingPolicy() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/retrieve/RetrieveReport.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/retrieve/RetrieveReport.java b/src/java/org/apache/ivy/core/retrieve/RetrieveReport.java
index bff2007..6dcb9fd 100644
--- a/src/java/org/apache/ivy/core/retrieve/RetrieveReport.java
+++ b/src/java/org/apache/ivy/core/retrieve/RetrieveReport.java
@@ -38,6 +38,8 @@ public class RetrieveReport {
/**
* Returns the root directory to where the artifacts are retrieved.
+ *
+ * @return File
*/
public File getRetrieveRoot() {
return retrieveRoot;
@@ -68,6 +70,8 @@ public class RetrieveReport {
/**
* Returns a collection of <tt>File</tt> objects who were actually copied during the retrieve
* process.
+ *
+ * @return Collection<File>
*/
public Collection<File> getCopiedFiles() {
return new ArrayList<File>(copiedFiles);
@@ -76,6 +80,8 @@ public class RetrieveReport {
/**
* Returns a collection of <tt>File</tt> objects who were actually copied during the retrieve
* process.
+ *
+ * @return Collection<File>
*/
public Collection<File> getUpToDateFiles() {
return new ArrayList<File>(upToDateFiles);
@@ -84,6 +90,8 @@ public class RetrieveReport {
/**
* Returns a collection of <tt>File</tt> objects who were retrieved during the retrieve process.
* This is the union of the files being copied and the files that were up-to-date.
+ *
+ * @return Collection<File>
*/
public Collection<File> getRetrievedFiles() {
Collection<File> result = new ArrayList<File>(upToDateFiles.size() + copiedFiles.size());
@@ -94,6 +102,8 @@ public class RetrieveReport {
/**
* Get the mapping between the copied files and their corresponding download report
+ *
+ * @return Map<File,ArtifactDownloadReport>
*/
public Map<File, ArtifactDownloadReport> getDownloadReport() {
return downloadReport;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/search/SearchEngine.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/search/SearchEngine.java b/src/java/org/apache/ivy/core/search/SearchEngine.java
index 537566f..3fde263 100644
--- a/src/java/org/apache/ivy/core/search/SearchEngine.java
+++ b/src/java/org/apache/ivy/core/search/SearchEngine.java
@@ -50,10 +50,10 @@ public class SearchEngine {
/**
* Returns an empty array when no token values are found.
- *
+ *
* @param token
* ditto
- * @param otherTokenValues
+ * @param otherTokenValues Map
* @return String[]
*/
public String[] listTokenValues(String token, Map<String, Object> otherTokenValues) {
@@ -177,10 +177,9 @@ public class SearchEngine {
* <p>
* ModuleId are returned in the system namespace.
* </p>
- *
- * @param moduleCrit
- * ModuleId
- * @param matcher
+ *
+ * @param moduleCrit ModuleId
+ * @param matcher PatternMatcher
* @return ModuleId[]
*/
public ModuleId[] listModules(ModuleId moduleCrit, PatternMatcher matcher) {
@@ -214,10 +213,9 @@ public class SearchEngine {
* <p>
* ModuleRevisionId are returned in the system namespace.
* </p>
- *
- * @param moduleCrit
- * ModuleRevisionId
- * @param matcher
+ *
+ * @param moduleCrit ModuleRevisionId
+ * @param matcher PatternMatcher
* @return ModuleRevisionId[]
*/
public ModuleRevisionId[] listModules(ModuleRevisionId moduleCrit, PatternMatcher matcher) {
@@ -269,7 +267,7 @@ public class SearchEngine {
* <p>
* ModuleRevisionId are returned in the system namespace.
* </p>
- *
+ *
* @param resolver
* the resolver in which modules should looked up
* @param moduleCrit
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/settings/IvySettings.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/settings/IvySettings.java b/src/java/org/apache/ivy/core/settings/IvySettings.java
index 89c68ef..4b07c0b 100644
--- a/src/java/org/apache/ivy/core/settings/IvySettings.java
+++ b/src/java/org/apache/ivy/core/settings/IvySettings.java
@@ -420,8 +420,8 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
* Default initialization of settings, useful when you don't want to load your settings from a
* settings file or URL, but prefer to set them manually. By calling this method you will still
* have the basic initialization done when loading settings.
- *
- * @throws IOException
+ *
+ * @throws IOException if something goes wrong
*/
public synchronized void defaultInit() throws IOException {
if (getVariable("ivy.default.ivy.user.dir") != null) {
@@ -491,7 +491,7 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
/**
* Sets a deprecated variable with the value of the new variable
- *
+ *
* @param deprecatedKey
* the deprecated variable name
* @param newKey
@@ -611,7 +611,7 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
/**
* Substitute variables in the given string by their value found in the current set of variables
- *
+ *
* @param str
* the string in which substitution should be made
* @return the string where all current ivy variables have been substituted by their value If
@@ -624,7 +624,7 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
/**
* Substitute variables in the given map values by their value found in the current set of
* variables
- *
+ *
* @param strings
* the map of strings in which substitution should be made
* @return a new map of strings in which all current ivy variables in values have been
@@ -641,7 +641,7 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
/**
* Returns the variables loaded in configuration file. Those variables may better be seen as ant
* properties
- *
+ *
* @return IvyVariableContainer
*/
public synchronized IvyVariableContainer getVariables() {
@@ -775,6 +775,13 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
/**
* regular expressions as explained in Pattern class may be used in attributes
+ *
+ * @param attributes Map
+ * @param matcher PatternMatcher
+ * @param resolverName String
+ * @param branch String
+ * @param conflictManager String
+ * @param resolveMode String
*/
public synchronized void addModuleConfiguration(Map<String, String> attributes,
PatternMatcher matcher, String resolverName, String branch, String conflictManager,
@@ -789,12 +796,12 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
* <p>
* If the specified file name is relative it is resolved with respect to the settings's base
* directory.
- *
+ *
* @param fileName
* The name of the file to resolve. Must not be <code>null</code>.
- *
+ *
* @return the resolved File.
- *
+ *
*/
public synchronized File resolveFile(String fileName) {
return FileUtil.resolveFile(baseDir, fileName);
@@ -1211,7 +1218,7 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
/**
* Filters the names list by removing all names that should be ignored as defined by the listing
* ignore list
- *
+ *
* @param names ditto
*/
public synchronized void filterIgnore(Collection<String> names) {
@@ -1443,7 +1450,7 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
/**
* Use a different variable container.
- *
+ *
* @param variables IvyVariableContainer
*/
public synchronized void setVariableContainer(IvyVariableContainer variables) {
@@ -1490,7 +1497,7 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
/**
* Validates the settings, throwing an {@link IllegalStateException} if the current state is not
* valid.
- *
+ *
* @throws IllegalStateException
* if the settings is not valid.
*/
@@ -1508,7 +1515,7 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
/**
* Validates all {@link Validatable} objects in the collection.
- *
+ *
* @param values
* the collection of objects to validate.
* @throws IllegalStateException
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/sort/CollectionOfModulesToSort.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/sort/CollectionOfModulesToSort.java b/src/java/org/apache/ivy/core/sort/CollectionOfModulesToSort.java
index 1f335b9..93e228b 100644
--- a/src/java/org/apache/ivy/core/sort/CollectionOfModulesToSort.java
+++ b/src/java/org/apache/ivy/core/sort/CollectionOfModulesToSort.java
@@ -32,8 +32,10 @@ import org.apache.ivy.plugins.version.VersionMatcher;
/**
* Wrap a collection of descriptors wrapped themselves in ModuleInSort elements. It contains some
- * dedicated function to retrieve module descriptors based on dependencies descriptors.<br>
+ * dedicated function to retrieve module descriptors based on dependencies descriptors.
+ * <p>
* <i>This class is designed to be used internally by the ModuleDescriptorSorter.</i>
+ * </p>
*/
class CollectionOfModulesToSort implements Iterable<ModuleInSort> {
@@ -86,7 +88,7 @@ class CollectionOfModulesToSort implements Iterable<ModuleInSort> {
/**
* Find a matching module descriptor in the list of module to sort.
- *
+ *
* @param descriptor ditto
* @return a ModuleDescriptor from the collection of module descriptors to sort. If none exists
* returns null.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/sort/ModuleDescriptorSorter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/sort/ModuleDescriptorSorter.java b/src/java/org/apache/ivy/core/sort/ModuleDescriptorSorter.java
index da0fb3b..330f302 100644
--- a/src/java/org/apache/ivy/core/sort/ModuleDescriptorSorter.java
+++ b/src/java/org/apache/ivy/core/sort/ModuleDescriptorSorter.java
@@ -29,10 +29,12 @@ import org.apache.ivy.plugins.version.VersionMatcher;
import org.apache.ivy.util.Message;
/**
- * Inner helper class for sorting ModuleDescriptors.<br>
+ * Inner helper class for sorting ModuleDescriptors.
+ * <p>
* ModuleDescriptorSorter use CollectionOfModulesToSort to find the dependencies of the modules, and
* use ModuleInSort to store some temporary values attached to the modules to sort.
- *
+ * </p>
+ *
* @see ModuleInSort
* @see CollectionOfModulesToSort
*/
@@ -54,9 +56,9 @@ public class ModuleDescriptorSorter {
/**
* Iterates over all modules calling sortModuleDescriptorsHelp.
- *
+ *
* @return sorted module
- * @throws CircularDependencyException
+ * @throws CircularDependencyException somehow
*/
public List<ModuleDescriptor> sortModuleDescriptors() throws CircularDependencyException {
Message.debug("Nbr of module to sort : " + moduleDescriptors.size());
@@ -73,10 +75,10 @@ public class ModuleDescriptorSorter {
* When a loop is detected by a recursive call, the moduleDescriptors are not added immediately
* added to the sorted list. They are added as loop dependencies of the root, and will be added
* to the sorted list only when the root itself will be added.
- *
+ *
* @param current
* Current module to add to sorted list.
- * @throws CircularDependencyException
+ * @throws CircularDependencyException somehow
*/
private void sortModuleDescriptorsHelp(ModuleInSort current, ModuleInSort caller)
throws CircularDependencyException {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/sort/ModuleInSort.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/sort/ModuleInSort.java b/src/java/org/apache/ivy/core/sort/ModuleInSort.java
index 225ee88..686504e 100644
--- a/src/java/org/apache/ivy/core/sort/ModuleInSort.java
+++ b/src/java/org/apache/ivy/core/sort/ModuleInSort.java
@@ -31,18 +31,21 @@ import org.apache.ivy.util.Message;
/**
* Decorates a ModuleDescriptor with some attributes used during the sort. Thus every instance of a
- * ModuleInSort can be used in only one ModuleDescriptorSorter at a time.<br>
- * The added fields are : <br>
+ * ModuleInSort can be used in only one ModuleDescriptorSorter at a time.
+ * <p>
+ * The added fields are:
+ * </p>
* <ul>
- * <li><code>isSorted</code> : is true iff this module has already been added to the sorted list.
- * </li>
+ * <li><code>isSorted</code> : is true iff this module has already been added to the sorted
+ * list.</li>
* <li><code>loopElements</code> : When the module is the root of a loop (=the first element of a
* loop met during the sort), <code>loopElements</code> contains all ModuleInSort of the loop
* (excluding the root itself.</li>
* <li><code>isLoopIntermediateElement</code> : When a loop is detected, all modules included in the
* loop (except the root) have <code>isLoopIntermediateElement</code> set to true.</li>
* <li><code>caller</code> : During the sort, we traverse recursively the graph. When doing that,
- * caller point to the parent element.
+ * caller point to the parent element.</li>
+ * </ul>
*/
class ModuleInSort {
@@ -103,7 +106,7 @@ class ModuleInSort {
* dependency. If it is, all the elements of the loop are flagged as 'loopIntermediateElement',
* and the loopElements of this module (which is the root of the loop) is updated. The
* depStrategy is invoked on order to report a correct circular loop message.
- *
+ *
* @param futurCaller ModuleInSort
* @param depStrategy CircularDependencyStrategy
* @return true if a loop is detected.
@@ -130,7 +133,7 @@ class ModuleInSort {
* Add this module to the sorted list except if this module is an intermediary element of a
* loop. If this module is the 'root' of a loop, then all elements of that loops are added
* before.
- *
+ *
* @param sorted
* The list of sorted elements on which this module will be added
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java b/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
index c97d966..2545de1 100644
--- a/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
+++ b/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
@@ -77,11 +77,14 @@ public class BundleInfoAdapter {
}
/**
- *
+ * @param parser ModuleDescriptorParser
* @param baseUri
* uri to help build the absolute url if the bundle info has a relative uri.
+ * @param bundle BundleInfo
+ * @param manifest Manifest
+ * @param profileProvider ExecutionEnvironmentProfileProvider
* @return DefaultModuleDescriptor ditto
- * @throws ProfileNotFoundException
+ * @throws ProfileNotFoundException if descriptor is not found
*/
public static DefaultModuleDescriptor toModuleDescriptor(ModuleDescriptorParser parser,
URI baseUri, BundleInfo bundle, Manifest manifest,
[14/15] ant-ivy git commit: BC-Bridge: supply 'old'
classes/fields/methods for BC reason while correcting spelling
Posted by jh...@apache.org.
BC-Bridge: supply 'old' classes/fields/methods for BC reason while correcting spelling
Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/007939d9
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/007939d9
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/007939d9
Branch: refs/heads/master
Commit: 007939d9fe34faa83d4b242dcc37d2e1894c4f09
Parents: 096c5bd
Author: Jan Matèrne <jh...@apache.org>
Authored: Mon May 29 12:28:28 2017 +0200
Committer: Jan Matèrne <jh...@apache.org>
Committed: Mon May 29 12:28:28 2017 +0200
----------------------------------------------------------------------
.../apache/ivy/core/cache/ArtifactOrigin.java | 8 ++++++
.../ivy/osgi/repo/FSManifestIterable.java | 6 +++++
.../apache/ivy/osgi/util/DelegatingHandler.java | 8 ++++++
.../org/apache/ivy/util/EncrytedProperties.java | 26 ++++++++++++++++++++
4 files changed, 48 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/007939d9/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java b/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java
index 7e397af..82ab6c0 100644
--- a/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java
+++ b/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java
@@ -30,6 +30,14 @@ public class ArtifactOrigin {
private static final String UNKNOWN = "UNKNOWN";
/**
+ * Deprecated because of renaming due spell check.
+ */
+ @Deprecated
+ public static final ArtifactOrigin unkwnown(Artifact artifact) {
+ return unknown(artifact);
+ }
+
+ /**
* ArtifactOrigin instance used when the origin is unknown.
*
* @param artifact ditto
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/007939d9/src/java/org/apache/ivy/osgi/repo/FSManifestIterable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/repo/FSManifestIterable.java b/src/java/org/apache/ivy/osgi/repo/FSManifestIterable.java
index f6b2cb2..bfa97b5 100644
--- a/src/java/org/apache/ivy/osgi/repo/FSManifestIterable.java
+++ b/src/java/org/apache/ivy/osgi/repo/FSManifestIterable.java
@@ -58,6 +58,12 @@ public class FSManifestIterable extends AbstractFSManifestIterable<File> {
}
};
+ /**
+ * Deprecated because of renaming due spell check.
+ */
+ @Deprecated
+ public static final FilenameFilter DEFAULT_BUNLDE_FILTER = DEFAULT_BUNDLE_FILTER;
+
private FilenameFilter dirFilter = DEFAULT_DIR_FILTER;
private FilenameFilter bundleFilter = DEFAULT_BUNDLE_FILTER;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/007939d9/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java b/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
index 7039ac5..5d5b2a3 100644
--- a/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
+++ b/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
@@ -302,6 +302,14 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
public static abstract class ChildElementHandler<DH extends DelegatingHandler> {
+ /**
+ * Deprecated because of renaming due spell check.
+ */
+ @Deprecated
+ public void childHanlded(DH child) throws SAXParseException {
+ childHandled(child);
+ }
+
public abstract void childHandled(DH child) throws SAXParseException;
// because we know what we're doing
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/007939d9/src/java/org/apache/ivy/util/EncrytedProperties.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/EncrytedProperties.java b/src/java/org/apache/ivy/util/EncrytedProperties.java
new file mode 100644
index 0000000..3242de5
--- /dev/null
+++ b/src/java/org/apache/ivy/util/EncrytedProperties.java
@@ -0,0 +1,26 @@
+/*
+ * 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
+ *
+ * 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;
+
+
+/**
+ * Deprecated because of renaming due spell check.
+ */
+@Deprecated
+public class EncrytedProperties extends EncryptedProperties {
+}
\ No newline at end of file
[13/15] ant-ivy git commit: More loose bits…
Posted by jh...@apache.org.
More loose bits…
Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/096c5bd0
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/096c5bd0
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/096c5bd0
Branch: refs/heads/master
Commit: 096c5bd0c1674733aee8822dbceecd069935472b
Parents: 4498bda
Author: twogee <g....@gmail.com>
Authored: Sun May 28 20:03:07 2017 +0200
Committer: twogee <g....@gmail.com>
Committed: Mon May 29 00:01:34 2017 +0200
----------------------------------------------------------------------
build.xml | 1 +
src/java/org/apache/ivy/ant/PackageMapping.java | 4 ++--
.../core/module/descriptor/DefaultDependencyDescriptor.java | 2 +-
src/java/org/apache/ivy/core/module/id/package.html | 2 --
src/java/org/apache/ivy/core/resolve/ResolveOptions.java | 2 +-
.../org/apache/ivy/core/settings/XmlSettingsParser.java | 6 +++---
src/java/org/apache/ivy/osgi/util/DelegatingHandler.java | 2 +-
.../ivy/plugins/namespace/MRIDTransformationRule.java | 6 +-----
.../org/apache/ivy/plugins/parser/xml/UpdateOptions.java | 4 ++--
.../ivy/plugins/parser/xml/XmlModuleDescriptorParser.java | 9 ++++-----
.../org/apache/ivy/plugins/resolver/FileSystemResolver.java | 2 +-
11 files changed, 17 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/096c5bd0/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 1bed091..89beaae 100644
--- a/build.xml
+++ b/build.xml
@@ -453,6 +453,7 @@
printsummary="yes"
includeantruntime="yes"
dir="${basedir}"
+ tempdir="${build.dir}"
fork="true">
<classpath>
<path refid="test.classpath"/>
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/096c5bd0/src/java/org/apache/ivy/ant/PackageMapping.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/PackageMapping.java b/src/java/org/apache/ivy/ant/PackageMapping.java
index 65950f6..69a4b17 100644
--- a/src/java/org/apache/ivy/ant/PackageMapping.java
+++ b/src/java/org/apache/ivy/ant/PackageMapping.java
@@ -59,8 +59,8 @@ public class PackageMapping {
return pkg;
}
- public void setPackage(String package1) {
- pkg = package1;
+ public void setPackage(String packageName) {
+ pkg = packageName;
}
public ModuleRevisionId getModuleRevisionId() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/096c5bd0/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
index 10ec684..a34837a 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
@@ -469,7 +469,7 @@ public class DefaultDependencyDescriptor implements DependencyDescriptor {
private Set getCollectionForConfiguration(String moduleConfiguration, Map collectionMap) {
if (collectionMap == null || collectionMap.isEmpty()) {
- return Collections.EMPTY_SET;
+ return Collections.emptySet();
}
Collection artifacts = (Collection) collectionMap.get(moduleConfiguration);
Collection defArtifacts = (Collection) collectionMap.get("*");
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/096c5bd0/src/java/org/apache/ivy/core/module/id/package.html
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/id/package.html b/src/java/org/apache/ivy/core/module/id/package.html
index 9e57242..4fde8d7 100644
--- a/src/java/org/apache/ivy/core/module/id/package.html
+++ b/src/java/org/apache/ivy/core/module/id/package.html
@@ -28,14 +28,12 @@ This packages gathers classes used to represent identifiers of objects involved
As identifiers, they do not store any information on the module content and detailed metadata (like dependencies).
</p>
<h2>Classes</h2>
-<p>
<ul>
<li>ModuleId</li> is used as the identifier of module, without considering its version. It's basically an organization and module name couple.
<li>ModuleRevisionId</li> is used as the identifier of a module in a particular version or version constraint. It is composed of a ModuleId, a revision, and optionally a branch and extra attributes.
<li>ArtifactId</li> identifies an artifact without considering its version. It's basically a ModuleId and an artifact name, type and extension, plus optional extra attributes.
<li>ArtifactRevisionId</li> identifies an artifact of a module in a particular version. It is composed of a ModuleRevisionId along with artifact identifier like the name type and extension.
</ul>
-</p>
<h2>Text Representation</h2>
<p>
These classes share an homogeneous text representation, which can be easily obtained through the toString() method.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/096c5bd0/src/java/org/apache/ivy/core/resolve/ResolveOptions.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/resolve/ResolveOptions.java b/src/java/org/apache/ivy/core/resolve/ResolveOptions.java
index c492a4e..b434c05 100644
--- a/src/java/org/apache/ivy/core/resolve/ResolveOptions.java
+++ b/src/java/org/apache/ivy/core/resolve/ResolveOptions.java
@@ -198,7 +198,7 @@ public class ResolveOptions extends LogOptions {
}
/**
- * Get the asked confs. Special confs (like *) use the moduleDescriptor to find the values *
+ * Get the asked confs. Special confs (like *) use the moduleDescriptor to find the values
*
* @param md
* Used to get the exact values for special confs.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/096c5bd0/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java b/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java
index bb9cad3..f85c295 100644
--- a/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java
+++ b/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java
@@ -477,7 +477,7 @@ public class XmlSettingsParser extends DefaultHandler {
String environmentPrefix = (String) attributes.get("environment");
if (propFilePath != null) {
String overrideStr = (String) attributes.get("override");
- boolean override = (overrideStr == null) ? true : Boolean.valueOf(overrideStr);
+ boolean override = (overrideStr == null) || Boolean.valueOf(overrideStr);
Message.verbose("loading properties: " + propFilePath);
try {
URL fileUrl = urlFromFileAttribute(propFilePath);
@@ -505,8 +505,8 @@ public class XmlSettingsParser extends DefaultHandler {
if (value == null) {
throw new IllegalArgumentException("missing attribute value on property tag");
}
- ivy.setVariable(name, value, (override == null) ? true : Boolean.valueOf(override),
- isSetVar, unlessSetVar);
+ ivy.setVariable(name, value, (override == null) || Boolean.valueOf(override), isSetVar,
+ unlessSetVar);
}
private void typedefStarted(Map attributes) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/096c5bd0/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java b/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
index 16fb967..7039ac5 100644
--- a/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
+++ b/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
@@ -125,7 +125,7 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
parent.delegate = null;
skip = false;
started = false;
- for (DelegatingHandler/* <?> */subHandler : saxHandlerMapping.values()) {
+ for (DelegatingHandler subHandler : saxHandlerMapping.values()) {
subHandler.stopDelegating();
}
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/096c5bd0/src/java/org/apache/ivy/plugins/namespace/MRIDTransformationRule.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/namespace/MRIDTransformationRule.java b/src/java/org/apache/ivy/plugins/namespace/MRIDTransformationRule.java
index a6880c8..7efe380 100644
--- a/src/java/org/apache/ivy/plugins/namespace/MRIDTransformationRule.java
+++ b/src/java/org/apache/ivy/plugins/namespace/MRIDTransformationRule.java
@@ -52,11 +52,7 @@ public class MRIDTransformationRule implements NamespaceTransformer {
}
}
matchers[3] = Pattern.compile(getPattern(src.getRev())).matcher(mrid.getRevision());
- if (!matchers[3].matches()) {
- return false;
- }
-
- return true;
+ return matchers[3].matches();
// CheckStyle:MagicNumber| ON
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/096c5bd0/src/java/org/apache/ivy/plugins/parser/xml/UpdateOptions.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/xml/UpdateOptions.java b/src/java/org/apache/ivy/plugins/parser/xml/UpdateOptions.java
index 994b21e..bf6e68d 100644
--- a/src/java/org/apache/ivy/plugins/parser/xml/UpdateOptions.java
+++ b/src/java/org/apache/ivy/plugins/parser/xml/UpdateOptions.java
@@ -39,12 +39,12 @@ public class UpdateOptions {
/**
* Map from ModuleId of dependencies to new revision (as String)
*/
- private Map resolvedRevisions = Collections.EMPTY_MAP;
+ private Map resolvedRevisions = Collections.emptyMap();
/**
* Map from ModuleId of dependencies to new branch (as String)
*/
- private Map resolvedBranches = Collections.EMPTY_MAP;
+ private Map resolvedBranches = Collections.emptyMap();
/**
* the new status, <code>null</code> to keep the old one
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/096c5bd0/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
index 0dcdb8a..9bb3522 100644
--- a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
+++ b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
@@ -312,7 +312,6 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
getBuffer().append("\"");
}
getBuffer().append(">");
- return;
} else if ("ivy-module".equals(qName)) {
ivyModuleStarted(attributes);
} else if ("info".equals(qName)) {
@@ -847,8 +846,8 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
String visibility = settings.substitute(attributes.getValue("visibility"));
String ext = settings.substitute(attributes.getValue("extends"));
String transitiveValue = attributes.getValue("transitive");
- boolean transitive = (transitiveValue == null) ? true
- : Boolean.valueOf(attributes.getValue("transitive"));
+ boolean transitive = (transitiveValue == null)
+ || Boolean.valueOf(attributes.getValue("transitive"));
String deprecated = attributes.getValue("deprecated");
Configuration configuration = new Configuration(conf,
Configuration.Visibility.getVisibility((visibility == null) ? "public"
@@ -904,8 +903,8 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
boolean changing = Boolean.valueOf(settings.substitute(attributes.getValue("changing")));
String transitiveValue = settings.substitute(attributes.getValue("transitive"));
- boolean transitive = (transitiveValue == null) ? true
- : Boolean.valueOf(attributes.getValue("transitive"));
+ boolean transitive = (transitiveValue == null)
+ || Boolean.valueOf(attributes.getValue("transitive"));
String name = settings.substitute(attributes.getValue("name"));
String branch = settings.substitute(attributes.getValue("branch"));
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/096c5bd0/src/java/org/apache/ivy/plugins/resolver/FileSystemResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/FileSystemResolver.java b/src/java/org/apache/ivy/plugins/resolver/FileSystemResolver.java
index 8c7ca19..f6e1e40 100644
--- a/src/java/org/apache/ivy/plugins/resolver/FileSystemResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/FileSystemResolver.java
@@ -152,7 +152,7 @@ public class FileSystemResolver extends RepositoryResolver {
try {
getFileRepository().move(transactionTempDir, transactionDestDir);
- Message.info("\tpublish commited: moved " + transactionTempDir + " \n\t\tto "
+ Message.info("\tpublish committed: moved " + transactionTempDir + " \n\t\tto "
+ transactionDestDir);
} catch (IOException ex) {
IOException commitEx;
[03/15] ant-ivy git commit: More code cleanup
Posted by jh...@apache.org.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/filter/OSGiFilterParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/filter/OSGiFilterParser.java b/src/java/org/apache/ivy/osgi/filter/OSGiFilterParser.java
index 7f21ea6..da9ed9e 100644
--- a/src/java/org/apache/ivy/osgi/filter/OSGiFilterParser.java
+++ b/src/java/org/apache/ivy/osgi/filter/OSGiFilterParser.java
@@ -52,7 +52,7 @@ public class OSGiFilterParser {
/**
* Default constructor
*
- * @param header
+ * @param text
* the header to parse
*/
Parser(String text) {
@@ -63,7 +63,7 @@ public class OSGiFilterParser {
/**
* Do the parsing
*
- * @return
+ * @return OSGiFilter
*
* @throws ParseException
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/obr/OBRResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/obr/OBRResolver.java b/src/java/org/apache/ivy/osgi/obr/OBRResolver.java
index f4fb3e5..162fd42 100644
--- a/src/java/org/apache/ivy/osgi/obr/OBRResolver.java
+++ b/src/java/org/apache/ivy/osgi/obr/OBRResolver.java
@@ -91,7 +91,7 @@ public class OBRResolver extends AbstractOSGiResolver {
options.setTtl(metadataTtl.longValue());
}
if (forceMetadataUpdate != null) {
- options.setForce(forceMetadataUpdate.booleanValue());
+ options.setForce(forceMetadataUpdate);
}
report = getRepositoryCacheManager().downloadRepositoryResource(obrResource, "obr",
"obr", "xml", options, getRepository());
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/obr/xml/CapabilityAdapter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/obr/xml/CapabilityAdapter.java b/src/java/org/apache/ivy/osgi/obr/xml/CapabilityAdapter.java
index 2df1f11..6aea463 100644
--- a/src/java/org/apache/ivy/osgi/obr/xml/CapabilityAdapter.java
+++ b/src/java/org/apache/ivy/osgi/obr/xml/CapabilityAdapter.java
@@ -97,7 +97,6 @@ public class CapabilityAdapter {
if (name == null) {
throw new ParseException("No service name for the capability", 0);
}
- BundleCapability service = new BundleCapability(BundleInfo.SERVICE_TYPE, name, version);
- return service;
+ return new BundleCapability(BundleInfo.SERVICE_TYPE, name, version);
}
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/obr/xml/OBRXMLParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/obr/xml/OBRXMLParser.java b/src/java/org/apache/ivy/osgi/obr/xml/OBRXMLParser.java
index 3f9088c..1bff108 100644
--- a/src/java/org/apache/ivy/osgi/obr/xml/OBRXMLParser.java
+++ b/src/java/org/apache/ivy/osgi/obr/xml/OBRXMLParser.java
@@ -69,7 +69,7 @@ public class OBRXMLParser {
this.baseUri = baseUri;
addChild(new ResourceHandler(), new ChildElementHandler<ResourceHandler>() {
@Override
- public void childHanlded(ResourceHandler child) {
+ public void childHandled(ResourceHandler child) {
repo.addBundle(child.bundleInfo);
}
});
@@ -112,7 +112,7 @@ public class OBRXMLParser {
addChild(new ResourceSourceHandler(), new ChildElementHandler<ResourceSourceHandler>() {
@Override
- public void childHanlded(ResourceSourceHandler child) {
+ public void childHandled(ResourceSourceHandler child) {
String uri = child.getBufferedChars().trim();
if (!uri.endsWith(".jar")) {
// the maven plugin is putting some useless source url sometimes...
@@ -133,27 +133,27 @@ public class OBRXMLParser {
addChild(new ResourceDescriptionHandler(),
new ChildElementHandler<ResourceDescriptionHandler>() {
@Override
- public void childHanlded(ResourceDescriptionHandler child) {
+ public void childHandled(ResourceDescriptionHandler child) {
bundleInfo.setDescription(child.getBufferedChars().trim());
}
});
addChild(new ResourceDocumentationHandler(),
new ChildElementHandler<ResourceDocumentationHandler>() {
@Override
- public void childHanlded(ResourceDocumentationHandler child) {
+ public void childHandled(ResourceDocumentationHandler child) {
bundleInfo.setDocumentation(child.getBufferedChars().trim());
}
});
addChild(new ResourceLicenseHandler(),
new ChildElementHandler<ResourceLicenseHandler>() {
@Override
- public void childHanlded(ResourceLicenseHandler child) {
+ public void childHandled(ResourceLicenseHandler child) {
bundleInfo.setLicense(child.getBufferedChars().trim());
}
});
addChild(new ResourceSizeHandler(), new ChildElementHandler<ResourceSizeHandler>() {
@Override
- public void childHanlded(ResourceSizeHandler child) {
+ public void childHandled(ResourceSizeHandler child) {
String size = child.getBufferedChars().trim();
try {
bundleInfo.setSize(Integer.valueOf(size));
@@ -166,7 +166,7 @@ public class OBRXMLParser {
});
addChild(new CapabilityHandler(), new ChildElementHandler<CapabilityHandler>() {
@Override
- public void childHanlded(CapabilityHandler child) throws SAXParseException {
+ public void childHandled(CapabilityHandler child) throws SAXParseException {
try {
CapabilityAdapter.adapt(bundleInfo, child.capability);
@@ -178,7 +178,7 @@ public class OBRXMLParser {
});
addChild(new RequireHandler(), new ChildElementHandler<RequireHandler>() {
@Override
- public void childHanlded(RequireHandler child) throws SAXParseException {
+ public void childHandled(RequireHandler child) throws SAXParseException {
try {
RequirementAdapter.adapt(bundleInfo, child.requirement);
} catch (UnsupportedFilterException e) {
@@ -193,7 +193,7 @@ public class OBRXMLParser {
});
addChild(new ExtendHandler(), new ChildElementHandler<ExtendHandler>() {
@Override
- public void childHanlded(ExtendHandler child) throws SAXParseException {
+ public void childHandled(ExtendHandler child) throws SAXParseException {
// TODO handle fragment host
}
});
@@ -203,22 +203,13 @@ public class OBRXMLParser {
protected void handleAttributes(Attributes atts) throws SAXException {
String symbolicname = atts.getValue(SYMBOLIC_NAME);
if (symbolicname == null) {
- log(Message.MSG_ERR, "Resource with no symobilc name, skipping it.");
+ log(Message.MSG_ERR, "Resource with no symbolic name, skipping it.");
skip();
return;
}
String v = getOptionalAttribute(atts, VERSION, DEFAULT_VERSION);
- Version version;
- try {
- version = new Version(v);
- } catch (ParseException e) {
- log(Message.MSG_ERR, "Incorrect resource version: " + v + ". The resource "
- + symbolicname + " is then ignored.");
- skip();
- return;
- }
-
+ Version version = new Version(v);
bundleInfo = new BundleInfo(symbolicname, version);
bundleInfo.setPresentationName(atts.getValue(PRESENTATION_NAME));
String uri = atts.getValue(URI);
@@ -308,7 +299,7 @@ public class OBRXMLParser {
addChild(new CapabilityPropertyHandler(),
new ChildElementHandler<CapabilityPropertyHandler>() {
@Override
- public void childHanlded(CapabilityPropertyHandler child) {
+ public void childHandled(CapabilityPropertyHandler child) {
String name = child.name;
String value = child.value;
String type = child.type;
@@ -382,7 +373,7 @@ public class OBRXMLParser {
try {
filter = OSGiFilterParser.parse(filterText);
} catch (ParseException e) {
- throw new SAXParseException("Requirement with illformed filter: " + filterText,
+ throw new SAXParseException("Requirement with ill-formed filter: " + filterText,
getLocator());
}
}
@@ -392,10 +383,10 @@ public class OBRXMLParser {
requirement = new Requirement(name, filter);
if (optional != null) {
- requirement.setOptional(optional.booleanValue());
+ requirement.setOptional(optional);
}
if (multiple != null) {
- requirement.setMultiple(multiple.booleanValue());
+ requirement.setMultiple(multiple);
}
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/obr/xml/RequirementAdapter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/obr/xml/RequirementAdapter.java b/src/java/org/apache/ivy/osgi/obr/xml/RequirementAdapter.java
index 0f9a68d..0c20f1f 100644
--- a/src/java/org/apache/ivy/osgi/obr/xml/RequirementAdapter.java
+++ b/src/java/org/apache/ivy/osgi/obr/xml/RequirementAdapter.java
@@ -100,7 +100,7 @@ public class RequirementAdapter {
|| BundleInfo.SERVICE_TYPE.equals(att)) {
if (not) {
throw new UnsupportedFilterException(
- "Not filter on requirement comparaison is not supported");
+ "Not filter on requirement comparison is not supported");
}
if (type != null) {
throw new UnsupportedFilterException("Multiple requirement type are not supported");
@@ -117,17 +117,12 @@ public class RequirementAdapter {
name = compareFilter.getRightValue();
} else if ("version".equals(att)) {
String v = compareFilter.getRightValue();
- Version version;
- try {
- version = new Version(v);
- } catch (ParseException e) {
- throw new ParseException("Ill formed version: " + v, 0);
- }
+ Version version = new Version(v);
Operator operator = compareFilter.getOperator();
if (not) {
if (operator == Operator.EQUALS) {
throw new UnsupportedFilterException(
- "Not filter on equals comparaison is not supported");
+ "Not filter on equals comparison is not supported");
} else if (operator == Operator.GREATER_OR_EQUAL) {
operator = Operator.LOWER_THAN;
} else if (operator == Operator.GREATER_THAN) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/obr/xml/UnsupportedFilterException.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/obr/xml/UnsupportedFilterException.java b/src/java/org/apache/ivy/osgi/obr/xml/UnsupportedFilterException.java
index 3218bca..c798be1 100644
--- a/src/java/org/apache/ivy/osgi/obr/xml/UnsupportedFilterException.java
+++ b/src/java/org/apache/ivy/osgi/obr/xml/UnsupportedFilterException.java
@@ -17,6 +17,7 @@
*/
package org.apache.ivy.osgi.obr.xml;
+@SuppressWarnings("serial")
public class UnsupportedFilterException extends Exception {
public UnsupportedFilterException(String message) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/p2/P2ArtifactParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/p2/P2ArtifactParser.java b/src/java/org/apache/ivy/osgi/p2/P2ArtifactParser.java
index 0d3786f..207618a 100644
--- a/src/java/org/apache/ivy/osgi/p2/P2ArtifactParser.java
+++ b/src/java/org/apache/ivy/osgi/p2/P2ArtifactParser.java
@@ -76,12 +76,12 @@ public class P2ArtifactParser implements XMLInputParser {
public RepositoryHandler(final P2Descriptor p2Descriptor, String repoUrl) {
super(REPOSITORY);
// addChild(new PropertiesHandler(), new ChildElementHandler<PropertiesHandler>() {
- // public void childHanlded(PropertiesHandler child) {
+ // public void childHandled(PropertiesHandler child) {
// }
// });
addChild(new MappingsHandler(), new ChildElementHandler<MappingsHandler>() {
@Override
- public void childHanlded(MappingsHandler child) {
+ public void childHandled(MappingsHandler child) {
for (Entry<String, String> entry : child.outputByFilter.entrySet()) {
OSGiFilter filter;
try {
@@ -97,7 +97,7 @@ public class P2ArtifactParser implements XMLInputParser {
addChild(new ArtifactsHandler(p2Descriptor, artifactPatterns, repoUrl),
new ChildElementHandler<ArtifactsHandler>() {
@Override
- public void childHanlded(ArtifactsHandler child) {
+ public void childHandled(ArtifactsHandler child) {
// nothing to do
}
});
@@ -121,7 +121,7 @@ public class P2ArtifactParser implements XMLInputParser {
super(MAPPINGS);
addChild(new RuleHandler(), new ChildElementHandler<RuleHandler>() {
@Override
- public void childHanlded(RuleHandler child) {
+ public void childHandled(RuleHandler child) {
outputByFilter.put(child.filter, child.output);
}
});
@@ -170,7 +170,7 @@ public class P2ArtifactParser implements XMLInputParser {
super(ARTIFACTS);
addChild(new ArtifactHandler(), new ChildElementHandler<ArtifactHandler>() {
@Override
- public void childHanlded(ArtifactHandler child) throws SAXParseException {
+ public void childHandled(ArtifactHandler child) throws SAXParseException {
String url = getPattern(child.p2Artifact, child.properties);
if (url != null) {
url = url.replaceAll("\\$\\{repoUrl\\}", repoUrl);
@@ -231,7 +231,7 @@ public class P2ArtifactParser implements XMLInputParser {
super(ARTIFACT);
addChild(new PropertiesHandler(), new ChildElementHandler<PropertiesHandler>() {
@Override
- public void childHanlded(PropertiesHandler child) {
+ public void childHandled(PropertiesHandler child) {
properties = child.properties;
}
});
@@ -240,13 +240,7 @@ public class P2ArtifactParser implements XMLInputParser {
@Override
protected void handleAttributes(Attributes atts) throws SAXException {
String id = atts.getValue(ID);
- Version version;
- try {
- version = new Version(atts.getValue(VERSION));
- } catch (ParseException e) {
- throw new SAXException("Incorrect version attribute on artifact '" + id + "': "
- + atts.getValue(VERSION) + " (" + e.getMessage() + ")");
- }
+ Version version = new Version(atts.getValue(VERSION));
String classifier = atts.getValue(CLASSIFIER);
p2Artifact = new P2Artifact(id, version, classifier);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/p2/P2CompositeParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/p2/P2CompositeParser.java b/src/java/org/apache/ivy/osgi/p2/P2CompositeParser.java
index 1a9bf78..110907f 100644
--- a/src/java/org/apache/ivy/osgi/p2/P2CompositeParser.java
+++ b/src/java/org/apache/ivy/osgi/p2/P2CompositeParser.java
@@ -67,7 +67,7 @@ public class P2CompositeParser implements XMLInputParser {
super(REPOSITORY);
addChild(new ChildrenHandler(), new ChildElementHandler<ChildrenHandler>() {
@Override
- public void childHanlded(ChildrenHandler child) {
+ public void childHandled(ChildrenHandler child) {
childLocations = child.childLocations;
}
});
@@ -91,7 +91,7 @@ public class P2CompositeParser implements XMLInputParser {
super(CHILDREN);
addChild(new ChildHandler(), new ChildElementHandler<ChildHandler>() {
@Override
- public void childHanlded(ChildHandler child) {
+ public void childHandled(ChildHandler child) {
childLocations.add(child.location);
}
});
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/p2/P2Descriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/p2/P2Descriptor.java b/src/java/org/apache/ivy/osgi/p2/P2Descriptor.java
index 7dbfe32..87ab7fc 100644
--- a/src/java/org/apache/ivy/osgi/p2/P2Descriptor.java
+++ b/src/java/org/apache/ivy/osgi/p2/P2Descriptor.java
@@ -136,8 +136,6 @@ public class P2Descriptor extends EditableRepoDescriptor {
}
}
- BundleArtifact best = artifact;
-
if (same != null) {
// we have two artifacts for the same bundle, let's choose a "packed" one
if (artifact.getFormat() == null || same.getFormat() != null) {
@@ -147,6 +145,6 @@ public class P2Descriptor extends EditableRepoDescriptor {
bundle.removeArtifact(same);
}
- bundle.addArtifact(best);
+ bundle.addArtifact(artifact);
}
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java b/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java
index c8a24ad..700a23a 100644
--- a/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java
+++ b/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java
@@ -85,7 +85,7 @@ public class P2MetadataParser implements XMLInputParser {
super(REPOSITORY);
// addChild(new PropertiesHandler(P2_TIMESTAMP),
// new ChildElementHandler<PropertiesHandler>() {
- // public void childHanlded(PropertiesHandler child) {
+ // public void childHandled(PropertiesHandler child) {
// String timestamp = child.properties.get(P2_TIMESTAMP);
// if (timestamp != null) {
// p2Descriptor.setTimestamp(Long.parseLong(timestamp));
@@ -94,7 +94,7 @@ public class P2MetadataParser implements XMLInputParser {
// });
addChild(new UnitsHandler(), new ChildElementHandler<UnitsHandler>() {
@Override
- public void childHanlded(UnitsHandler child) {
+ public void childHandled(UnitsHandler child) {
for (BundleInfo bundle : child.bundles) {
p2Descriptor.addBundle(bundle);
}
@@ -102,7 +102,7 @@ public class P2MetadataParser implements XMLInputParser {
});
addChild(new ReferencesHandler(), new ChildElementHandler<ReferencesHandler>() {
@Override
- public void childHanlded(ReferencesHandler child) {
+ public void childHandled(ReferencesHandler child) {
}
});
}
@@ -129,7 +129,7 @@ public class P2MetadataParser implements XMLInputParser {
addChild(new RepositoryReferenceHandler(),
new ChildElementHandler<RepositoryReferenceHandler>() {
@Override
- public void childHanlded(RepositoryReferenceHandler child) {
+ public void childHandled(RepositoryReferenceHandler child) {
repositoryUris.add(child.uri);
}
});
@@ -208,7 +208,7 @@ public class P2MetadataParser implements XMLInputParser {
super(UNITS);
addChild(new UnitHandler(), new ChildElementHandler<UnitHandler>() {
@Override
- public void childHanlded(UnitHandler child) {
+ public void childHandled(UnitHandler child) {
if (child.bundleInfo != null && !child.bundleInfo.getCapabilities().isEmpty()) {
bundles.add(child.bundleInfo);
}
@@ -241,15 +241,15 @@ public class P2MetadataParser implements XMLInputParser {
public UnitHandler() {
super(UNIT);
// addChild(new UpdateHandler(), new ChildElementHandler() {
- // public void childHanlded(DelegetingHandler child) {
+ // public void childHandled(DelegatingHandler child) {
// }
// });
addChild(new PropertiesHandler(CATEGORY_PROPERTY),
new ChildElementHandler<PropertiesHandler>() {
@Override
- public void childHanlded(PropertiesHandler child) {
+ public void childHandled(PropertiesHandler child) {
String category = child.properties.get(CATEGORY_PROPERTY);
- if (category != null && Boolean.valueOf(category).booleanValue()) {
+ if (category != null && Boolean.valueOf(category)) {
// this is a category definition, this is useless, skip this unit
child.getParent().skip();
bundleInfo = null;
@@ -258,11 +258,11 @@ public class P2MetadataParser implements XMLInputParser {
});
addChild(new ProvidesHandler(), new ChildElementHandler<ProvidesHandler>() {
@Override
- public void childHanlded(ProvidesHandler child) {
+ public void childHandled(ProvidesHandler child) {
if ("source".equals(child.eclipseType)) {
// this is some source of some bundle
bundleInfo.setSource(true);
- // we need to parse the manifest in the toupointData to figure out the
+ // we need to parse the manifest in the touchpointData to figure out the
// targeted bundle
// in case we won't have the proper data in the manifest, prepare the source
// data from the convention
@@ -280,12 +280,12 @@ public class P2MetadataParser implements XMLInputParser {
});
addChild(new FilterHandler(), new ChildElementHandler<FilterHandler>() {
@Override
- public void childHanlded(FilterHandler child) {
+ public void childHandled(FilterHandler child) {
}
});
addChild(new RequiresHandler(), new ChildElementHandler<RequiresHandler>() {
@Override
- public void childHanlded(RequiresHandler child) {
+ public void childHandled(RequiresHandler child) {
for (BundleRequirement requirement : child.requirements) {
bundleInfo.addRequirement(requirement);
}
@@ -294,29 +294,29 @@ public class P2MetadataParser implements XMLInputParser {
addChild(new HostRequirementsHandler(),
new ChildElementHandler<HostRequirementsHandler>() {
@Override
- public void childHanlded(HostRequirementsHandler child) {
+ public void childHandled(HostRequirementsHandler child) {
}
});
addChild(new MetaRequirementsHandler(),
new ChildElementHandler<MetaRequirementsHandler>() {
@Override
- public void childHanlded(MetaRequirementsHandler child) {
+ public void childHandled(MetaRequirementsHandler child) {
}
});
addChild(new ArtifactsHandler(), new ChildElementHandler<ArtifactsHandler>() {
@Override
- public void childHanlded(ArtifactsHandler child) {
+ public void childHandled(ArtifactsHandler child) {
}
});
// addChild(new TouchpointHandler(), new ChildElementHandler() {
- // public void childHanlded(DelegetingHandler child) {
+ // public void childHandled(DelegatingHandler child) {
// }
// });
addChild(new TouchpointDataHandler(), new ChildElementHandler<TouchpointDataHandler>() {
@Override
- public void childHanlded(TouchpointDataHandler child) throws SAXParseException {
+ public void childHandled(TouchpointDataHandler child) throws SAXParseException {
if (child.zipped != null) {
- bundleInfo.setHasInnerClasspath(child.zipped.booleanValue());
+ bundleInfo.setHasInnerClasspath(child.zipped);
}
if (!bundleInfo.isSource()) {
// we only care about parsing the manifest if it is a source
@@ -376,15 +376,15 @@ public class P2MetadataParser implements XMLInputParser {
}
});
// addChild(new LicensesHandler(), new ChildElementHandler() {
- // public void childHanlded(DelegetingHandler child) {
+ // public void childHandled(DelegatingHandler child) {
// }
// });
// addChild(new CopyrightHandler(), new ChildElementHandler() {
- // public void childHanlded(DelegetingHandler child) {
+ // public void childHandled(DelegatingHandler child) {
// }
// });
// addChild(new ChangesHandler(), new ChildElementHandler() {
- // public void childHanlded(DelegetingHandler child) {
+ // public void childHandled(DelegatingHandler child) {
// }
// });
@@ -395,17 +395,12 @@ public class P2MetadataParser implements XMLInputParser {
String id = atts.getValue(ID);
String version = atts.getValue(VERSION);
// Boolean singleton = Boolean.valueOf(atts.getValue(SINGLETON));
- try {
- bundleInfo = new BundleInfo(id, new Version(version));
- } catch (ParseException e) {
- throw new SAXException("Incorrect version on bundle '" + id + "': " + version
- + " (" + e.getMessage() + ")");
- }
+ bundleInfo = new BundleInfo(id, new Version(version));
}
}
- // static class UpdateHandler extends DelegetingHandler {
+ // static class UpdateHandler extends DelegatingHandler {
//
// private static final String UPDATE = "update";
//
@@ -465,7 +460,7 @@ public class P2MetadataParser implements XMLInputParser {
super(PROVIDES);
addChild(new ProvidedHandler(), new ChildElementHandler<ProvidedHandler>() {
@Override
- public void childHanlded(ProvidedHandler child) {
+ public void childHandled(ProvidedHandler child) {
if (child.namespace.equals("org.eclipse.equinox.p2.eclipse.type")) {
eclipseType = child.name;
} else {
@@ -521,12 +516,7 @@ public class P2MetadataParser implements XMLInputParser {
protected void handleAttributes(Attributes atts) throws SAXException {
namespace = atts.getValue(NAMESPACE);
name = atts.getValue(NAME);
- try {
- version = new Version(atts.getValue(VERSION));
- } catch (ParseException e) {
- throw new SAXException("Incorrect version on provided capability: " + version
- + " (" + e.getMessage() + ")");
- }
+ version = new Version(atts.getValue(VERSION));
}
}
@@ -541,7 +531,7 @@ public class P2MetadataParser implements XMLInputParser {
super(name);
addChild(new RequiredHandler(), new ChildElementHandler<RequiredHandler>() {
@Override
- public void childHanlded(RequiredHandler child) {
+ public void childHandled(RequiredHandler child) {
String name = child.name;
VersionRange range = child.range;
String type = namespace2Type(child.namespace);
@@ -605,7 +595,7 @@ public class P2MetadataParser implements XMLInputParser {
public RequiredHandler() {
super(REQUIRED);
// addChild(new FilterHandler(), new ChildElementHandler<FilterHandler>() {
- // public void childHanlded(FilterHandler child) {
+ // public void childHandled(FilterHandler child) {
// filter = child.getBufferedChars().trim();
// }
// });
@@ -621,7 +611,7 @@ public class P2MetadataParser implements XMLInputParser {
throw new RuntimeException(e);
}
// greedy = getOptionalBooleanAttribute(atts, GREEDY, Boolean.TRUE).booleanValue();
- optional = getOptionalBooleanAttribute(atts, OPTIONAL, Boolean.FALSE).booleanValue();
+ optional = getOptionalBooleanAttribute(atts, OPTIONAL, Boolean.FALSE);
}
}
@@ -658,7 +648,7 @@ public class P2MetadataParser implements XMLInputParser {
super(ARTIFACTS);
addChild(new ArtifactHandler(), new ChildElementHandler<ArtifactHandler>() {
@Override
- public void childHanlded(ArtifactHandler child) {
+ public void childHandled(ArtifactHandler child) {
artifacts.add(child.artifact);
}
});
@@ -693,17 +683,12 @@ public class P2MetadataParser implements XMLInputParser {
String id = atts.getValue(ID);
String version = atts.getValue(VERSION);
String classifier = atts.getValue(CLASSIFIER);
- try {
- artifact = new P2Artifact(id, new Version(version), classifier);
- } catch (ParseException e) {
- throw new SAXException("Incorrect version on artifact '" + id + "': " + version
- + " (" + e.getMessage() + ")");
- }
+ artifact = new P2Artifact(id, new Version(version), classifier);
}
}
- // private static class TouchpointHandler extends DelegetingHandler {
+ // private static class TouchpointHandler extends DelegatingHandler {
//
// private static final String TOUCHPOINT = "touchpoint";
//
@@ -736,7 +721,7 @@ public class P2MetadataParser implements XMLInputParser {
super(TOUCHPOINTDATA);
addChild(new InstructionsHandler(), new ChildElementHandler<InstructionsHandler>() {
@Override
- public void childHanlded(InstructionsHandler child) {
+ public void childHandled(InstructionsHandler child) {
manifest = child.manifest;
zipped = child.zipped;
}
@@ -764,7 +749,7 @@ public class P2MetadataParser implements XMLInputParser {
super(INSTRUCTIONS);
addChild(new InstructionHandler(), new ChildElementHandler<InstructionHandler>() {
@Override
- public void childHanlded(InstructionHandler child) {
+ public void childHandled(InstructionHandler child) {
manifest = null;
zipped = null;
String buffer = child.getBufferedChars().trim();
@@ -804,7 +789,7 @@ public class P2MetadataParser implements XMLInputParser {
}
- // private static class LicensesHandler extends DelegetingHandler {
+ // private static class LicensesHandler extends DelegatingHandler {
//
// private static final String LICENSES = "licenses";
//
@@ -813,7 +798,7 @@ public class P2MetadataParser implements XMLInputParser {
// public LicensesHandler() {
// super(LICENSES);
// addChild(new LicenseHandler(), new ChildElementHandler() {
- // public void childHanlded(DelegetingHandler child) {
+ // public void childHandled(DelegatingHandler child) {
// }
// });
// }
@@ -824,7 +809,7 @@ public class P2MetadataParser implements XMLInputParser {
//
// }
- // private static class LicenseHandler extends DelegetingHandler {
+ // private static class LicenseHandler extends DelegatingHandler {
//
// private static final String LICENSE = "license";
//
@@ -844,7 +829,7 @@ public class P2MetadataParser implements XMLInputParser {
//
// }
- // private static class CopyrightHandler extends DelegetingHandler {
+ // private static class CopyrightHandler extends DelegatingHandler {
//
// private static final String COPYRIGHT = "copyright";
//
@@ -863,7 +848,7 @@ public class P2MetadataParser implements XMLInputParser {
//
// }
- // private class ChangesHandler extends DelegetingHandler {
+ // private class ChangesHandler extends DelegatingHandler {
//
// private static final String CHANGES = "changes";
//
@@ -872,7 +857,7 @@ public class P2MetadataParser implements XMLInputParser {
// public ChangesHandler() {
// super(CHANGES);
// addChild(new ChangeHandler(), new ChildElementHandler<ChangeHandler>() {
- // public void childHanlded(ChangeHandler child) {
+ // public void childHandled(ChangeHandler child) {
// }
// });
// }
@@ -882,7 +867,7 @@ public class P2MetadataParser implements XMLInputParser {
// }
// }
- // private class ChangeHandler extends DelegetingHandler {
+ // private class ChangeHandler extends DelegatingHandler {
//
// private static final String CHANGE = "change";
//
@@ -911,7 +896,7 @@ public class P2MetadataParser implements XMLInputParser {
//
// }
- // private class PatchScopeHandler extends DelegetingHandler {
+ // private class PatchScopeHandler extends DelegatingHandler {
//
// private static final String PATCH_SCOPE = "patchScope";
//
@@ -920,7 +905,7 @@ public class P2MetadataParser implements XMLInputParser {
// public PatchScopeHandler() {
// super(PATCH_SCOPE);
// addChild(new PatchScopeHandler(), new ChildElementHandler<PatchScopeHandler>() {
- // public void childHanlded(PatchScopeHandler child) {
+ // public void childHandled(PatchScopeHandler child) {
// }
// });
// }
@@ -930,14 +915,14 @@ public class P2MetadataParser implements XMLInputParser {
// }
// }
- // private class ScopeHandler extends DelegetingHandler {
+ // private class ScopeHandler extends DelegatingHandler {
//
// private static final String SCOPE = "scope";
//
// public ScopeHandler() {
// super(SCOPE);
// addChild(new RequiresHandler(), new ChildElementHandler<RequiresHandler>() {
- // public void childHanlded(RequiresHandler child) {
+ // public void childHandled(RequiresHandler child) {
// }
// });
// }
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/p2/PropertiesParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/p2/PropertiesParser.java b/src/java/org/apache/ivy/osgi/p2/PropertiesParser.java
index 5e1c705..bf048af 100644
--- a/src/java/org/apache/ivy/osgi/p2/PropertiesParser.java
+++ b/src/java/org/apache/ivy/osgi/p2/PropertiesParser.java
@@ -40,7 +40,7 @@ public class PropertiesParser {
final List<String> propList = Arrays.asList(props);
addChild(new PropertyHandler(), new ChildElementHandler<PropertyHandler>() {
@Override
- public void childHanlded(PropertyHandler child) {
+ public void childHandled(PropertyHandler child) {
if (propList.isEmpty() || propList.contains(child.name)) {
properties.put(child.name, child.value);
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/repo/AbstractFSManifestIterable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/repo/AbstractFSManifestIterable.java b/src/java/org/apache/ivy/osgi/repo/AbstractFSManifestIterable.java
index 0318f67..eb4b4f0 100644
--- a/src/java/org/apache/ivy/osgi/repo/AbstractFSManifestIterable.java
+++ b/src/java/org/apache/ivy/osgi/repo/AbstractFSManifestIterable.java
@@ -72,7 +72,7 @@ public abstract class AbstractFSManifestIterable<T> implements Iterable<Manifest
private T currentDir = null;
FSManifestIterator() {
- dirs.add(Collections.<T> singleton(root).iterator());
+ dirs.add(Collections.singleton(root).iterator());
}
/**
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java b/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java
index 8a773f2..2612fbe 100644
--- a/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java
+++ b/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java
@@ -20,7 +20,6 @@ package org.apache.ivy.osgi.repo;
import java.io.File;
import java.io.IOException;
import java.net.URL;
-import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -372,8 +371,7 @@ public abstract class AbstractOSGiResolver extends BasicResolver {
if (found == null) {
return Collections.emptyList();
}
- List<String> confs = Arrays.asList(found.getConfigurationsNames());
- return confs;
+ return Arrays.asList(found.getConfigurationsNames());
}
return Collections.emptyList();
}
@@ -382,14 +380,15 @@ public abstract class AbstractOSGiResolver extends BasicResolver {
* Populate capabilityValues with capability values for which at least one module match the
* expected revision
*/
+ @SuppressWarnings("unused")
private void filterCapabilityValues(Set<String> capabilityValues,
- Map<String, Set<ModuleDescriptor>> moduleByCapbilityValue,
+ Map<String, Set<ModuleDescriptor>> moduleByCapabilityValue,
Map<String, String> tokenValues, String rev) {
if (rev == null) {
// no revision, all match then
- capabilityValues.addAll(moduleByCapbilityValue.keySet());
+ capabilityValues.addAll(moduleByCapabilityValue.keySet());
} else {
- for (Entry<String, Set<ModuleDescriptor>> entry : moduleByCapbilityValue.entrySet()) {
+ for (Entry<String, Set<ModuleDescriptor>> entry : moduleByCapabilityValue.entrySet()) {
Iterator<ModuleDescriptor> itModules = entry.getValue().iterator();
boolean moduleMatchRev = false;
while (!moduleMatchRev && itModules.hasNext()) {
@@ -498,12 +497,7 @@ public abstract class AbstractOSGiResolver extends BasicResolver {
if (bundles == null) {
return Collections.emptySet();
}
- Version v;
- try {
- v = new Version(rev);
- } catch (ParseException e) {
- return Collections.emptySet();
- }
+ Version v = new Version(rev);
ModuleDescriptorWrapper found = null;
for (ModuleDescriptorWrapper bundle : bundles) {
if (bundle.getBundleInfo().getVersion().equals(v)) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/repo/ArtifactReportManifestIterable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/repo/ArtifactReportManifestIterable.java b/src/java/org/apache/ivy/osgi/repo/ArtifactReportManifestIterable.java
index 5b3ae2d..0674228 100644
--- a/src/java/org/apache/ivy/osgi/repo/ArtifactReportManifestIterable.java
+++ b/src/java/org/apache/ivy/osgi/repo/ArtifactReportManifestIterable.java
@@ -148,10 +148,7 @@ public class ArtifactReportManifestIterable implements Iterable<ManifestAndLocat
}
}
}
- if (next == null) {
- return false;
- }
- return true;
+ return next != null;
}
public ManifestAndLocation next() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/repo/FSManifestIterable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/repo/FSManifestIterable.java b/src/java/org/apache/ivy/osgi/repo/FSManifestIterable.java
index fe997e2..f6b2cb2 100644
--- a/src/java/org/apache/ivy/osgi/repo/FSManifestIterable.java
+++ b/src/java/org/apache/ivy/osgi/repo/FSManifestIterable.java
@@ -52,7 +52,7 @@ public class FSManifestIterable extends AbstractFSManifestIterable<File> {
/**
* Default bundle filter that select only .jar files
*/
- public static final FilenameFilter DEFAULT_BUNLDE_FILTER = new FilenameFilter() {
+ public static final FilenameFilter DEFAULT_BUNDLE_FILTER = new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.endsWith(".jar");
}
@@ -60,7 +60,7 @@ public class FSManifestIterable extends AbstractFSManifestIterable<File> {
private FilenameFilter dirFilter = DEFAULT_DIR_FILTER;
- private FilenameFilter bundleFilter = DEFAULT_BUNLDE_FILTER;
+ private FilenameFilter bundleFilter = DEFAULT_BUNDLE_FILTER;
/**
* Default constructor
@@ -105,10 +105,7 @@ public class FSManifestIterable extends AbstractFSManifestIterable<File> {
protected List<File> listBundleFiles(File dir) {
return Arrays.asList(dir.listFiles(new FileFilter() {
public boolean accept(File f) {
- if (!f.isFile()) {
- return false;
- }
- return bundleFilter.accept(f.getParentFile(), f.getName());
+ return f.isFile() && bundleFilter.accept(f.getParentFile(), f.getName());
}
}));
}
@@ -116,10 +113,7 @@ public class FSManifestIterable extends AbstractFSManifestIterable<File> {
protected List<File> listDirs(File dir) {
return Arrays.asList(dir.listFiles(new FileFilter() {
public boolean accept(File f) {
- if (!f.isDirectory()) {
- return false;
- }
- return dirFilter == null || dirFilter.accept(f.getParentFile(), f.getName());
+ return f.isDirectory() && (dirFilter == null || dirFilter.accept(f.getParentFile(), f.getName()));
}
}));
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/repo/ModuleDescriptorWrapper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/repo/ModuleDescriptorWrapper.java b/src/java/org/apache/ivy/osgi/repo/ModuleDescriptorWrapper.java
index 3707647..22bf67e 100644
--- a/src/java/org/apache/ivy/osgi/repo/ModuleDescriptorWrapper.java
+++ b/src/java/org/apache/ivy/osgi/repo/ModuleDescriptorWrapper.java
@@ -85,10 +85,8 @@ public class ModuleDescriptorWrapper {
@Override
public boolean equals(Object obj) {
- if (obj == null || !(obj instanceof ModuleDescriptorWrapper)) {
- return false;
- }
- return bundleInfo.equals(((ModuleDescriptorWrapper) obj).bundleInfo);
+ return !(obj == null || !(obj instanceof ModuleDescriptorWrapper))
+ && bundleInfo.equals(((ModuleDescriptorWrapper) obj).bundleInfo);
}
@Override
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/repo/RelativeURLRepository.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/repo/RelativeURLRepository.java b/src/java/org/apache/ivy/osgi/repo/RelativeURLRepository.java
index 29ab44a..e4b055d 100644
--- a/src/java/org/apache/ivy/osgi/repo/RelativeURLRepository.java
+++ b/src/java/org/apache/ivy/osgi/repo/RelativeURLRepository.java
@@ -52,7 +52,7 @@ public class RelativeURLRepository extends URLRepository {
try {
uri = new URI(source);
} catch (URISyntaxException e) {
- // very wierd URL, let's assume it is absolute
+ // very weird URL, let's assume it is absolute
uri = null;
}
if (uri == null || uri.isAbsolute()) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/repo/RepositoryManifestIterable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/repo/RepositoryManifestIterable.java b/src/java/org/apache/ivy/osgi/repo/RepositoryManifestIterable.java
index b832c09..2c23516 100644
--- a/src/java/org/apache/ivy/osgi/repo/RepositoryManifestIterable.java
+++ b/src/java/org/apache/ivy/osgi/repo/RepositoryManifestIterable.java
@@ -37,7 +37,7 @@ public class RepositoryManifestIterable extends AbstractFSManifestIterable<Strin
/**
* Default constructor
*
- * @param root
+ * @param repo
* the root directory of the file system to lookup
*/
public RepositoryManifestIterable(Repository repo) {
@@ -68,6 +68,6 @@ public class RepositoryManifestIterable extends AbstractFSManifestIterable<Strin
}
private List<String> asList(String[] array) {
- return array == null ? Collections.<String> emptyList() : Arrays.<String> asList(array);
+ return (array == null) ? Collections.<String> emptyList() : Arrays.asList(array);
}
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/updatesite/UpdateSiteResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/updatesite/UpdateSiteResolver.java b/src/java/org/apache/ivy/osgi/updatesite/UpdateSiteResolver.java
index e8bf6d1..f178615 100644
--- a/src/java/org/apache/ivy/osgi/updatesite/UpdateSiteResolver.java
+++ b/src/java/org/apache/ivy/osgi/updatesite/UpdateSiteResolver.java
@@ -70,7 +70,7 @@ public class UpdateSiteResolver extends AbstractOSGiResolver {
options.setTtl(metadataTtl.longValue());
}
if (forceMetadataUpdate != null) {
- options.setForce(forceMetadataUpdate.booleanValue());
+ options.setForce(forceMetadataUpdate);
}
final int log;
if (logLevel != null) {
@@ -127,9 +127,9 @@ public class UpdateSiteResolver extends AbstractOSGiResolver {
} catch (ParseException e) {
throw new RuntimeException("Failed to parse the updatesite (" + e.getMessage() + ")", e);
} catch (SAXException e) {
- throw new RuntimeException("Illformed updatesite (" + e.getMessage() + ")", e);
+ throw new RuntimeException("Ill-formed updatesite (" + e.getMessage() + ")", e);
} catch (URISyntaxException e) {
- throw new RuntimeException("Illformed url (" + e.getMessage() + ")", e);
+ throw new RuntimeException("Ill-formed url (" + e.getMessage() + ")", e);
}
if (repoDescriptor == null) {
setRepoDescriptor(FAILING_REPO_DESCRIPTOR);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/updatesite/xml/EclipseUpdateSiteParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/updatesite/xml/EclipseUpdateSiteParser.java b/src/java/org/apache/ivy/osgi/updatesite/xml/EclipseUpdateSiteParser.java
index 887ed69..eb780df 100644
--- a/src/java/org/apache/ivy/osgi/updatesite/xml/EclipseUpdateSiteParser.java
+++ b/src/java/org/apache/ivy/osgi/updatesite/xml/EclipseUpdateSiteParser.java
@@ -22,7 +22,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
-import java.text.ParseException;
import javax.xml.parsers.ParserConfigurationException;
@@ -63,23 +62,23 @@ public class EclipseUpdateSiteParser {
public SiteHandler() {
super(SITE);
// addChild(new DescriptionHandler(), new ChildElementHandler() {
- // public void childHanlded(DelegetingHandler child) {
+ // public void childHandled(DelegatingHandler child) {
// updateSite.setDescription(child.getBufferedChars().trim());
// }
// });
addChild(new FeatureHandler(), new ChildElementHandler<FeatureHandler>() {
@Override
- public void childHanlded(FeatureHandler child) {
+ public void childHandled(FeatureHandler child) {
updatesite.addFeature(child.feature);
}
});
// addChild(new ArchiveHandler(), new ChildElementHandler() {
- // public void childHanlded(DelegetingHandler child) {
+ // public void childHandled(DelegatingHandler child) {
// updateSite.addArchive(((ArchiveHandler) child).archive);
// }
// });
// addChild(new CategoryDefHandler(), new ChildElementHandler() {
- // public void childHanlded(DelegetingHandler child) {
+ // public void childHandled(DelegatingHandler child) {
// updateSite.addCategoryDef(((CategoryDefHandler) child).categoryDef);
// }
// });
@@ -107,7 +106,7 @@ public class EclipseUpdateSiteParser {
}
String pack200 = atts.getValue(PACK200);
- if (pack200 != null && new Boolean(pack200).booleanValue()) {
+ if (pack200 != null && Boolean.parseBoolean(pack200)) {
updatesite.setPack200(true);
}
@@ -127,7 +126,7 @@ public class EclipseUpdateSiteParser {
}
}
- // private static class DescriptionHandler extends DelegetingHandler {
+ // private static class DescriptionHandler extends DelegatingHandler {
//
// private static final String DESCRIPTION = "description";
//
@@ -173,7 +172,7 @@ public class EclipseUpdateSiteParser {
super(FEATURE);
addChild(new CategoryHandler(), new ChildElementHandler<CategoryHandler>() {
@Override
- public void childHanlded(CategoryHandler child) {
+ public void childHandled(CategoryHandler child) {
feature.addCategory(child.name);
}
});
@@ -183,12 +182,7 @@ public class EclipseUpdateSiteParser {
protected void handleAttributes(Attributes atts) throws SAXException {
String id = atts.getValue(ID);
String version = atts.getValue(VERSION);
- try {
- feature = new EclipseFeature(id, new Version(version));
- } catch (ParseException e) {
- throw new SAXException("Incorrect version on the feature '" + id + "': " + version
- + " (" + e.getMessage() + ")");
- }
+ feature = new EclipseFeature(id, new Version(version));
String url = atts.getValue(URL);
if (url != null) {
@@ -223,7 +217,7 @@ public class EclipseUpdateSiteParser {
}
}
- // private static class ArchiveHandler extends DelegetingHandler {
+ // private static class ArchiveHandler extends DelegatingHandler {
//
// private static final String ARCHIVE = "archive";
//
@@ -249,7 +243,7 @@ public class EclipseUpdateSiteParser {
// }
// }
- // private static class CategoryDefHandler extends DelegetingHandler {
+ // private static class CategoryDefHandler extends DelegatingHandler {
//
// private static final String CATEGORY_DEF = "category-def";
//
@@ -262,7 +256,7 @@ public class EclipseUpdateSiteParser {
// public CategoryDefHandler() {
// super(CATEGORY_DEF);
// addChild(new DescriptionHandler(), new ChildElementHandler<DescriptionHandler>() {
- // public void childHanlded(DescriptionHandler child) {
+ // public void childHandled(DescriptionHandler child) {
// categoryDef.setDescription(child.getBufferedChars().trim());
// }
// });
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/updatesite/xml/FeatureParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/updatesite/xml/FeatureParser.java b/src/java/org/apache/ivy/osgi/updatesite/xml/FeatureParser.java
index 444097a..979de27 100644
--- a/src/java/org/apache/ivy/osgi/updatesite/xml/FeatureParser.java
+++ b/src/java/org/apache/ivy/osgi/updatesite/xml/FeatureParser.java
@@ -19,7 +19,6 @@ package org.apache.ivy.osgi.updatesite.xml;
import java.io.IOException;
import java.io.InputStream;
-import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
@@ -81,38 +80,38 @@ public class FeatureParser {
super(FEATURE);
addChild(new DescriptionHandler(), new ChildElementHandler<DescriptionHandler>() {
@Override
- public void childHanlded(DescriptionHandler child) {
+ public void childHandled(DescriptionHandler child) {
feature.setDescription(child.getBufferedChars().trim());
}
});
addChild(new LicenseHandler(), new ChildElementHandler<LicenseHandler>() {
@Override
- public void childHanlded(LicenseHandler child) {
+ public void childHandled(LicenseHandler child) {
feature.setLicense(child.getBufferedChars().trim());
}
});
addChild(new CopyrightHandler(), new ChildElementHandler<CopyrightHandler>() {
@Override
- public void childHanlded(CopyrightHandler child) {
+ public void childHandled(CopyrightHandler child) {
feature.setCopyright(child.getBufferedChars().trim());
}
});
addChild(new PluginHandler(), new ChildElementHandler<PluginHandler>() {
@Override
- public void childHanlded(PluginHandler child) {
+ public void childHandled(PluginHandler child) {
feature.addPlugin(child.plugin);
}
});
addChild(new RequiresHandler(), new ChildElementHandler<RequiresHandler>() {
@Override
- public void childHanlded(RequiresHandler child) {
+ public void childHandled(RequiresHandler child) {
for (Require require : child.requires) {
feature.addRequire(require);
}
}
});
// addChild(new UrlHandler(), new ChildElementHandler<UrlHandler>() {
- // public void childHanlded(UrlHandler child) {
+ // public void childHandled(UrlHandler child) {
// }
// });
}
@@ -121,12 +120,7 @@ public class FeatureParser {
protected void handleAttributes(Attributes atts) throws SAXException {
String id = atts.getValue(ID);
String version = atts.getValue(VERSION);
- try {
- feature = new EclipseFeature(id, new Version(version));
- } catch (ParseException e) {
- throw new SAXException("Incorrect version on feature '" + id + "': " + version
- + " (" + e.getMessage() + ")");
- }
+ feature = new EclipseFeature(id, new Version(version));
feature.setOS(atts.getValue(OS));
feature.setWS(atts.getValue(WS));
@@ -134,8 +128,8 @@ public class FeatureParser {
feature.setArch(atts.getValue(ARCH));
feature.setApplication(atts.getValue(APPLICATION));
feature.setPlugin(atts.getValue(PLUGIN));
- feature.setExclusive(Boolean.valueOf(atts.getValue(EXCLUSIVE)).booleanValue());
- feature.setPrimary(Boolean.valueOf(atts.getValue(PRIMARY)).booleanValue());
+ feature.setExclusive(Boolean.valueOf(atts.getValue(EXCLUSIVE)));
+ feature.setPrimary(Boolean.valueOf(atts.getValue(PRIMARY)));
feature.setColocationAffinity(atts.getValue(COLOCATION_AFFINITY));
feature.setProviderName(atts.getValue(PROVIDER_NAME));
feature.setLabel(atts.getValue(LABEL));
@@ -172,13 +166,8 @@ public class FeatureParser {
String version = atts.getValue(VERSION);
plugin.setId(id);
- try {
- plugin.setVersion(new Version(version));
- } catch (ParseException e) {
- throw new SAXException("Incorrect version on feature's plugin '" + id + "': "
- + version + " (" + e.getMessage() + ")");
- }
- plugin.setUnpack(Boolean.valueOf(atts.getValue(UNPACK)).booleanValue());
+ plugin.setVersion(new Version(version));
+ plugin.setUnpack(Boolean.valueOf(atts.getValue(UNPACK)));
plugin.setFragment(atts.getValue(FRAGMENT));
plugin.setFilter(atts.getValue(FILTER));
}
@@ -246,7 +235,7 @@ public class FeatureParser {
super(REQUIRES);
addChild(new ImportHandler(), new ChildElementHandler<ImportHandler>() {
@Override
- public void childHanlded(ImportHandler child) {
+ public void childHandled(ImportHandler child) {
requires.add(child.require);
}
});
@@ -281,18 +270,13 @@ public class FeatureParser {
require.setFeature(atts.getValue(FEATURE));
require.setPlugin(atts.getValue(PLUGIN));
- try {
- require.setVersion(new Version(version));
- } catch (ParseException e) {
- throw new SAXException("Incorrect version on feature's import: " + version + " ("
- + e.getMessage() + ")");
- }
+ require.setVersion(new Version(version));
require.setMatch(atts.getValue(MATCH));
require.setFilter(atts.getValue(FILTER));
}
}
- // private static class IncludesHandler extends DelegetingHandler {
+ // private static class IncludesHandler extends DelegatingHandler {
//
// private static final String INCLUDES = "includes";
//
@@ -317,7 +301,7 @@ public class FeatureParser {
//
// }
- // private static class InstallHandlerHandler extends DelegetingHandler {
+ // private static class InstallHandlerHandler extends DelegatingHandler {
//
// private static final String INSTALL_HANDLER = "install-handler";
//
@@ -339,25 +323,25 @@ public class FeatureParser {
//
// }
- // private static class UrlHandler extends DelegetingHandler {
+ // private static class UrlHandler extends DelegatingHandler {
//
// private static final String URL = "url";
//
// public UrlHandler() {
// super(URL);
// addChild(new UpdateHandler(), new ChildElementHandler<UpdateHandler>() {
- // public void childHanlded(UpdateHandler child) {
+ // public void childHandled(UpdateHandler child) {
// }
// });
// addChild(new DiscoveryHandler(), new ChildElementHandler<DiscoveryHandler>() {
- // public void childHanlded(DiscoveryHandler child) {
+ // public void childHandled(DiscoveryHandler child) {
// }
// });
// }
//
// }
- // private static class UpdateHandler extends DelegetingHandler {
+ // private static class UpdateHandler extends DelegatingHandler {
//
// private static final String UPDATE = "update";
//
@@ -376,7 +360,7 @@ public class FeatureParser {
//
// }
- // private static class DiscoveryHandler extends DelegetingHandler {
+ // private static class DiscoveryHandler extends DelegatingHandler {
//
// private static final String DISCOVERY = "discovery";
//
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/updatesite/xml/UpdateSite.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/updatesite/xml/UpdateSite.java b/src/java/org/apache/ivy/osgi/updatesite/xml/UpdateSite.java
index de1f84d..24a0414 100644
--- a/src/java/org/apache/ivy/osgi/updatesite/xml/UpdateSite.java
+++ b/src/java/org/apache/ivy/osgi/updatesite/xml/UpdateSite.java
@@ -25,8 +25,10 @@ public class UpdateSite {
private URI uri;
+ @SuppressWarnings("unused")
private String mirrorsURL;
+ @SuppressWarnings("unused")
private boolean pack200;
private URI digestUri;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/updatesite/xml/UpdateSiteDigestParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/updatesite/xml/UpdateSiteDigestParser.java b/src/java/org/apache/ivy/osgi/updatesite/xml/UpdateSiteDigestParser.java
index 16fa169..6f2d90c 100644
--- a/src/java/org/apache/ivy/osgi/updatesite/xml/UpdateSiteDigestParser.java
+++ b/src/java/org/apache/ivy/osgi/updatesite/xml/UpdateSiteDigestParser.java
@@ -54,7 +54,7 @@ public class UpdateSiteDigestParser {
ExecutionEnvironmentProfileProvider.getInstance());
addChild(new FeatureHandler(), new ChildElementHandler<FeatureHandler>() {
@Override
- public void childHanlded(FeatureHandler child) {
+ public void childHandled(FeatureHandler child) {
repoDescriptor.addFeature(child.feature);
}
});
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java b/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
index 5434d8a..bebdc1f 100644
--- a/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
+++ b/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
@@ -267,7 +267,7 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
if (childHandler != null) {
skipOnError(new SkipOnErrorCallback() {
public void call() throws SAXException {
- childHandler._childHanlded(savedDelegate);
+ childHandler._childHandled(savedDelegate);
}
});
}
@@ -292,12 +292,12 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
public static abstract class ChildElementHandler<DH extends DelegatingHandler> {
- public abstract void childHanlded(DH child) throws SAXParseException;
+ public abstract void childHandled(DH child) throws SAXParseException;
// because we know what we're doing
@SuppressWarnings("unchecked")
- private void _childHanlded(DelegatingHandler delegate) throws SAXParseException {
- childHanlded((DH) delegate);
+ private void _childHandled(DelegatingHandler delegate) throws SAXParseException {
+ childHandled((DH) delegate);
}
}
@@ -539,6 +539,7 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
return "[line " + locator.getLineNumber() + " col. " + locator.getColumnNumber() + "] ";
}
+ @SuppressWarnings("unused")
private void skipOnError(DelegatingHandler currentHandler,
Class<? extends DelegatingHandler> handlerClassToSkip, String message) {
DelegatingHandler handlerToSkip = currentHandler;
@@ -628,7 +629,7 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
if (value == null) {
return defaultValue;
}
- return Boolean.valueOf(parseBoolean(name, value));
+ return parseBoolean(name, value);
}
static final String TRUE = Boolean.TRUE.toString().toLowerCase(Locale.US);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/util/Version.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/util/Version.java b/src/java/org/apache/ivy/osgi/util/Version.java
index 4db670e..9a5f868 100644
--- a/src/java/org/apache/ivy/osgi/util/Version.java
+++ b/src/java/org/apache/ivy/osgi/util/Version.java
@@ -36,17 +36,17 @@ public class Version implements Comparable<Version> {
private String input;
- private boolean splitted = false;
+ private volatile boolean split = false;
- private boolean toString = false;
+ private volatile boolean toString = false;
- public Version(String versionStr, String qualifier) throws ParseException {
+ public Version(String versionStr, String qualifier) {
this(qualifier == null ? versionStr : (versionStr + "." + qualifier));
}
- public Version(String versionStr) throws ParseException {
+ public Version(String versionStr) {
this.input = versionStr;
- splitted = false;
+ split = false;
toString = false;
}
@@ -55,7 +55,7 @@ public class Version implements Comparable<Version> {
this.minor = minor;
this.patch = patch;
this.qualifier = qualifier;
- splitted = true;
+ split = true;
toString = false;
}
@@ -63,7 +63,9 @@ public class Version implements Comparable<Version> {
* Build a version from another one while appending an extra qualifier
*
* @param baseVersion
- * @param qualifier
+ * Version
+ * @param extraQualifier
+ * String
*/
public Version(Version baseVersion, String extraQualifier) {
this.major = baseVersion.major;
@@ -71,19 +73,19 @@ public class Version implements Comparable<Version> {
this.patch = baseVersion.patch;
this.qualifier = baseVersion.qualifier == null ? extraQualifier
: (baseVersion.qualifier + extraQualifier);
- splitted = true;
+ split = true;
toString = false;
}
- private void ensureSplitted() {
- if (!splitted) {
+ private void ensureSplit() {
+ if (!split) {
synchronized (this) {
- if (splitted) {
+ if (split) {
return;
}
String[] splits = input.split("\\.");
if (splits == null || splits.length == 0 || splits.length > 4) {
- throw new RuntimeException(new ParseException("Ill formed OSGi version", 0));
+ throw new RuntimeException(new ParseException("Ill-formed OSGi version", 0));
}
try {
major = Integer.parseInt(splits[0]);
@@ -104,7 +106,7 @@ public class Version implements Comparable<Version> {
"Patch part of an OSGi version should be an integer", 0));
}
qualifier = splits.length == 4 ? splits[3] : null;
- splitted = true;
+ split = true;
}
}
}
@@ -115,7 +117,7 @@ public class Version implements Comparable<Version> {
if (toString) {
return;
}
- ensureSplitted();
+ ensureSplit();
version = major + "." + minor + "." + patch
+ (qualifier == null ? "" : "." + qualifier);
toString = true;
@@ -129,7 +131,7 @@ public class Version implements Comparable<Version> {
}
public int hashCode() {
- ensureSplitted();
+ ensureSplit();
final int prime = 31;
int result = 1;
result = prime * result + major;
@@ -150,8 +152,8 @@ public class Version implements Comparable<Version> {
return false;
}
Version other = (Version) obj;
- ensureSplitted();
- other.ensureSplitted();
+ ensureSplit();
+ other.ensureSplit();
if (major != other.major) {
return false;
}
@@ -172,23 +174,23 @@ public class Version implements Comparable<Version> {
}
public Version withNudgedPatch() {
- ensureSplitted();
+ ensureSplit();
return new Version(major, minor, patch + 1, null);
}
public Version withoutQualifier() {
- ensureSplitted();
+ ensureSplit();
return new Version(major, minor, patch, null);
}
public String qualifier() {
- ensureSplitted();
+ ensureSplit();
return qualifier == null ? "" : qualifier;
}
public int compareUnqualified(Version other) {
- ensureSplitted();
- other.ensureSplitted();
+ ensureSplit();
+ other.ensureSplit();
int diff = major - other.major;
if (diff != 0) {
return diff;
@@ -205,8 +207,8 @@ public class Version implements Comparable<Version> {
}
public int compareTo(Version other) {
- ensureSplitted();
- other.ensureSplitted();
+ ensureSplit();
+ other.ensureSplit();
int diff = compareUnqualified(other);
if (diff != 0) {
return diff;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/util/VersionRange.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/util/VersionRange.java b/src/java/org/apache/ivy/osgi/util/VersionRange.java
index 575ff0a..b477145 100644
--- a/src/java/org/apache/ivy/osgi/util/VersionRange.java
+++ b/src/java/org/apache/ivy/osgi/util/VersionRange.java
@@ -68,8 +68,8 @@ public class VersionRange {
/**
* Default constructor
*
- * @param header
- * the header to parse
+ * @param version
+ * the version to parse
*/
VersionRangeParser(String version) {
this.version = version;
@@ -149,7 +149,7 @@ public class VersionRange {
}
Integer minor = new Integer(0);
Integer patch = new Integer(0);
- String qualififer = null;
+ String qualifier = null;
if (parseNumberSeparator()) {
minor = parseNumber();
if (minor == null) {
@@ -159,11 +159,11 @@ public class VersionRange {
if (patch == null) {
patch = new Integer(0);
} else if (parseNumberSeparator()) {
- qualififer = parseQualifier();
+ qualifier = parseQualifier();
}
}
}
- return new Version(major.intValue(), minor.intValue(), patch.intValue(), qualififer);
+ return new Version(major.intValue(), minor.intValue(), patch.intValue(), qualifier);
}
private Integer parseNumber() {
@@ -243,7 +243,7 @@ public class VersionRange {
break;
default:
unread();
- throw new ParseException("Expexting ] or )", pos);
+ throw new ParseException("Expecting ] or )", pos);
}
}
}
@@ -311,18 +311,8 @@ public class VersionRange {
}
public boolean contains(Version version) {
- if (startExclusive ? version.compareUnqualified(startVersion) <= 0 : version
- .compareUnqualified(startVersion) < 0) {
- return false;
- }
- if (endVersion == null) {
- return true;
- }
- if (endExclusive ? version.compareUnqualified(endVersion) >= 0 : version
- .compareUnqualified(endVersion) > 0) {
- return false;
- }
- return true;
+ return (startExclusive ? version.compareUnqualified(startVersion) > 0 : version.compareUnqualified(startVersion) >= 0)
+ && (endVersion == null || (endExclusive ? version.compareUnqualified(endVersion) < 0 : version.compareUnqualified(endVersion) <= 0));
}
public int hashCode() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/circular/CircularDependencyException.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/circular/CircularDependencyException.java b/src/java/org/apache/ivy/plugins/circular/CircularDependencyException.java
index 0b37dfd..438c572 100644
--- a/src/java/org/apache/ivy/plugins/circular/CircularDependencyException.java
+++ b/src/java/org/apache/ivy/plugins/circular/CircularDependencyException.java
@@ -23,12 +23,13 @@ import org.apache.ivy.core.module.id.ModuleRevisionId;
* Unchecked exception thrown when a circular dependency exists between projects.
*/
+@SuppressWarnings("serial")
public class CircularDependencyException extends RuntimeException {
private ModuleRevisionId[] mrids;
/**
- * @param descriptors
+ * @param mrids
* module descriptors in order of circular dependency
*/
public CircularDependencyException(final ModuleRevisionId[] mrids) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/circular/CircularDependencyHelper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/circular/CircularDependencyHelper.java b/src/java/org/apache/ivy/plugins/circular/CircularDependencyHelper.java
index 59d5595..69dbdba 100644
--- a/src/java/org/apache/ivy/plugins/circular/CircularDependencyHelper.java
+++ b/src/java/org/apache/ivy/plugins/circular/CircularDependencyHelper.java
@@ -35,7 +35,7 @@ public final class CircularDependencyHelper {
/**
* Returns a string representation of this circular dependency graph
*
- * @param descriptors
+ * @param mrids
* in order of circular dependency
* @return a string representation of this circular dependency graph
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/circular/CircularDependencyStrategy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/circular/CircularDependencyStrategy.java b/src/java/org/apache/ivy/plugins/circular/CircularDependencyStrategy.java
index f1ae506..1a84a98 100644
--- a/src/java/org/apache/ivy/plugins/circular/CircularDependencyStrategy.java
+++ b/src/java/org/apache/ivy/plugins/circular/CircularDependencyStrategy.java
@@ -21,7 +21,7 @@ import org.apache.ivy.core.module.id.ModuleRevisionId;
/**
* A CircularDependencyStrategy indicates what ivy does when a circular dependency is detected. Ivy
- * can ignore it, warn the user, or interupt the processing.
+ * can ignore it, warn the user, or interrupt the processing.
*/
public interface CircularDependencyStrategy {
String getName();
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManager.java b/src/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManager.java
index a9e4c99..4501e72 100644
--- a/src/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManager.java
+++ b/src/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManager.java
@@ -177,7 +177,7 @@ public class LatestCompatibleConflictManager extends LatestConflictManager {
return false;
}
} catch (NoConflictResolvedYetException ex) {
- // we have not enough informations in the nodes to resolve conflict
+ // we have not enough information in the nodes to resolve conflict
// according to the resolveConflicts contract, resolveConflicts must return null
return false;
}
@@ -247,8 +247,8 @@ public class LatestCompatibleConflictManager extends LatestConflictManager {
* the node in favor of which the conflict is resolved
* @param evictedNode
* the node which will be evicted if we are able to blacklist all paths
- * @param node
- * the node for which callers should be considered
+ * @param callerStack
+ * ditto
* @return the collection of blacklisting to do, null if a blacklist is not possible in at least
* one caller path
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/conflict/LatestConflictManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/conflict/LatestConflictManager.java b/src/java/org/apache/ivy/plugins/conflict/LatestConflictManager.java
index 9cccb59..541648e 100644
--- a/src/java/org/apache/ivy/plugins/conflict/LatestConflictManager.java
+++ b/src/java/org/apache/ivy/plugins/conflict/LatestConflictManager.java
@@ -30,6 +30,7 @@ import org.apache.ivy.plugins.latest.LatestStrategy;
import org.apache.ivy.util.Message;
public class LatestConflictManager extends AbstractConflictManager {
+ @SuppressWarnings("serial")
public static class NoConflictResolvedYetException extends RuntimeException {
}
@@ -44,7 +45,7 @@ public class LatestConflictManager extends AbstractConflictManager {
long lastModified = node.getLastModified();
if (lastModified == 0) {
// if the last modified timestamp is unknown, we can't resolve
- // the conflicts now, and trigger an exception which will be catched
+ // the conflicts now, and trigger an exception which will be caught
// in the main resolveConflicts method
throw new NoConflictResolvedYetException();
} else {
@@ -118,7 +119,7 @@ public class LatestConflictManager extends AbstractConflictManager {
return conflicts;
}
} catch (NoConflictResolvedYetException ex) {
- // we have not enough informations in the nodes to resolve conflict
+ // we have not enough information in the nodes to resolve conflict
// according to the resolveConflicts contract, we must return null
return null;
}
@@ -150,7 +151,7 @@ public class LatestConflictManager extends AbstractConflictManager {
/**
* To conform to configurator API
*
- * @param latestStrategy
+ * @param strategyName ditto
*/
public void setLatest(String strategyName) {
this.strategyName = strategyName;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/conflict/RegexpConflictManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/conflict/RegexpConflictManager.java b/src/java/org/apache/ivy/plugins/conflict/RegexpConflictManager.java
index 3dec168..3312e45 100644
--- a/src/java/org/apache/ivy/plugins/conflict/RegexpConflictManager.java
+++ b/src/java/org/apache/ivy/plugins/conflict/RegexpConflictManager.java
@@ -41,7 +41,7 @@ import org.apache.ivy.util.Message;
*
* The regular expression must contain a capturing group. The group will be used to resolve the
* conflicts by an String.equals() test. If ignoreNonMatching is false non matching modules will
- * result in an exception. If it is true they will be compaired by their full revision.
+ * result in an exception. If it is true they will be compared by their full revision.
*/
public class RegexpConflictManager extends AbstractConflictManager {
private Pattern pattern = Pattern.compile("(.*)");
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/conflict/StrictConflictException.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/conflict/StrictConflictException.java b/src/java/org/apache/ivy/plugins/conflict/StrictConflictException.java
index b2e0441..a0099a9 100644
--- a/src/java/org/apache/ivy/plugins/conflict/StrictConflictException.java
+++ b/src/java/org/apache/ivy/plugins/conflict/StrictConflictException.java
@@ -22,6 +22,7 @@ import java.util.Arrays;
import org.apache.ivy.core.resolve.IvyNode;
import org.apache.ivy.core.resolve.ResolveProcessException;
+@SuppressWarnings("serial")
public class StrictConflictException extends ResolveProcessException {
public StrictConflictException() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/latest/LatestStrategy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/latest/LatestStrategy.java b/src/java/org/apache/ivy/plugins/latest/LatestStrategy.java
index b9ceb99..8cebce5 100644
--- a/src/java/org/apache/ivy/plugins/latest/LatestStrategy.java
+++ b/src/java/org/apache/ivy/plugins/latest/LatestStrategy.java
@@ -26,8 +26,8 @@ public interface LatestStrategy {
* on the strategy itself. Given artifacts info are all good candidate. If the given date is not
* null, then found artifact should not be later than this date.
*
- * @param infos
- * @param date
+ * @param infos ArtifactInfo[]
+ * @param date Date
* @return the latest artifact among the given ones.
*/
ArtifactInfo findLatest(ArtifactInfo[] infos, Date date);
@@ -36,8 +36,8 @@ public interface LatestStrategy {
* Sorts the given artifacts info from the oldest one to the latest one. The definition of
* 'latest' depends on the strategy itself. Given artifacts info are all good candidate.
*
- * @param infos
- * @return
+ * @param infos ArtifactInfo[]
+ * @return List<ArtifactInfo>
*/
List<ArtifactInfo> sort(ArtifactInfo[] infos);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java b/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java
index 637988f..8fa2643 100644
--- a/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java
+++ b/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java
@@ -310,6 +310,7 @@ public abstract class FileBasedLockStrategy extends AbstractLockStrategy {
}
}
+ @SuppressWarnings("resource")
public boolean tryLock(File file) {
try {
if (file.getParentFile().exists() || file.getParentFile().mkdirs()) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java b/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java
index 5afc5a2..96a8d3a 100644
--- a/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java
+++ b/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java
@@ -34,8 +34,7 @@ import org.apache.oro.text.regex.Perl5Matcher;
* <b> Note that this matcher is available only with <a href="http://jakarta.apache.org/oro"Apache
* Jakarta Oro 2.0.8</a> in your classpath.</b>
*
- * @see <a
- * href="http://jakarta.apache.org/oro/api/org/apache/oro/text/GlobCompiler.html">GlobCompiler</a>
+ * @see <a href="http://jakarta.apache.org/oro/api/org/apache/oro/text/GlobCompiler.html">GlobCompiler</a>
*/
public/* @Immutable */final class GlobPatternMatcher extends AbstractPatternMatcher {
@@ -83,7 +82,7 @@ public/* @Immutable */final class GlobPatternMatcher extends AbstractPatternMatc
if (exact == null) {
exact = calculateExact();
}
- return exact.booleanValue();
+ return exact;
}
private Boolean calculateExact() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/matcher/RegexpPatternMatcher.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/matcher/RegexpPatternMatcher.java b/src/java/org/apache/ivy/plugins/matcher/RegexpPatternMatcher.java
index 5be28f6..aa97974 100644
--- a/src/java/org/apache/ivy/plugins/matcher/RegexpPatternMatcher.java
+++ b/src/java/org/apache/ivy/plugins/matcher/RegexpPatternMatcher.java
@@ -69,7 +69,7 @@ public final/* @Immutable */class RegexpPatternMatcher extends AbstractPatternMa
if (exact == null) {
exact = calculateExact();
}
- return exact.booleanValue();
+ return exact;
}
private Boolean calculateExact() {
[07/15] ant-ivy git commit: Make Java 8 doclint happy;
adjust javadoc Ant target; remove connection to svn from build.xml
Posted by jh...@apache.org.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java b/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
index bebdc1f..16fb967 100644
--- a/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
+++ b/src/java/org/apache/ivy/osgi/util/DelegatingHandler.java
@@ -107,7 +107,7 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
/**
* Return an sort of identifier of the current element being parsed. It will only be used for
* logging purpose.
- *
+ *
* @return an empty string by default
*/
protected String getCurrentElementIdentifier() {
@@ -160,10 +160,11 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * @throws SAXException
+ * By default do nothing.
+ *
+ * @throws SAXException API told me so
*/
protected void doStartDocument() throws SAXException {
- // by default do nothing
}
@Override
@@ -179,10 +180,11 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * @throws SAXException
+ * By default do nothing.
+ *
+ * @throws SAXException API told me so
*/
protected void doEndDocument() throws SAXException {
- // by default do nothing
}
@Override
@@ -231,23 +233,27 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * Called when the expected node is achieved
- *
+ * Called when the expected node is achieved; nothing to do by default.
+ *
* @param atts
* the xml attributes attached to the expected node
* @exception SAXException
* in case the parsing should be completely stopped
*/
protected void handleAttributes(Attributes atts) throws SAXException {
- // nothing to do by default
}
/**
- * @throws SAXException
+ * By default do nothing.
+ *
+ * @param uri String
+ * @param localName String
+ * @param name String
+ * @param atts Attributes
+ * @throws SAXException API told me so
*/
protected void doStartElement(String uri, String localName, String name, Attributes atts)
throws SAXException {
- // by default do nothing
}
@Override
@@ -284,10 +290,14 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * @throws SAXException
+ * By default do nothing.
+ *
+ * @param uri String
+ * @param localName String
+ * @param name String
+ * @throws SAXException API told me so
*/
protected void doEndElement(String uri, String localName, String name) throws SAXException {
- // by default do nothing
}
public static abstract class ChildElementHandler<DH extends DelegatingHandler> {
@@ -315,7 +325,10 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * @throws SAXException
+ * @param ch char[]
+ * @param start int
+ * @param length int
+ * @throws SAXException if something goes wrong
*/
protected void doCharacters(char[] ch, int start, int length) throws SAXException {
if (bufferingChar) {
@@ -336,10 +349,13 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * @throws SAXException
+ * By default do nothing.
+ *
+ * @param prefix String
+ * @param uri String
+ * @throws SAXException API told me so
*/
protected void doStartPrefixMapping(String prefix, String uri) throws SAXException {
- // by default do nothing
}
@Override
@@ -355,10 +371,12 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * @throws SAXException
+ * By default do nothing.
+ *
+ * @param prefix String
+ * @throws SAXException API told me so
*/
protected void doEndPrefixMapping(String prefix) throws SAXException {
- // by default do nothing
}
@Override
@@ -374,10 +392,14 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * @throws SAXException
+ * By default do nothing
+ *
+ * @param ch char[]
+ * @param start int
+ * @param length int
+ * @throws SAXException API told me so
*/
protected void doIgnorableWhitespace(char[] ch, int start, int length) throws SAXException {
- // by default do nothing
}
@Override
@@ -394,11 +416,15 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * @throws SAXException
+ * By default do nothing.
+ *
+ * @param name String
+ * @param publicId String
+ * @param systemId String
+ * @throws SAXException API told me so
*/
protected void doNotationDecl(String name, String publicId, String systemId)
throws SAXException {
- // by default do nothing
}
@Override
@@ -414,10 +440,13 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * @throws SAXException
+ * By default do nothing
+ *
+ * @param target String
+ * @param data String
+ * @throws SAXException API told me so
*/
protected void doProcessingInstruction(String target, String data) throws SAXException {
- // by default do nothing
}
@Override
@@ -433,10 +462,12 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * @throws SAXException
+ * By default do nothing.
+ *
+ * @param name String
+ * @throws SAXException API told me so
*/
protected void doSkippedEntity(String name) throws SAXException {
- // by default do nothing
}
@Override
@@ -453,11 +484,16 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * @throws SAXException
+ * By default do nothing.
+ *
+ * @param name String
+ * @param publicId String
+ * @param systemId String
+ * @param notationName String
+ * @throws SAXException API told me so
*/
protected void doUnparsedEntityDecl(String name, String publicId, String systemId,
String notationName) throws SAXException {
- // by default do nothing
}
// ERROR HANDLING
@@ -475,10 +511,12 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * @throws SAXException
+ * By default do nothing.
+ *
+ * @param exception SAXParseException
+ * @throws SAXException API told me so
*/
protected void doWarning(SAXParseException exception) throws SAXException {
- // by default do nothing
}
@Override
@@ -494,10 +532,12 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * @throws SAXException
+ * By default do nothing.
+ *
+ * @param exception SAXParseException
+ * @throws SAXException API told me so
*/
protected void doError(SAXParseException exception) throws SAXException {
- // by default do nothing
}
@Override
@@ -513,10 +553,12 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
}
/**
- * @throws SAXException
+ * By default do nothing.
+ *
+ * @param exception SAXParseException
+ * @throws SAXException API told me so
*/
protected void doFatalError(SAXParseException exception) throws SAXException {
- // by default do nothing
}
// //////////////////////
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/circular/CircularDependencyHelper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/circular/CircularDependencyHelper.java b/src/java/org/apache/ivy/plugins/circular/CircularDependencyHelper.java
index 69dbdba..123dd96 100644
--- a/src/java/org/apache/ivy/plugins/circular/CircularDependencyHelper.java
+++ b/src/java/org/apache/ivy/plugins/circular/CircularDependencyHelper.java
@@ -34,7 +34,7 @@ public final class CircularDependencyHelper {
/**
* Returns a string representation of this circular dependency graph
- *
+ *
* @param mrids
* in order of circular dependency
* @return a string representation of this circular dependency graph
@@ -62,7 +62,8 @@ public final class CircularDependencyHelper {
/**
* @param loopElements
- * a List<ModuleDescriptor>
+ * a List<ModuleDescriptor>
+ * @return String
*/
public static String formatMessageFromDescriptors(List loopElements) {
ModuleRevisionId[] mrids = new ModuleRevisionId[loopElements.size()];
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManager.java b/src/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManager.java
index 4501e72..e7b0ff6 100644
--- a/src/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManager.java
+++ b/src/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManager.java
@@ -46,17 +46,17 @@ import org.apache.ivy.util.Message;
* set of compatible dependencies, even if it requires stepping back to older revisions (as long as
* they are in the set of compatibility).
* <p>
- * Here is an example of what this conflict manager is able to do:<br/>
+ * Here is an example of what this conflict manager is able to do:
+ * </p>
* <b>Available Modules</b>:
- *
* <pre>
* #A;2->{ #B;[1.0,1.5] #C;[2.0,2.5] }
* #B;1.4->#D;1.5
* #B;1.5->#D;2.0
* #C;2.5->#D;[1.0,1.6]
* </pre>
- *
- * <b>Result</b>: #B;1.4, #C;2.5, #D;1.5<br/>
+ * <b>Result</b>: #B;1.4, #C;2.5, #D;1.5
+ * <p>
* <b>Details</b>The conflict manager finds that the latest matching version of #B (1.5) depends on
* a version of #D incompatible with what is expected by the latest matching version of #C. Hence
* the conflict manager blacklists #B;1.5, and the version range [1.0,1.5] is resolved again to end
@@ -126,7 +126,7 @@ public class LatestCompatibleConflictManager extends LatestConflictManager {
* Handles an incompatible conflict
* <p>
* An incompatible conflicts is handled with this pseudo algorithm:
- *
+ *
* <pre>
* take latest among two nodes in conflict
* for all callers
@@ -139,9 +139,9 @@ public class LatestCompatibleConflictManager extends LatestConflictManager {
* else
* throw strict conflict exception
* </pre>
- *
+ *
* </p>
- *
+ *
* @param parent
* the parent node of nodes in conflict
* @param conflicts
@@ -238,7 +238,7 @@ public class LatestCompatibleConflictManager extends LatestConflictManager {
/**
* Tries to blacklist exactly one version for all callers paths.
- *
+ *
* @param versionMatcher
* the version matcher to use to interpret versions
* @param conflictParent
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/latest/WorkspaceLatestStrategy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/latest/WorkspaceLatestStrategy.java b/src/java/org/apache/ivy/plugins/latest/WorkspaceLatestStrategy.java
index 64ef7ec..97ab192 100644
--- a/src/java/org/apache/ivy/plugins/latest/WorkspaceLatestStrategy.java
+++ b/src/java/org/apache/ivy/plugins/latest/WorkspaceLatestStrategy.java
@@ -22,8 +22,8 @@ import java.util.List;
/**
* A strategy which delegate to another strategy, unless for the latest and working revisions which
- * are considered as superior to any other revision. < br/>
- * NB : it is for internal usage of Ivy only!
+ * are considered as superior to any other revision.
+ * <p>NB : it is for internal usage of Ivy only!</p>
*/
public class WorkspaceLatestStrategy extends AbstractLatestStrategy {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java b/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java
index 8fa2643..142898c 100644
--- a/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java
+++ b/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java
@@ -139,12 +139,12 @@ public abstract class FileBasedLockStrategy extends AbstractLockStrategy {
/**
* Determine the state of the lockfile.
- *
+ *
* Must be called from within a synchronized block.
- *
+ *
* Three possibilities exist: - The lock is held by the current thread (>0) - The lock is held
* by one or more different threads (-1) - The lock is not held at all (0).
- *
+ *
* @param file
* file to lock
* @param forThread
@@ -169,10 +169,10 @@ public abstract class FileBasedLockStrategy extends AbstractLockStrategy {
/**
* Record that this thread holds the lock.
- *
+ *
* Asserts that the lock has been previously grabbed by this thread. Must be called from a
* synchronized block in which the lock was grabbed.
- *
+ *
* @param file
* file which has been locked
* @param forThread
@@ -193,11 +193,11 @@ public abstract class FileBasedLockStrategy extends AbstractLockStrategy {
/**
* Decrease depth of this thread's lock.
- *
+ *
* Must be called within a synchronized block.
- *
+ *
* If this returns 0, the caller is responsible for releasing the lock within that same block.
- *
+ *
* @param file
* file for which lock depth is being decreased
* @param forThread
@@ -225,6 +225,9 @@ public abstract class FileBasedLockStrategy extends AbstractLockStrategy {
/**
* Return a string naming the threads which currently hold this lock.
+ *
+ * @param file File
+ * @return String
*/
protected String getCurrentLockHolderNames(File file) {
StringBuilder sb = new StringBuilder();
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/lock/LockStrategy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/lock/LockStrategy.java b/src/java/org/apache/ivy/plugins/lock/LockStrategy.java
index a28d6f8..31a0fb8 100644
--- a/src/java/org/apache/ivy/plugins/lock/LockStrategy.java
+++ b/src/java/org/apache/ivy/plugins/lock/LockStrategy.java
@@ -28,10 +28,11 @@ import org.apache.ivy.core.module.descriptor.Artifact;
* Note that some implementations may actually choose to NOT perform locking, when no lock is
* necessary (cache not shared). Some other implementations may choose to lock the cache for the
* download of a whole module (not possible yet), or at the artifact level.
- * <p>
* </p>
+ * <p>
* The lock methods should return true when the lock is either actually acquired or not performed by
- * the strategy. </p>
+ * the strategy.
+ * </p>
* <p>
* Locking used in the locking strategy must support reentrant lock. Reentrant locking should be
* performed for the whole strategy.
@@ -41,14 +42,14 @@ public interface LockStrategy {
/**
* Returns the name of the strategy
- *
+ *
* @return the name of the strategy
*/
String getName();
/**
* Performs a lock before downloading the given {@link Artifact} to the given file.
- *
+ *
* @param artifact
* the artifact about to be downloaded
* @param artifactFileToDownload
@@ -62,7 +63,7 @@ public interface LockStrategy {
/**
* Release the lock acquired for an artifact download.
- *
+ *
* @param artifact
* the artifact for which the lock was acquired
* @param artifactFileToDownload
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcher.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcher.java b/src/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcher.java
index 68e2f74..0e45c14 100644
--- a/src/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcher.java
+++ b/src/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcher.java
@@ -20,11 +20,12 @@ package org.apache.ivy.plugins.matcher;
/**
* A pattern matcher that tries to match exactly the input with the expression, or match it as a
* pattern.
- * <p/>
+ * <p>
* The evaluation for matching is perform first by checking if expression and input are equals (via
* equals method) else it attempts to do it by trying to match the input using the expression as a
* regexp.
- *
+ * </p>
+ *
* @see ExactPatternMatcher
* @see RegexpPatternMatcher
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/matcher/ExactPatternMatcher.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/matcher/ExactPatternMatcher.java b/src/java/org/apache/ivy/plugins/matcher/ExactPatternMatcher.java
index 0613e38..c29eff7 100644
--- a/src/java/org/apache/ivy/plugins/matcher/ExactPatternMatcher.java
+++ b/src/java/org/apache/ivy/plugins/matcher/ExactPatternMatcher.java
@@ -19,9 +19,10 @@ package org.apache.ivy.plugins.matcher;
/**
* Implementation of an exact matcher.
- * <p/>
+ * <p>
* The matching will be performed against an expression being a string. It will only matches if both
* strings are equal (per equals()) rule or if both strings are null.
+ * </p>
*/
public/* @Immutable */final class ExactPatternMatcher extends AbstractPatternMatcher {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java b/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java
index 96a8d3a..9e9b22a 100644
--- a/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java
+++ b/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java
@@ -30,10 +30,12 @@ import org.apache.oro.text.regex.Perl5Matcher;
* <li>* - Matches zero or more characters</li>
* <li>? - Matches exactly one character.</li>
* </ul>
- * <p/>
- * <b> Note that this matcher is available only with <a href="http://jakarta.apache.org/oro"Apache
- * Jakarta Oro 2.0.8</a> in your classpath.</b>
- *
+ * <p>
+ * NOTE: this matcher is available only with
+ * <a href="http://jakarta.apache.org/oro">Apache Jakarta Oro 2.0.8</a>
+ * in your classpath.
+ * </p>
+ *
* @see <a href="http://jakarta.apache.org/oro/api/org/apache/oro/text/GlobCompiler.html">GlobCompiler</a>
*/
public/* @Immutable */final class GlobPatternMatcher extends AbstractPatternMatcher {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/matcher/PatternMatcher.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/matcher/PatternMatcher.java b/src/java/org/apache/ivy/plugins/matcher/PatternMatcher.java
index 27b35eb..16b5145 100644
--- a/src/java/org/apache/ivy/plugins/matcher/PatternMatcher.java
+++ b/src/java/org/apache/ivy/plugins/matcher/PatternMatcher.java
@@ -19,9 +19,10 @@ package org.apache.ivy.plugins.matcher;
/**
* Interface for a pattern matcher.
- * <p/>
+ * <p>
* The pattern matcher is the main abstraction regarding the matching of an expression.
* Implementation may vary depending on the expression syntax handling that is desired.
+ * </p>
*/
public interface PatternMatcher {
@@ -52,7 +53,7 @@ public interface PatternMatcher {
/**
* Return the matcher for the given expression.
- *
+ *
* @param expression
* the expression to be matched. Cannot be null ?
* @return the matcher instance for the given expression. Never null.
@@ -61,7 +62,7 @@ public interface PatternMatcher {
/**
* return the name of this pattern matcher
- *
+ *
* @return the name of this pattern matcher. Never null.
* @see #EXACT
* @see #REGEXP
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/parser/ModuleDescriptorParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/ModuleDescriptorParser.java b/src/java/org/apache/ivy/plugins/parser/ModuleDescriptorParser.java
index 0971f33..cfd3636 100644
--- a/src/java/org/apache/ivy/plugins/parser/ModuleDescriptorParser.java
+++ b/src/java/org/apache/ivy/plugins/parser/ModuleDescriptorParser.java
@@ -39,8 +39,12 @@ public interface ModuleDescriptorParser {
* Convert a module descriptor to an ivy file. This method MUST close the given input stream
* when job is finished
*
- * @param is
- * input stream with opened on original module descriptor resource
+ * @param is input stream with opened on original module descriptor resource
+ * @param res Resource
+ * @param destFile File
+ * @param md ModuleDescriptor
+ * @throws ParseException if something goes wrong
+ * @throws IOException if something goes wrong
*/
public void toIvyFile(InputStream is, Resource res, File destFile, ModuleDescriptor md)
throws ParseException, IOException;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/parser/ParserSettings.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/ParserSettings.java b/src/java/org/apache/ivy/plugins/parser/ParserSettings.java
index 662736c..8294547 100644
--- a/src/java/org/apache/ivy/plugins/parser/ParserSettings.java
+++ b/src/java/org/apache/ivy/plugins/parser/ParserSettings.java
@@ -55,7 +55,7 @@ public interface ParserSettings {
String getDefaultBranch(ModuleId moduleId);
/**
- * Returns the namespace context in which the current descriptor is parsed.
+ * @return the namespace context in which the current descriptor is parsed.
*/
Namespace getContextNamespace();
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
index 9bb6433..ced6e55 100644
--- a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
+++ b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
@@ -59,11 +59,13 @@ import org.xml.sax.SAXException;
/**
* A parser for Maven 2 POM.
* <p>
- * The configurations used in the generated module descriptor mimics the behavior defined by maven 2
- * scopes, as documented here:<br/>
- * http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html The
- * PomModuleDescriptorParser use a PomDomReader to read the pom, and the PomModuleDescriptorBuilder
- * to write the ivy module descriptor using the info read by the PomDomReader.
+ * The configurations used in the generated module descriptor mimics the behavior defined by Maven 2
+ * scopes, as documented
+ * <a href="http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html">here</a>.
+ * The PomModuleDescriptorParser use a PomDomReader to read the pom, and the
+ * PomModuleDescriptorBuilder to write the ivy module descriptor using the info read by the
+ * PomDomReader.
+ * </p>
*/
public final class PomModuleDescriptorParser implements ModuleDescriptorParser {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java b/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java
index b9e8201..93d128b 100644
--- a/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java
+++ b/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java
@@ -156,6 +156,9 @@ public class PomReader {
* Add a property if not yet set and value is not null. This guarantees
* that property keeps the first value that is put on it and that the
* properties are never null.
+ *
+ * @param prop String
+ * @param val String
*/
public void setProperty(String prop, String val) {
if (!properties.containsKey(prop) && val != null) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
index a272d65..0dcdb8a 100644
--- a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
+++ b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
@@ -107,8 +107,8 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
* the real resource to parse, used for log only
* @param validate boolean
* @return ModuleDescriptor
- * @throws ParseException
- * @throws IOException
+ * @throws ParseException if something goes wrong
+ * @throws IOException if something goes wrong
*/
public ModuleDescriptor parseDescriptor(ParserSettings ivySettings, URL xmlURL, Resource res,
boolean validate) throws ParseException, IOException {
@@ -136,7 +136,7 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
* <p>
* Override this method if you want to use a custom Parser.
* </p>
- *
+ *
* @param ivySettings
* the settings to use during parsing
* @return the Parser instance used for parsing Ivy files
@@ -396,7 +396,7 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
/**
* Default parent location to check (for dev ONLY)
- *
+ *
* @return a relative path to a parent module descriptor
*/
protected String getDefaultParentLocation() {
@@ -411,9 +411,9 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
* <li>cache to find a resolved parent descriptor</li>
* <li>ask repositories to retrieve the parent module descriptor</li>
* </ul>
- *
+ *
* @param attributes Attributes
- * @throws ParseException
+ * @throws ParseException if something goes wrong
*/
protected void extendsStarted(Attributes attributes) throws ParseException {
String parentOrganisation = settings.substitute(attributes.getValue("organisation"));
@@ -482,7 +482,7 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
/**
* Merge current module with a given module descriptor and specify what should be inherited
* through extendTypes argument
- *
+ *
* @param extendTypes
* specify what should be inherited
* @param parent
@@ -521,7 +521,7 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
/**
* Merge everything from a given parent
- *
+ *
* @param parent
* a given parent module descriptor
*/
@@ -536,7 +536,7 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
/**
* Explain how to inherit metadata related to info element
- *
+ *
* @param parent
* a given parent module descriptor
*/
@@ -589,7 +589,7 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
/**
* Describes how to merge configurations elements
- *
+ *
* @param parent
* the module descriptor
*/
@@ -612,7 +612,7 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
/**
* Describes how dependencies should be inherited
- *
+ *
* @param dependencies
* array of dependencies to inherit
*/
@@ -628,7 +628,7 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
/**
* Describes how to merge description
- *
+ *
* @param description
* description going to be inherited
*/
@@ -641,7 +641,7 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
/**
* Describes how to merge licenses
- *
+ *
* @param licenses
* licenses going to be inherited
*/
@@ -653,7 +653,7 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
/**
* Describes how to merge exclude rules
- *
+ *
* @param excludeRules
* exclude rules going to be inherited
*/
@@ -665,11 +665,11 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
/**
* Returns the parent module using the location attribute (for dev purpose).
- *
+ *
* @param location
* a given location
- * @throws IOException
- * @throws ParseException
+ * @throws IOException if something goes wrong
+ * @throws ParseException if something goes wrong
*/
private ModuleDescriptor parseParentModuleOnFilesystem(String location) throws IOException,
ParseException {
@@ -702,12 +702,12 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
/**
* Describe how to parse a {@link ModuleDescriptor} by asking repositories
- *
+ *
* @param parentMrid
* a given {@link ModuleRevisionId} to find
* @return a {@link ModuleDescriptor} if found. Return null if no {@link ModuleDescriptor}
* was found
- * @throws ParseException
+ * @throws ParseException if something goes wrong
*/
protected ModuleDescriptor parseOtherIvyFile(ModuleRevisionId parentMrid)
throws ParseException {
@@ -911,11 +911,12 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
String branch = settings.substitute(attributes.getValue("branch"));
String branchConstraint = settings.substitute(attributes.getValue("branchConstraint"));
- // if (branchConstraint == null) {
- // // there was no branch constraint before, so we should
- // // set the branchConstraint to the current default branch
- // branchConstraint = settings.getDefaultBranch(ModuleId.newInstance(org, name));
- // }
+ /* if (branchConstraint == null) {
+ * // there was no branch constraint before, so we should
+ * // set the branchConstraint to the current default branch
+ * branchConstraint = settings.getDefaultBranch(ModuleId.newInstance(org, name));
+ * }
+ */
String rev = settings.substitute(attributes.getValue("rev"));
String revConstraint = settings.substitute(attributes.getValue("revConstraint"));
@@ -1167,15 +1168,12 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
protected void addConfiguration(String c) {
confAware.addConfiguration(c);
if (state == State.EXCLUDE) {
- // we are adding a configuration to a module wide exclude rule
- // we have nothing special to do here, the rule has already been added to the module
- // descriptor
+ // we are adding a configuration to a module wide exclude rule we have nothing
+ // special to do here, the rule has already been added to the module descriptor
} else {
// we are currently adding a configuration to either an include, exclude or artifact
- // element
- // of a dependency. This means that we have to add this element to the corresponding
- // conf
- // of the current dependency descriptor
+ // element of a dependency. This means that we have to add this element to the
+ // corresponding conf of the current dependency descriptor
if (confAware instanceof DependencyArtifactDescriptor) {
dd.addDependencyArtifact(c, (DependencyArtifactDescriptor) confAware);
} else if (confAware instanceof IncludeRule) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java
index b373acf..b1aafa9 100644
--- a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java
+++ b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java
@@ -84,11 +84,15 @@ public final class XmlModuleDescriptorUpdater {
/**
* used to copy a module descriptor xml file (also known as ivy file) and update the revisions
* of its dependencies, its status and revision
- *
+ *
* @param srcURL
* the url of the source module descriptor file
* @param destFile
* The file to which the updated module descriptor should be output
+ * @param options
+ * UpdateOptions
+ * @throws IOException if something goes wrong
+ * @throws SAXException if something goes wrong
*/
public static void update(URL srcURL, File destFile, UpdateOptions options) throws IOException,
SAXException {
@@ -932,7 +936,7 @@ public final class XmlModuleDescriptorUpdater {
/**
* Write XML elements that do not appear in the source descriptor, but have been copied in
* from a parent module descriptor via <extends> declaration.
- *
+ *
* @param merged
* child descriptor containing the merged data
* @param items
@@ -1003,7 +1007,7 @@ public final class XmlModuleDescriptorUpdater {
* Collect the given list of inherited descriptor items into lists keyed by parent Id. Thus
* all of the items inherited from parent A can be written together, then all of the items
* from parent B, and so on.
- *
+ *
* @param merged
* the merged child descriptor
* @param items
@@ -1077,13 +1081,13 @@ public final class XmlModuleDescriptorUpdater {
* elements like "configurations" and "dependencies" appear in the parent descriptor, but
* are completely missing in the child descriptor.
* </p>
- *
+ *
* <p>
* For example, if "moduleElement" is "dependencies", guarantees that "configurations" has
* been written. If <code>moduleElement</code> is <code>null</code>, then all missing merged
* elements will be flushed.
* </p>
- *
+ *
* @param moduleElement
* a descriptor element name, for example "configurations" or "info"
*/
@@ -1312,12 +1316,13 @@ public final class XmlModuleDescriptorUpdater {
protected static interface ItemPrinter {
/**
* Print an XML representation of <code>item</code> to <code>out</code>.
- *
+ *
* @param parent
* the module descriptor containing <code>item</code>
* @param item
* subcomponent of the descriptor, for example a {@link DependencyDescriptor} or
* {@link Configuration}
+ * @param out PrintWriter
*/
public void print(ModuleDescriptor parent, Object item, PrintWriter out);
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/report/XmlReportParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/report/XmlReportParser.java b/src/java/org/apache/ivy/plugins/report/XmlReportParser.java
index c24fc11..a0d5737 100644
--- a/src/java/org/apache/ivy/plugins/report/XmlReportParser.java
+++ b/src/java/org/apache/ivy/plugins/report/XmlReportParser.java
@@ -322,6 +322,8 @@ public class XmlReportParser {
/**
* Returns the <tt>ModuleRevisionId</tt> of the resolved module.
+ *
+ * @return ModuleRevisionId
*/
public ModuleRevisionId getResolvedModule() {
return parser.getResolvedModule();
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/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 5bec765..e78f20a 100644
--- a/src/java/org/apache/ivy/plugins/repository/Repository.java
+++ b/src/java/org/apache/ivy/plugins/repository/Repository.java
@@ -26,28 +26,19 @@ import org.apache.ivy.core.module.descriptor.Artifact;
/**
* Represents a collection of resources available to Ivy. Ivy uses one or more repositories as both
* a source of resources for Ivy enabled build systems and as a distribution center for resources
- * generated by Ivy enabled build systems. </p>
- * <p>
- * A repository supports the following fundamental operations
+ * generated by Ivy enabled build systems.
+ * <p>A repository supports the following fundamental operations</p>
* <ul>
* <li>retrieving a resource from the repository.</li>
* <li>transferring a resource to the repository.</li>
* <li>retrieving a listing of resources.</li>
* </ul>
- * </p>
- * <h4>Resource Retrieval</h4> </p>
- * <p>
- * {@link #get} retrieves a resource specified by a provided identifier creating a new file .
- * </p>
- * </p> <h4>resource Publication</h4> </p>
- * <p>
- * {@link #put} transfers a file to the repository.
- * </p>
- * </p> <h4>resource Listing</h4> </p>
- * <p>
- * {@link #list} returns a listing of file like objects belonging to a specified parent directory.
- * </p>
- * </p>
+ * <h3>Resource Retrieval</h3>
+ * <p>{@link #get} retrieves a resource specified by a provided identifier creating a new file.</p>
+ * <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>
*/
public interface Repository {
@@ -55,7 +46,7 @@ public interface Repository {
* Return the resource associated with a specified identifier. If the resource does not exist,
* it should return a Resource with exists() returning false. An IOException should only be
* thrown when a real IO problem occurs, like the impossibility to connect to a server.
- *
+ *
* @param source
* A string identifying the resource.
* @return The resource associated with the resource identifier.
@@ -66,7 +57,7 @@ public interface Repository {
/**
* Fetch a resource from the repository.
- *
+ *
* @param source
* A string identifying the resource to be fetched.
* @param destination
@@ -78,7 +69,7 @@ public interface Repository {
/**
* Transfer a resource to the repository
- *
+ *
* @param artifact
* The artifact to be transferred.
* @param source
@@ -95,7 +86,7 @@ public interface Repository {
/**
* Return a listing of resources names
- *
+ *
* @param parent
* The parent directory from which to generate the listing.
* @return A listing of the parent directory's file content
@@ -106,7 +97,7 @@ public interface Repository {
/**
* Add a listener to the repository.
- *
+ *
* @param listener
* The listener to attach to the repository.
*/
@@ -114,7 +105,7 @@ public interface Repository {
/**
* Remove a listener on the repository
- *
+ *
* @param listener
* The listener to remove
*/
@@ -122,7 +113,7 @@ public interface Repository {
/**
* Determine if a given listener is attached to the repository.
- *
+ *
* @param listener
* The listener being queried
* @return <code>true</code> if the provided listener is attached to the repository,
@@ -132,14 +123,14 @@ public interface Repository {
/**
* Get the repository's file separator string.
- *
+ *
* @return The repository's file separator delimiter
*/
String getFileSeparator();
/**
* Normalize a string.
- *
+ *
* @param source
* The string to normalize.
* @return The normalized string.
@@ -148,6 +139,8 @@ public interface Repository {
/**
* Return the name of the repository
+ *
+ * @return String name
*/
String getName();
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/repository/Resource.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/Resource.java b/src/java/org/apache/ivy/plugins/repository/Resource.java
index 7a62269..950c02a 100644
--- a/src/java/org/apache/ivy/plugins/repository/Resource.java
+++ b/src/java/org/apache/ivy/plugins/repository/Resource.java
@@ -29,18 +29,17 @@ import java.io.InputStream;
* <li>size of the resource in bytes.</li>
* <li>if the resource is available.</li>
* </ul>
- * </p> <h4>Implementation Notes</h4> In implementing the interface you need to ensure the following
- * behaviors:
+ * <h3>Implementation Notes</h3>
+ * In implementing the interface you need to ensure the following behaviors:
* <ul>
- * <li>All of the methods specified in the interface fail by returning an empty value (
- * <code>false</code>, <code>0</code>, <code>""</code>). In other words, the specified interface
+ * <li>All of the methods specified in the interface fail by returning an empty value
+ * (<code>false</code>, <code>0</code>, <code>""</code>). In other words, the specified interface
* methods should not throw RuntimeExceptions.</li>
* <li>Failure conditions should be logged using the {@link org.apache.ivy.util.Message#verbose}
* method.</li>
* <li>Failure of one of the interface's specified methods results in all other interface specified
* methods returning an empty value (<code>false</code>, <code>0</code>, <code>""</code>).</li>
* </ul>
- * </p>
*/
public interface Resource {
@@ -68,7 +67,7 @@ public interface Resource {
public long getContentLength();
/**
- * Determine if the resource is available. </p> Note that this method only checks for
+ * Determine if the resource is available. Note that this method only checks for
* availability, not for actual existence.
*
* @return <code>boolean</code> value indicating if the resource is available.
@@ -95,6 +94,7 @@ public interface Resource {
* Opens a stream on this resource
*
* @return the opened input stream
+ * @throws IOException if something goes wrong
*/
public InputStream openStream() throws IOException;
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/repository/TransferEvent.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/TransferEvent.java b/src/java/org/apache/ivy/plugins/repository/TransferEvent.java
index 68c5adf..64517e7 100644
--- a/src/java/org/apache/ivy/plugins/repository/TransferEvent.java
+++ b/src/java/org/apache/ivy/plugins/repository/TransferEvent.java
@@ -25,25 +25,25 @@ import org.apache.ivy.core.event.IvyEvent;
* TransferEvent is used to notify TransferListeners about progress in transfer of resources form/to
* the repository This class is LARGELY inspired by org.apache.maven.wagon.events.TransferEvent
* released under the following copyright license:
- *
+ *
* <pre>
- *
+ *
* Copyright 2001-2005 The Apache Software Foundation.
- *
+ *
* Licensed 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
- *
+ *
* 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.
- *
+ *
* </pre>
- *
+ *
* Original class written by Michal Maczka.
*/
public class TransferEvent extends IvyEvent {
@@ -184,9 +184,9 @@ public class TransferEvent extends IvyEvent {
/**
* Returns the request type.
- *
+ *
* @return Returns the request type. The Request type is one of
- * <code>TransferEvent.REQUEST_GET<code> or <code>TransferEvent.REQUEST_PUT<code>
+ * TransferEvent.REQUEST_GET or TransferEvent.REQUEST_PUT
*/
public int getRequestType() {
return requestType;
@@ -194,10 +194,10 @@ public class TransferEvent extends IvyEvent {
/**
* Sets the request type
- *
+ *
* @param requestType
* The requestType to set. The Request type value should be either
- * <code>TransferEvent.REQUEST_GET<code> or <code>TransferEvent.REQUEST_PUT<code>.
+ * TransferEvent.REQUEST_GET or TransferEvent.REQUEST_PUT
* @throws IllegalArgumentException
* when
*/
@@ -303,22 +303,16 @@ public class TransferEvent extends IvyEvent {
/**
* Returns the elapsed time (in ms) between when the event entered one type until it entered
* another event time.
- * <p>
- * This is especially useful to get the elapsed transfer time:
- *
+ * <p>This is especially useful to get the elapsed transfer time:</p>
* <pre>
* getElapsedTime(TransferEvent.TRANSFER_STARTED, TransferEvent.TRANSFER_COMPLETED);
* </pre>
- *
- * </p>
- * <p>
- * Special cases:
+ * <p>Special cases:</p>
* <ul>
* <li>returns -1 if the event never entered the fromEventType or the toEventType.</li>
* <li>returns 0 if the event entered toEventType before fromEventType</li>
* </ul>
- * </p>
- *
+ *
* @param fromEventType
* the event type constant from which time should be measured
* @param toEventType
@@ -345,7 +339,7 @@ public class TransferEvent extends IvyEvent {
/**
* Checks the given event type is a valid event type, throws an {@link IllegalArgumentException}
* if it isn't
- *
+ *
* @param eventType
* the event type to check
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java b/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java
index 276cc25..d61c0ba 100644
--- a/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java
+++ b/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java
@@ -68,10 +68,11 @@ public abstract class AbstractSshBasedRepository extends AbstractRepository {
/**
* get a new session using the default attributes if the given String is a full uri, use the
* data from the uri instead
- *
+ *
* @param pathOrUri
* might be just a path or a full ssh or sftp uri
* @return matching Session
+ * @throws IOException if something goes wrong
*/
protected Session getSession(String pathOrUri) throws IOException {
URI uri = parseURI(pathOrUri);
@@ -134,7 +135,7 @@ public abstract class AbstractSshBasedRepository extends AbstractRepository {
/**
* Just check the uri for sanity
- *
+ *
* @param source
* String of the uri
* @return URI object of the String or null
@@ -170,7 +171,7 @@ public abstract class AbstractSshBasedRepository extends AbstractRepository {
/**
* Called, when user was not found in URL. Maintain static hash of credentials and retrieve or
* ask credentials for host.
- *
+ *
* @param host
* host for which we want to get credentials.
* @return credentials for given host
@@ -194,7 +195,7 @@ public abstract class AbstractSshBasedRepository extends AbstractRepository {
/**
* closes the session and remove it from the cache (eg. on case of errors)
- *
+ *
* @param session
* key for the cache
* @param pathOrUri
@@ -207,7 +208,7 @@ public abstract class AbstractSshBasedRepository extends AbstractRepository {
/**
* set the default user to use for the connection if no user is given or a PEM file is used
- *
+ *
* @param user
* to use
*/
@@ -224,7 +225,7 @@ public abstract class AbstractSshBasedRepository extends AbstractRepository {
/**
* Sets the full file path to use for accessing a PEM key file
- *
+ *
* @param filePath
* fully qualified name
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java b/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
index de87655..7b24ecb 100644
--- a/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
+++ b/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
@@ -108,7 +108,7 @@ public final class SshCache {
/**
* attach an sftp channel to this cache entry
- *
+ *
* @param newChannel
* to attach
*/
@@ -150,7 +150,7 @@ public final class SshCache {
/**
* key is username / host / port
- *
+ *
* @see #createCacheKey(String, String, int) for details
*/
private Map uriCacheMap = new HashMap();
@@ -177,7 +177,7 @@ public final class SshCache {
/**
* Creates a combined cache key from the given key parts
- *
+ *
* @param user
* name of the user
* @param host
@@ -197,7 +197,7 @@ public final class SshCache {
/**
* retrieves a session entry for a given session from the cache
- *
+ *
* @param session
* to retrieve cache entry for
* @return null or the existing entry
@@ -209,7 +209,7 @@ public final class SshCache {
/**
* Sets a session to a given combined key into the cache If an old session object already
* exists, close and remove it
- *
+ *
* @param user
* of the session
* @param host
@@ -246,7 +246,7 @@ public final class SshCache {
/**
* discards session entries from the cache
- *
+ *
* @param session
* to clear
*/
@@ -259,10 +259,11 @@ public final class SshCache {
/**
* retrieves an sftp channel from the cache
- *
+ *
* @param session
* to connect to
* @return channelSftp or null if not successful (channel not existent or dead)
+ * @throws IOException if something goes wrong
*/
public ChannelSftp getChannelSftp(Session session) throws IOException {
ChannelSftp channel = null;
@@ -279,7 +280,7 @@ public final class SshCache {
/**
* attaches a channelSftp to an existing session cache entry
- *
+ *
* @param session
* to attach the channel to
* @param channel
@@ -295,7 +296,7 @@ public final class SshCache {
/**
* Attempts to connect to a local SSH agent (using either UNIX sockets or PuTTY's Pageant)
- *
+ *
* @param jsch
* Connection to be attached to an available local agent
* @return true if connected to agent, false otherwise
@@ -313,7 +314,7 @@ public final class SshCache {
/**
* Gets a session from the cache or establishes a new session if necessary
- *
+ *
* @param host
* to connect to
* @param port
@@ -331,6 +332,7 @@ public final class SshCache {
* @param allowedAgentUse
* Whether to communicate with an agent for authentication
* @return session or null if not successful
+ * @throws IOException if something goes wrong
*/
public Session getSession(String host, int port, String username, String userPassword,
File pemFile, String pemPassword, File passFile, boolean allowedAgentUse)
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java b/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java
index cbe654f..4590a67 100644
--- a/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java
+++ b/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java
@@ -68,7 +68,7 @@ public class SshRepository extends AbstractSshBasedRepository {
/**
* Fetch the needed file information for a given file (size, last modification time) and report
* it back in a SshResource
- *
+ *
* @param source
* ssh uri for the file to get info for
* @return SshResource filled with the needed information
@@ -103,7 +103,7 @@ public class SshRepository extends AbstractSshBasedRepository {
/**
* Reads out the output of a ssh session exec
- *
+ *
* @param channel
* Channel to read from
* @param strStdout
@@ -157,7 +157,7 @@ public class SshRepository extends AbstractSshBasedRepository {
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.ivy.repository.Repository#list(java.lang.String)
*/
public List list(String parent) throws IOException {
@@ -211,7 +211,7 @@ public class SshRepository extends AbstractSshBasedRepository {
/**
* Replace the argument placeholder with argument or append the argument if no placeholder is
* present
- *
+ *
* @param command
* with argument placeholder or not
* @param argument ditto
@@ -229,7 +229,7 @@ public class SshRepository extends AbstractSshBasedRepository {
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.ivy.repository.Repository#put(java.io.File, java.lang.String, boolean)
*/
public void put(File source, String destination, boolean overwrite) throws IOException {
@@ -279,7 +279,7 @@ public class SshRepository extends AbstractSshBasedRepository {
/**
* Tries to create a directory path on the target system
- *
+ *
* @param path
* to create
* @param session
@@ -316,7 +316,7 @@ public class SshRepository extends AbstractSshBasedRepository {
/**
* check for existence of file or dir on target system
- *
+ *
* @param filePath
* to the object to check
* @param session
@@ -337,7 +337,7 @@ public class SshRepository extends AbstractSshBasedRepository {
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.ivy.repository.Repository#get(java.lang.String, java.io.File)
*/
public void get(String source, File destination) throws IOException {
@@ -373,7 +373,7 @@ public class SshRepository extends AbstractSshBasedRepository {
/**
* sets the list command to use for a directory listing listing must be only the filename and
* each filename on a separate line
- *
+ *
* @param cmd
* to use. default is "ls -1"
*/
@@ -422,7 +422,7 @@ public class SshRepository extends AbstractSshBasedRepository {
* The file separator is the separator to use on the target system On a unix system it is '/',
* but I don't know, how this is solved on different ssh implementations. Using the default
* might be fine
- *
+ *
* @param fileSeparator
* The fileSeparator to use. default '/'
*/
@@ -433,6 +433,8 @@ public class SshRepository extends AbstractSshBasedRepository {
/**
* A four digit string (e.g., 0644, see "man chmod", "man open") specifying the permissions of
* the published files.
+ *
+ * @param permissions String
*/
public void setPublishPermissions(String permissions) {
this.publishPermissions = permissions;
@@ -448,10 +450,11 @@ public class SshRepository extends AbstractSshBasedRepository {
/**
* Not really streaming...need to implement a proper streaming approach?
- *
+ *
* @param resource
* to stream
* @return InputStream of the resource data
+ * @throws IOException if something goes wrong
*/
public InputStream openStream(SshResource resource) throws IOException {
Session session = getSession(resource.getName());
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java b/src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java
index 6519811..914757f 100644
--- a/src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java
+++ b/src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java
@@ -117,10 +117,10 @@ public class VfsRepository extends AbstractRepository {
/**
* Get a VfsResource
- *
+ *
* @param vfsURI
* a <code>String</code> identifying a VFS Resource
- * @throws <code>IOException</code> on failure
+ * @throws IOException on failure
* @see "Supported File Systems in the jakarta-commons-vfs documentation"
*/
public Resource getResource(String vfsURI) throws IOException {
@@ -129,12 +129,12 @@ public class VfsRepository extends AbstractRepository {
/**
* Transfer a VFS Resource from the repository to the local file system.
- *
+ *
* @param srcVfsURI
* a <code>String</code> identifying the VFS resource to be fetched
* @param destination
* a <code>File</code> identifying the destination file
- * @throws <code>IOException</code> on failure
+ * @throws IOException on failure
* @see "Supported File Systems in the jakarta-commons-vfs documentation"
*/
public void get(String srcVfsURI, File destination) throws IOException {
@@ -159,7 +159,7 @@ public class VfsRepository extends AbstractRepository {
/**
* Return a listing of the contents of a parent directory. Listing is a set of strings
* representing VFS URIs.
- *
+ *
* @param vfsURI
* providing identifying a VFS provided resource
* @throws IOException
@@ -188,14 +188,14 @@ public class VfsRepository extends AbstractRepository {
/**
* Transfer an Ivy resource to a VFS repository
- *
+ *
* @param source
* a <code>File</code> identifying the local file to transfer to the repository
* @param vfsURI
* a <code>String</code> identifying the destination VFS Resource.
* @param overwrite
* whether to overwrite an existing resource.
- * @throws <code>IOException</code> on failure.
+ * @throws IOException on failure.
* @see "Supported File Systems in the jakarta-commons-vfs documentation"
*/
public void put(File source, String vfsURI, boolean overwrite) throws IOException {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java b/src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java
index 5a97924..444b2f9 100644
--- a/src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java
+++ b/src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java
@@ -83,7 +83,7 @@ public class VfsResource implements Resource {
* Get a list of direct descendants of the given resource. Note that attempts to get a list of
* children does <em>not</em> result in an error. Instead an error message is
* logged and an empty ArrayList returned.
- *
+ *
* @return A <code>ArrayList</code> of VFSResources
*/
public List getChildren() {
@@ -112,7 +112,7 @@ public class VfsResource implements Resource {
/**
* Get the name of the resource.
- *
+ *
* @return a <code>String</code> representing the Resource URL.
*/
public String getName() {
@@ -126,9 +126,9 @@ public class VfsResource implements Resource {
/**
* The VFS FileName getURI method seems to have a bug in it where file: URIs will have 4 forward
* slashes instead of 3.
- *
+ *
* @param vfsURI ditto
- * @return a normalized <class>String</class> representing the VFS URI
+ * @return a normalized String representing the VFS URI
*/
public static String normalize(String vfsURI) {
if (vfsURI == null) {
@@ -143,7 +143,7 @@ public class VfsResource implements Resource {
/**
* Get the last modification time of the resource.
- *
+ *
* @return a <code>long</code> indicating last modified time.
*/
public long getLastModified() {
@@ -153,7 +153,7 @@ public class VfsResource implements Resource {
/**
* Get the size of the resource
- *
+ *
* @return a <code>long</code> representing the size of the resource (in bytes).
*/
public long getContentLength() {
@@ -163,7 +163,7 @@ public class VfsResource implements Resource {
/**
* Flag indicating whether a resource is available for querying
- *
+ *
* @return <code>true</code> if the resource is available for querying, <code>false</code>
* otherwise.
*/
@@ -174,7 +174,7 @@ public class VfsResource implements Resource {
/**
* Return a flag indicating whether a provided VFS resource physically exists
- *
+ *
* @return <code>true</code> if the resource physically exists, <code>false</code> otherwise.
*/
public boolean physicallyExists() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/repository/vsftp/VsftpRepository.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/vsftp/VsftpRepository.java b/src/java/org/apache/ivy/plugins/repository/vsftp/VsftpRepository.java
index 1ec8f4f..59b99e7 100644
--- a/src/java/org/apache/ivy/plugins/repository/vsftp/VsftpRepository.java
+++ b/src/java/org/apache/ivy/plugins/repository/vsftp/VsftpRepository.java
@@ -306,6 +306,11 @@ public class VsftpRepository extends AbstractRepository {
* we compare the response with the expected message and deal with it. The problem is that this
* is very specific to the version of vsftp used for the test, That's why expected messages are
* obtained using overriddable protected methods.
+ *
+ * @param command String
+ * @param expectedResponse Pattern
+ * @param timeout long
+ * @throws IOException if something goes wrong
*/
protected void sendCommand(String command, Pattern expectedResponse, long timeout)
throws IOException {
@@ -638,7 +643,7 @@ public class VsftpRepository extends AbstractRepository {
/**
* Parses a ls -l line and transforms it in a resource
- *
+ *
* @param file ditto
* @param responseLine ditto
* @return Resource
@@ -729,7 +734,7 @@ public class VsftpRepository extends AbstractRepository {
/**
* Sets the reuse connection time. The same connection will be reused if the time here does not
* last between two commands. O indicates that the connection should never be reused
- *
+ *
* @param time long
*/
public void setReuseConnection(long time) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java b/src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java
index 907ccb4..46be24a 100644
--- a/src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java
@@ -47,7 +47,7 @@ public abstract class AbstractSshBasedResolver extends RepositoryResolver {
/**
* Sets the location of the Public Key file to use for authentication
- *
+ *
* @param filePath
* full file path name
*/
@@ -57,7 +57,7 @@ public abstract class AbstractSshBasedResolver extends RepositoryResolver {
/**
* Determines whether a local SSH agent may be used for authentication
- *
+ *
* @param allowedAgentUse
* true if an agent may be used if available
*/
@@ -69,6 +69,8 @@ public abstract class AbstractSshBasedResolver extends RepositoryResolver {
* Optional password file. If set the repository will use it as an encrypted property file, to
* load username and passwd entries, and to store them if the user choose to do so. Defaults to
* user.dir/.ivy/[host].sftp.passwd, set it to null to disable this feature.
+ *
+ * @param passfile File
*/
public void setPassfile(File passfile) {
getSshBasedRepository().setPassFile(passfile);
@@ -89,7 +91,7 @@ public abstract class AbstractSshBasedResolver extends RepositoryResolver {
* set and password based login is used, user will be prompted for it the password can also be
* set by using a full url for the pattern, like
* "sftp://user:password@myserver.com/path/to/repos/[artifact].[ext]"
- *
+ *
* @param password
* to use
*/
@@ -101,7 +103,7 @@ public abstract class AbstractSshBasedResolver extends RepositoryResolver {
* Sets the password to use for decrypting key file (if it is encrypted) if no password is set
* and the keyfile is encrypted, the user will be prompted for the password if the keyfile is
* passwordless, this parameter will be ignored if given
- *
+ *
* @param password
* to use
*/
@@ -112,7 +114,7 @@ public abstract class AbstractSshBasedResolver extends RepositoryResolver {
/**
* sets the user to use for the ssh communication the user can also be set by using a full url
* for the pattern, like "ssh://user@myserver.com/path/to/repos/[artifact].[ext]"
- *
+ *
* @param user
* on the target system
*/
@@ -123,7 +125,7 @@ public abstract class AbstractSshBasedResolver extends RepositoryResolver {
/**
* sets the host to use for the ssh communication the host can also be set by using a full url
* for the pattern, like "ssh://myserver.com/path/to/repos/[artifact].[ext]"
- *
+ *
* @param host
* of the target system
*/
@@ -135,7 +137,7 @@ public abstract class AbstractSshBasedResolver extends RepositoryResolver {
* sets the port to use for the ssh communication port 22 is default the port can also be set by
* using a full url for the pattern, like
* "sftp://myserver.com:8022/path/to/repos/[artifact].[ext]"
- *
+ *
* @param port
* of the target system
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/resolver/DependencyResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/DependencyResolver.java b/src/java/org/apache/ivy/plugins/resolver/DependencyResolver.java
index 8bd4898..80b98d3 100644
--- a/src/java/org/apache/ivy/plugins/resolver/DependencyResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/DependencyResolver.java
@@ -46,7 +46,7 @@ public interface DependencyResolver {
/**
* Should only be used by configurator
- *
+ *
* @param name
* the new name of the resolver
*/
@@ -57,8 +57,11 @@ public interface DependencyResolver {
* latest one (i.e. a revision uniquely identifying the revision of a module in the current
* environment - If this revision is not able to identify uniquely the revision of the module
* outside of the current environment, then the resolved revision must begin by ##)
- *
- * @throws ParseException
+ *
+ * @param dd DependencyDescriptor
+ * @param data ResolveData
+ * @return ResolvedModuleRevision
+ * @throws ParseException if something goes wrong
*/
ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data)
throws ParseException;
@@ -66,7 +69,7 @@ public interface DependencyResolver {
/**
* Finds the module descriptor for the specified <tt>DependencyDescriptor</tt>. If this resolver
* can't find the module descriptor, <tt>null</tt> is returned.
- *
+ *
* @param dd
* the dependency descriptor
* @param data
@@ -86,7 +89,7 @@ public interface DependencyResolver {
* The returned DownloadReport is never <code>null</code>, and always contain an
* {@link ArtifactDownloadReport} for each requested Artifact.
* </p>
- *
+ *
* @param artifacts
* an array of artifacts to download. Must not be <code>null</code>.
* @param options
@@ -102,7 +105,7 @@ public interface DependencyResolver {
* locates and downloads a set of artifacts. This method uses an {@link ArtifactOrigin}, and as
* such is only used to materialize an already located Artifact.
* </p>
- *
+ *
* @param artifact
* the location of the artifact to download. Must not be <code>null</code>.
* @param options
@@ -114,7 +117,7 @@ public interface DependencyResolver {
/**
* Returns <code>true</code> if the given artifact can be located by this resolver and actually
* exist.
- *
+ *
* @param artifact
* the artifact which should be tested.
* @return <code>true</code> if the given artifact can be located by this resolver and actually
@@ -125,7 +128,7 @@ public interface DependencyResolver {
/**
* Locates the given artifact and returns its location if it can be located by this resolver and
* if it actually exists, or <code>null</code> in other cases.
- *
+ *
* @param artifact
* the artifact which should be located
* @return the artifact location, or <code>null</code> if it can't be located by this resolver
@@ -148,7 +151,7 @@ public interface DependencyResolver {
/**
* Reports last artifact download failure as Messages
- *
+ *
* @param art Artifact
*/
void reportFailure(Artifact art);
@@ -159,21 +162,26 @@ public interface DependencyResolver {
// are registered in ivy too.
/**
- * List all the values the given token can take if other tokens are set as described in the
- * otherTokenValues map. For instance, if token = "revision" and the map contains
- * "organisation"->"foo" "module"->"bar" The results will be the list of revisions of the module
- * bar from the org foo.
+ * List all the values the given token can take if other tokens are set as
+ * described in the otherTokenValues map. For instance, if
+ * token = "revision" and the map contains "organisation"->"foo" "module"->"bar"
+ * The results will be the list of revisions of the module bar from the org foo.
* <p>
- * Note that listing does not take into account namespaces, and return raw information without
- * any namespace transformation. The caller is responsible for calling namespace transformation
- * with the Namespace returned by {@link #getNamespace()}.
+ * Note that listing does not take into account namespaces, and return raw
+ * information without any namespace transformation. The caller is
+ * responsible for calling namespace transformation with the Namespace
+ * returned by {@link #getNamespace()}.
* </p>
+ *
+ * @param token String
+ * @param otherTokenValues Map
+ * @return String[]
*/
String[] listTokenValues(String token, Map<String, String> otherTokenValues);
/**
* Same as {@link #listTokenValues(String, Map)} but more generic.
- *
+ *
* @param tokens
* the tokens of the query
* @param criteria
@@ -190,7 +198,7 @@ public interface DependencyResolver {
/**
* Returns the namespace associated with this resolver.
- *
+ *
* @return the namespace associated with this resolver.
*/
Namespace getNamespace();
@@ -202,7 +210,7 @@ public interface DependencyResolver {
/**
* Returns the {@link RepositoryCacheManager} used to manage the repository cache associated
* with this dependency resolver.
- *
+ *
* @return the {@link RepositoryCacheManager} used to manage the repository cache associated
* with this dependency resolver.
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/resolver/SshResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/SshResolver.java b/src/java/org/apache/ivy/plugins/resolver/SshResolver.java
index bdb5e98..3c68dcc 100644
--- a/src/java/org/apache/ivy/plugins/resolver/SshResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/SshResolver.java
@@ -31,6 +31,8 @@ public class SshResolver extends AbstractSshBasedResolver {
/**
* A four digit string (e.g., 0644, see "man chmod", "man open") specifying the permissions of
* the published files.
+ *
+ * @param permissions String
*/
public void setPublishPermissions(String permissions) {
((SshRepository) getRepository()).setPublishPermissions(permissions);
@@ -39,7 +41,7 @@ public class SshResolver extends AbstractSshBasedResolver {
/**
* sets the path separator used on the target system. Not sure if this is used or if '/' is used
* on all implementation. default is to use '/'
- *
+ *
* @param sep
* file separator to use on the target system
*/
@@ -57,6 +59,8 @@ public class SshResolver extends AbstractSshBasedResolver {
* the term %arg can be used in the command to substitute the path to be listed (e.g.
* "ls -1 %arg | grep -v CVS" to get a listing without CVS directory) if %arg is not part of the
* command, the path will be appended to the command default is: "ls -1"
+ *
+ * @param cmd String
*/
public void setListCommand(String cmd) {
((SshRepository) getRepository()).setListCommand(cmd);
@@ -65,9 +69,11 @@ public class SshResolver extends AbstractSshBasedResolver {
/**
* set the command to check for existence of a file the command has to be a shell command
* working on the target system and has to create an exit status of 0 for an existent file and
- * <> 0 for a non existing file given as argument the term %arg can be used in the command to
- * substitute the path to be listed if %arg is not part of the command, the path will be appended
- * to the command default is: "ls"
+ * <> 0 for a non existing file given as argument the term %arg can be used in the command
+ * to substitute the path to be listed if %arg is not part of the command, the path will be
+ * appended to the command default is: "ls"
+ *
+ * @param cmd String
*/
public void setExistCommand(String cmd) {
((SshRepository) getRepository()).setExistCommand(cmd);
@@ -78,6 +84,8 @@ public class SshResolver extends AbstractSshBasedResolver {
* command working on the target system and has to create a directory with the given argument
* the term %arg can be used in the command to substitute the path to be listed if %arg is not
* part of the command, the path will be appended to the command default is: "mkdir"
+ *
+ * @param cmd String
*/
public void setCreateDirCommand(String cmd) {
((SshRepository) getRepository()).setExistCommand(cmd);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/resolver/WorkspaceChainResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/WorkspaceChainResolver.java b/src/java/org/apache/ivy/plugins/resolver/WorkspaceChainResolver.java
index a3662cf..a1028d1 100644
--- a/src/java/org/apache/ivy/plugins/resolver/WorkspaceChainResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/WorkspaceChainResolver.java
@@ -20,9 +20,9 @@ package org.apache.ivy.plugins.resolver;
import org.apache.ivy.core.settings.IvySettings;
/**
- * Resolver which decorate normal resolver so that the workspace resolver can hijack the resolve
- * process <br />
- * NB : it is for internal usage of Ivy only!
+ * Resolver which decorate normal resolver so that the workspace resolver can
+ * hijack the resolveprocess
+ * <p>NB : it is for internal usage of Ivy only!</p>
*/
public class WorkspaceChainResolver extends ChainResolver {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/resolver/packager/PackagerCacheEntry.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/packager/PackagerCacheEntry.java b/src/java/org/apache/ivy/plugins/resolver/packager/PackagerCacheEntry.java
index a7fe87a..b88f0e5 100644
--- a/src/java/org/apache/ivy/plugins/resolver/packager/PackagerCacheEntry.java
+++ b/src/java/org/apache/ivy/plugins/resolver/packager/PackagerCacheEntry.java
@@ -81,14 +81,14 @@ public class PackagerCacheEntry {
/**
* Attempt to build this entry.
- *
+ *
* @param packagerResource
* packager metadata resource
* @param properties
* a map of properties to pass to the child Ant build responsible for dependency
* packaging
- *
- * @throws IllegalStateException
+ *
+ * @throws IOException
* if this entry has already been built
*/
public synchronized void build(Resource packagerResource, Map properties) throws IOException {
@@ -176,6 +176,8 @@ public class PackagerCacheEntry {
/**
* Has this entry been successfully built?
+ *
+ * @return boolean
*/
public synchronized boolean isBuilt() {
return this.built;
@@ -183,7 +185,9 @@ public class PackagerCacheEntry {
/**
* Get a built artifact.
- *
+ *
+ * @param artifact ditto
+ * @return ResolvedResource
* @throws IllegalStateException
* if this entry's built has not (yet) completed successfully
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/resolver/packager/PackagerResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/packager/PackagerResolver.java b/src/java/org/apache/ivy/plugins/resolver/packager/PackagerResolver.java
index 6a12ba1..26ed972 100644
--- a/src/java/org/apache/ivy/plugins/resolver/packager/PackagerResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/packager/PackagerResolver.java
@@ -36,10 +36,11 @@ import org.apache.ivy.util.Message;
/**
* Resolver that performs a "build" operation to resolve artifacts.
- *
+ *
* <p>
* The resolver is configured with a base URL, from which the "ivy.xml" and "packager.xml" files are
* resolved. The latter file contains instructions describing how to build the actual artifacts.
+ * </p>
*/
public class PackagerResolver extends URLResolver {
@@ -93,6 +94,8 @@ public class PackagerResolver extends URLResolver {
/**
* Set root directory under which builds take place.
+ *
+ * @param buildRoot File
*/
public void setBuildRoot(File buildRoot) {
this.buildRoot = buildRoot;
@@ -100,6 +103,8 @@ public class PackagerResolver extends URLResolver {
/**
* Returns root directory under which builds take place.
+ *
+ * @return File
*/
public File getBuildRoot() {
return buildRoot;
@@ -107,6 +112,8 @@ public class PackagerResolver extends URLResolver {
/**
* Set resource cache directory.
+ *
+ * @param resourceCache File
*/
public void setResourceCache(File resourceCache) {
this.resourceCache = resourceCache;
@@ -114,6 +121,8 @@ public class PackagerResolver extends URLResolver {
/**
* Get resource cache directory.
+ *
+ * @return File
*/
public File getResourceCache() {
return resourceCache;
@@ -121,6 +130,8 @@ public class PackagerResolver extends URLResolver {
/**
* Set base resource override URL pattern.
+ *
+ * @param resourceURL String
*/
public void setResourceURL(String resourceURL) {
this.resourceURL = resourceURL;
@@ -128,6 +139,8 @@ public class PackagerResolver extends URLResolver {
/**
* Set pattern for locating "packager.xml" files.
+ *
+ * @param pattern String
*/
public void setPackagerPattern(String pattern) {
ArrayList list = new ArrayList();
@@ -137,6 +150,8 @@ public class PackagerResolver extends URLResolver {
/**
* Set whether to preserve build directories. Default is false.
+ *
+ * @param preserve boolean
*/
public void setPreserveBuildDirectories(boolean preserve) {
this.preserve = preserve;
@@ -144,6 +159,8 @@ public class PackagerResolver extends URLResolver {
/**
* Set whether to enable restricted mode. Default is true.
+ *
+ * @param restricted boolean
*/
public void setRestricted(boolean restricted) {
this.restricted = restricted;
@@ -151,6 +168,8 @@ public class PackagerResolver extends URLResolver {
/**
* Set whether to run ant with the -verbose flag. Default is false.
+ *
+ * @param verbose boolean
*/
public void setVerbose(boolean verbose) {
this.verbose = verbose;
@@ -158,6 +177,8 @@ public class PackagerResolver extends URLResolver {
/**
* Set whether to run ant with the -quiet flag. Default is false.
+ *
+ * @param quiet boolean
*/
public void setQuiet(boolean quiet) {
this.quiet = quiet;
@@ -165,6 +186,8 @@ public class PackagerResolver extends URLResolver {
/**
* Set whether to validate downloaded packager.xml files. Default is true.
+ *
+ * @param validate boolean
*/
public void setValidate(boolean validate) {
this.validate = validate;
@@ -185,7 +208,7 @@ public class PackagerResolver extends URLResolver {
/**
* Sets a property to be passed to the child Ant build responsible for packaging the dependency.
- *
+ *
* @param propertyKey
* the property to pass
* @param propertyValue
[11/15] ant-ivy git commit: Get findbugs working
Posted by jh...@apache.org.
Get findbugs working
Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/af06da94
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/af06da94
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/af06da94
Branch: refs/heads/master
Commit: af06da94f9b25acc5feb9431103a3b2ceeb8f4f1
Parents: 3cfc7bf
Author: twogee <g....@gmail.com>
Authored: Sun May 28 15:02:39 2017 +0200
Committer: twogee <g....@gmail.com>
Committed: Sun May 28 15:04:33 2017 +0200
----------------------------------------------------------------------
build.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/af06da94/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index e16296c..29a48be 100644
--- a/build.xml
+++ b/build.xml
@@ -611,9 +611,9 @@
</target>
<target name="init-findbugs" unless="findbugs.home">
- <!-- Findbugs: Getting Findbugs -->
+ <!-- Findbugs: Getting Findbugs requires unlimited strength crypto policy -->
<property name="findbugs.version"
- value="1.3.5"
+ value="3.0.1"
description="Version of Findbugs to use"/>
<property name="findbugs.download.name"
value="findbugs-${findbugs.version}"
@@ -622,7 +622,7 @@
value="${findbugs.download.name}.zip"
description="The filename of the ZIP."/>
<property name="findbugs.download.url"
- value="https://jaist.dl.sourceforge.net/project/findbugs/findbugs/${findbugs.version}/${findbugs.download.file}"
+ value="https://sourceforge.net/projects/findbugs/files/findbugs/${findbugs.version}/${findbugs.download.file}/download"
description="The download adress at a mirror of Sourceforge."/>
<property name="findbugs.download.to"
value="${build.dir}/.downloads"
@@ -669,7 +669,7 @@
output="xml:withMessages"
outputFile="${findbugs.reportdir}/${findbugs.raw}"
jvmargs="${findbugs.jvmargs}"
- projectName="${Name} ${project.version}">
+ projectName="${ant.project.name} ${target.ivy.version}">
<class location="${core.classes.build.dir}"/>
<sourcePath path="${src.dir}"/>
</fb:findbugs>
[15/15] ant-ivy git commit: extract method
Posted by jh...@apache.org.
extract method
Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/24b5e00b
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/24b5e00b
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/24b5e00b
Branch: refs/heads/master
Commit: 24b5e00be753889e4907473ce57271acb290cb67
Parents: 007939d
Author: Jan Matèrne <jh...@apache.org>
Authored: Mon May 29 13:17:19 2017 +0200
Committer: Jan Matèrne <jh...@apache.org>
Committed: Mon May 29 13:17:19 2017 +0200
----------------------------------------------------------------------
.../apache/ivy/core/settings/IvySettings.java | 31 ++++++++++++--------
1 file changed, 18 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/24b5e00b/src/java/org/apache/ivy/core/settings/IvySettings.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/settings/IvySettings.java b/src/java/org/apache/ivy/core/settings/IvySettings.java
index 4b07c0b..2523e41 100644
--- a/src/java/org/apache/ivy/core/settings/IvySettings.java
+++ b/src/java/org/apache/ivy/core/settings/IvySettings.java
@@ -1245,6 +1245,18 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
return variableContainer.getVariable(name);
}
+ /**
+ * Returns a variable as boolean value.
+ * @param name name of the variable
+ * @param valueIfUnset value if the variable is unset
+ * @return <tt>true</tt> if the variable is <tt>'true'</tt> (ignoring case)
+ * or the value of <i>valueIfUnset</i> if the variable is <tt>null</tt>
+ */
+ public synchronized boolean getVariableAsBoolean(String name, boolean valueIfUnset) {
+ String var = getVariable(name);
+ return var == null ? valueIfUnset : Boolean.valueOf(var);
+ }
+
public synchronized ConflictManager getDefaultConflictManager() {
if (defaultConflictManager == null) {
defaultConflictManager = new LatestConflictManager(getDefaultLatestStrategy());
@@ -1331,41 +1343,34 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
}
public synchronized boolean logModulesInUse() {
- String var = getVariable("ivy.log.modules.in.use");
- return var == null || Boolean.valueOf(var);
+ return getVariableAsBoolean("ivy.log.modules.in.use", true);
}
public synchronized boolean logModuleWhenFound() {
- String var = getVariable("ivy.log.module.when.found");
- return var == null || Boolean.valueOf(var);
+ return getVariableAsBoolean("ivy.log.module.when.found", true);
}
public synchronized boolean logResolvedRevision() {
- String var = getVariable("ivy.log.resolved.revision");
- return var == null || Boolean.valueOf(var);
+ return getVariableAsBoolean("ivy.log.resolved.revision", true);
}
public synchronized boolean debugConflictResolution() {
if (debugConflictResolution == null) {
- String var = getVariable("ivy.log.conflict.resolution");
- debugConflictResolution = var != null
- && Boolean.valueOf(var);
+ debugConflictResolution = getVariableAsBoolean("ivy.log.conflict.resolution", false);
}
return debugConflictResolution;
}
public synchronized boolean debugLocking() {
if (debugLocking == null) {
- String var = getVariable("ivy.log.locking");
- debugLocking = var != null && Boolean.valueOf(var);
+ debugLocking = getVariableAsBoolean("ivy.log.locking", false);
}
return debugLocking;
}
public synchronized boolean dumpMemoryUsage() {
if (dumpMemoryUsage == null) {
- String var = getVariable("ivy.log.memory");
- dumpMemoryUsage = var != null && Boolean.valueOf(var);
+ dumpMemoryUsage = getVariableAsBoolean("ivy.log.memory", false);
}
return dumpMemoryUsage;
}
[10/15] ant-ivy git commit: Merge branch 'master' into master
Posted by jh...@apache.org.
Merge branch 'master' into master
Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/3cfc7bfe
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/3cfc7bfe
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/3cfc7bfe
Branch: refs/heads/master
Commit: 3cfc7bfe70c038055939533b56c408419b01de81
Parents: baf03a9 90274e1
Author: twogee <g....@gmail.com>
Authored: Sun May 28 14:14:25 2017 +0200
Committer: GitHub <no...@github.com>
Committed: Sun May 28 14:14:25 2017 +0200
----------------------------------------------------------------------
doc/release-notes.html | 2 +
src/java/org/apache/ivy/util/FileUtil.java | 108 ++++++++++++--------
test/java/org/apache/ivy/ant/FileUtilTest.java | 92 +++++++++++++++++
3 files changed, 157 insertions(+), 45 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/3cfc7bfe/src/java/org/apache/ivy/util/FileUtil.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/ivy/util/FileUtil.java
index c938007,52e03db..17fbaf4
--- a/src/java/org/apache/ivy/util/FileUtil.java
+++ b/src/java/org/apache/ivy/util/FileUtil.java
@@@ -535,16 -535,19 +535,16 @@@ public final class FileUtil
* Unlike {@link File#getCanonicalPath()} this method specifically does not resolve symbolic
* links.
*
- * @param path
- * the path to be normalized.
+ * @param path the path to be normalized.
* @return the normalized version of the path.
- *
- * @throws java.lang.NullPointerException
- * if path is null.
+ * @throws NullPointerException if path is null.
*/
public static File normalize(final String path) {
- Stack<String> s = new Stack<String>();
- String[] dissect = dissect(path);
- s.push(dissect[0]);
+ final Stack<String> s = new Stack<String>();
+ final DissectedPath dissectedPath = dissect(path);
+ s.push(dissectedPath.root);
- StringTokenizer tok = new StringTokenizer(dissect[1], File.separator);
+ final StringTokenizer tok = new StringTokenizer(dissectedPath.remainingPath, File.separator);
while (tok.hasMoreTokens()) {
String thisToken = tok.nextToken();
if (".".equals(thisToken)) {
@@@ -574,51 -577,53 +574,53 @@@
/**
* Dissect the specified absolute path.
-- *
- * @param path the path to dissect.
- * @return String[] {root, remaining path}.
- * @throws NullPointerException if path is null.
++ *
+ * @param path
+ * the path to dissect.
+ * @return {@link DissectedPath}
+ * @throws java.lang.NullPointerException
+ * if path is null.
* @since Ant 1.7
*/
- private static String[] dissect(String path) {
- char sep = File.separatorChar;
- path = path.replace('/', sep).replace('\\', sep);
-
- /* // make sure we are dealing with an absolute path
- * if (!isAbsolutePath(path)) {
- * throw new BuildException(path + " is not an absolute path");
- * }
- */
- String root = null;
- int colon = path.indexOf(':');
- if (colon > 0) { // && (ON_DOS || ON_NETWARE)) {
-
- int next = colon + 1;
- root = path.substring(0, next);
- char[] ca = path.toCharArray();
- root += sep;
- // remove the initial separator; the root has it.
- next = (ca[next] == sep) ? next + 1 : next;
-
- StringBuffer sbPath = new StringBuffer();
- // Eliminate consecutive slashes after the drive spec:
- for (int i = next; i < ca.length; i++) {
- if (ca[i] != sep || ca[i - 1] != sep) {
- sbPath.append(ca[i]);
+ private static DissectedPath dissect(final String path) {
+ final char sep = File.separatorChar;
+ final String pathToDissect = path.replace('/', sep).replace('\\', sep).trim();
+
+ // check if the path starts with a filesystem root
+ final File[] filesystemRoots = File.listRoots();
+ if (filesystemRoots != null) {
+ for (final File filesystemRoot : filesystemRoots) {
+ if (pathToDissect.startsWith(filesystemRoot.getPath())) {
+ // filesystem root is the root and the rest of the path is the "remaining path"
+ final String root = filesystemRoot.getPath();
+ final String rest = pathToDissect.substring(root.length());
+ final StringBuffer sbPath = new StringBuffer();
+ // Eliminate consecutive slashes after the drive spec:
+ for (int i = 0; i < rest.length(); i++) {
+ final char currentChar = rest.charAt(i);
+ if (i == 0) {
+ sbPath.append(currentChar);
+ continue;
+ }
+ final char previousChar = rest.charAt(i -1);
+ if (currentChar != sep || previousChar != sep) {
+ sbPath.append(currentChar);
+ }
+ }
+ return new DissectedPath(root, sbPath.toString());
}
}
- path = sbPath.toString();
- } else if (path.length() > 1 && path.charAt(1) == sep) {
- // UNC drive
- int nextsep = path.indexOf(sep, 2);
- nextsep = path.indexOf(sep, nextsep + 1);
- root = (nextsep > 2) ? path.substring(0, nextsep + 1) : path;
- path = path.substring(root.length());
- } else {
- root = File.separator;
- path = path.substring(1);
}
- return new String[] {root, path};
+ // UNC drive
+ if (pathToDissect.length() > 1 && pathToDissect.charAt(1) == sep) {
+ int nextsep = pathToDissect.indexOf(sep, 2);
+ nextsep = pathToDissect.indexOf(sep, nextsep + 1);
+ final String root = (nextsep > 2) ? pathToDissect.substring(0, nextsep + 1) : pathToDissect;
+ final String rest = pathToDissect.substring(root.length());
+ return new DissectedPath(root, rest);
+ }
+
+ return new DissectedPath(File.separator, pathToDissect.substring(1));
}
/**
[09/15] ant-ivy git commit: Make Java 8 doclint happy;
adjust javadoc Ant target; remove connection to svn from build.xml
Posted by jh...@apache.org.
Make Java 8 doclint happy; adjust javadoc Ant target; remove connection to svn from build.xml
Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/baf03a91
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/baf03a91
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/baf03a91
Branch: refs/heads/master
Commit: baf03a919c75822d1dcdaa7ffd460ec635b6a50f
Parents: 6c92f32
Author: twogee <g....@gmail.com>
Authored: Sun May 28 11:30:37 2017 +0200
Committer: twogee <g....@gmail.com>
Committed: Sun May 28 11:40:55 2017 +0200
----------------------------------------------------------------------
build.xml | 405 ++++++++++---------
src/java/org/apache/ivy/Ivy.java | 50 +--
src/java/org/apache/ivy/Ivy14.java | 8 +-
.../org/apache/ivy/ant/AntBuildTrigger.java | 10 +-
src/java/org/apache/ivy/ant/IvyAntSettings.java | 7 +-
src/java/org/apache/ivy/ant/IvyBuildList.java | 10 +-
src/java/org/apache/ivy/ant/IvyPublish.java | 2 +
src/java/org/apache/ivy/ant/IvyResolve.java | 1 +
src/java/org/apache/ivy/ant/IvyRetrieve.java | 12 +-
src/java/org/apache/ivy/ant/IvyTask.java | 4 +-
src/java/org/apache/ivy/core/IvyContext.java | 26 +-
.../apache/ivy/core/RelativeUrlResolver.java | 9 +-
.../apache/ivy/core/cache/ArtifactOrigin.java | 15 +-
.../cache/DefaultRepositoryCacheManager.java | 38 +-
.../org/apache/ivy/core/check/CheckEngine.java | 4 +
.../apache/ivy/core/deliver/DeliverEngine.java | 8 +-
.../apache/ivy/core/deliver/DeliverOptions.java | 31 +-
.../org/apache/ivy/core/event/IvyEvent.java | 24 +-
.../apache/ivy/core/event/IvyEventFilter.java | 9 +-
.../descriptor/DefaultDependencyDescriptor.java | 36 +-
.../descriptor/DefaultModuleDescriptor.java | 21 +-
.../DependencyArtifactDescriptor.java | 22 +-
.../module/descriptor/DependencyDescriptor.java | 24 +-
.../module/descriptor/ExtendsDescriptor.java | 32 +-
.../module/descriptor/ModuleDescriptor.java | 133 +++---
.../apache/ivy/core/module/id/ArtifactId.java | 4 +-
.../ivy/core/module/id/MatcherLookup.java | 22 +-
.../apache/ivy/core/publish/PublishEngine.java | 7 +
.../core/report/ConfigurationResolveReport.java | 25 +-
.../apache/ivy/core/report/DownloadStatus.java | 3 +-
.../apache/ivy/core/report/ResolveReport.java | 22 +-
.../org/apache/ivy/core/resolve/IvyNode.java | 57 ++-
.../apache/ivy/core/resolve/IvyNodeCallers.java | 3 +-
.../ivy/core/resolve/IvyNodeEviction.java | 10 +-
.../apache/ivy/core/resolve/ResolveEngine.java | 47 ++-
.../apache/ivy/core/resolve/ResolveOptions.java | 13 +-
.../org/apache/ivy/core/resolve/VisitNode.java | 22 +-
.../ivy/core/retrieve/RetrieveEngine.java | 9 +-
.../ivy/core/retrieve/RetrieveReport.java | 10 +
.../apache/ivy/core/search/SearchEngine.java | 20 +-
.../apache/ivy/core/settings/IvySettings.java | 33 +-
.../core/sort/CollectionOfModulesToSort.java | 6 +-
.../ivy/core/sort/ModuleDescriptorSorter.java | 14 +-
.../org/apache/ivy/core/sort/ModuleInSort.java | 17 +-
.../apache/ivy/osgi/core/BundleInfoAdapter.java | 7 +-
.../apache/ivy/osgi/util/DelegatingHandler.java | 108 +++--
.../circular/CircularDependencyHelper.java | 5 +-
.../LatestCompatibleConflictManager.java | 16 +-
.../plugins/latest/WorkspaceLatestStrategy.java | 4 +-
.../ivy/plugins/lock/FileBasedLockStrategy.java | 19 +-
.../apache/ivy/plugins/lock/LockStrategy.java | 11 +-
.../matcher/ExactOrRegexpPatternMatcher.java | 5 +-
.../plugins/matcher/ExactPatternMatcher.java | 3 +-
.../ivy/plugins/matcher/GlobPatternMatcher.java | 10 +-
.../ivy/plugins/matcher/PatternMatcher.java | 7 +-
.../plugins/parser/ModuleDescriptorParser.java | 8 +-
.../ivy/plugins/parser/ParserSettings.java | 2 +-
.../parser/m2/PomModuleDescriptorParser.java | 12 +-
.../apache/ivy/plugins/parser/m2/PomReader.java | 3 +
.../parser/xml/XmlModuleDescriptorParser.java | 60 ++-
.../parser/xml/XmlModuleDescriptorUpdater.java | 17 +-
.../ivy/plugins/report/XmlReportParser.java | 2 +
.../ivy/plugins/repository/Repository.java | 45 +--
.../apache/ivy/plugins/repository/Resource.java | 12 +-
.../ivy/plugins/repository/TransferEvent.java | 36 +-
.../ssh/AbstractSshBasedRepository.java | 13 +-
.../ivy/plugins/repository/ssh/SshCache.java | 22 +-
.../plugins/repository/ssh/SshRepository.java | 25 +-
.../plugins/repository/vfs/VfsRepository.java | 14 +-
.../ivy/plugins/repository/vfs/VfsResource.java | 16 +-
.../repository/vsftp/VsftpRepository.java | 9 +-
.../resolver/AbstractSshBasedResolver.java | 16 +-
.../plugins/resolver/DependencyResolver.java | 46 ++-
.../ivy/plugins/resolver/SshResolver.java | 16 +-
.../resolver/WorkspaceChainResolver.java | 6 +-
.../resolver/packager/PackagerCacheEntry.java | 12 +-
.../resolver/packager/PackagerResolver.java | 27 +-
.../ivy/plugins/version/VersionMatcher.java | 14 +-
src/java/org/apache/ivy/util/FileUtil.java | 57 ++-
src/java/org/apache/ivy/util/StringUtils.java | 11 +-
src/java/org/apache/ivy/util/XMLHelper.java | 21 +-
.../apache/ivy/util/filter/FilterHelper.java | 16 +-
.../org/apache/ivy/util/url/URLHandler.java | 51 +--
.../apache/ivy/util/url/URLHandlerRegistry.java | 2 +-
84 files changed, 1151 insertions(+), 920 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index d6f50b5..e16296c 100644
--- a/build.xml
+++ b/build.xml
@@ -18,50 +18,50 @@
-->
<project name="ivy" default="coverage-report" xmlns:ivy="antlib:org.apache.ivy.ant">
- <property environment="env" />
- <property file="version.properties" />
- <property file="build.properties" />
+ <property environment="env"/>
+ <property file="version.properties"/>
+ <property file="build.properties"/>
- <property name="final.name" value="ivy.jar" />
+ <property name="final.name" value="ivy.jar"/>
<target name="init-ivy-user-home" unless="ivy.use.local.home">
<condition property="ivy.home" value="${env.IVY_HOME}">
- <isset property="env.IVY_HOME" />
+ <isset property="env.IVY_HOME"/>
</condition>
- <property name="ivy.home" value="${user.home}/.ivy2" />
+ <property name="ivy.home" value="${user.home}/.ivy2"/>
</target>
<target name="init-ivy-local-home" if="ivy.use.local.home">
- <property name="ivy.home" value="${basedir}/.ivy2" />
+ <property name="ivy.home" value="${basedir}/.ivy2"/>
</target>
- <target name="init-ivy-home" depends="init-ivy-user-home, init-ivy-local-home" />
+ <target name="init-ivy-home" depends="init-ivy-user-home,init-ivy-local-home"/>
- <target name="init-ivy" depends="compile-bootstrap, init-ivy-home">
+ <target name="init-ivy" depends="compile-bootstrap,init-ivy-home">
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant">
<classpath>
- <pathelement location="${core.classes.build.dir}" />
- <pathelement location="${bootstrap.classes.build.dir}" />
+ <pathelement location="${core.classes.build.dir}"/>
+ <pathelement location="${bootstrap.classes.build.dir}"/>
</classpath>
</taskdef>
- <ivy:configure override="true" />
+ <ivy:configure override="true"/>
</target>
- <target name="install" depends="init-ivy-home, jar"
+ <target name="install" depends="init-ivy-home,jar"
description="build Ivy and install it in Ivy user home for builds using Ivy user home to load Ivy jar">
- <property name="ivy.jar.file" value="${ivy.home}/jars/ivy.jar" />
- <copy file="${artifacts.build.dir}/jars/${final.name}" tofile="${ivy.jar.file}" />
+ <property name="ivy.jar.file" value="${ivy.home}/jars/ivy.jar"/>
+ <copy file="${artifacts.build.dir}/jars/${final.name}" tofile="${ivy.jar.file}"/>
</target>
- <target name="install-ant" depends="init-ivy-home, jar"
+ <target name="install-ant" depends="init-ivy-home,jar"
description="build Ivy and install it in Ant home lib">
<condition property="ant.home" value="${env.ANT_HOME}">
- <isset property="env.ANT_HOME" />
+ <isset property="env.ANT_HOME"/>
</condition>
- <fail unless="ant.home" message="ANT_HOME environment variable or ant.home property required" />
- <copy file="${artifacts.build.dir}/jars/${final.name}" tofile="${ant.home}/lib/ivy.jar" />
+ <fail unless="ant.home" message="ANT_HOME environment variable or ant.home property required"/>
+ <copy file="${artifacts.build.dir}/jars/${final.name}" tofile="${ant.home}/lib/ivy.jar"/>
</target>
<!-- =================================================================
@@ -70,111 +70,111 @@
<target name="init">
<path id="lib.classpath">
<fileset dir="${lib.dir}">
- <include name="*.jar" />
+ <include name="*.jar"/>
</fileset>
</path>
<path id="build.bootstrap.classpath">
- <pathelement location="${core.classes.build.dir}" />
+ <pathelement location="${core.classes.build.dir}"/>
</path>
<path id="build.ant.classpath">
- <pathelement location="${core.classes.build.dir}" />
- <path refid="lib.classpath" />
+ <pathelement location="${core.classes.build.dir}"/>
+ <path refid="lib.classpath"/>
</path>
<path id="build.optional.classpath">
- <path refid="build.ant.classpath" />
+ <path refid="build.ant.classpath"/>
</path>
<path id="run.classpath">
- <pathelement location="${core.classes.build.dir}" />
- <pathelement location="${ant.classes.build.dir}" />
- <pathelement location="${optional.classes.build.dir}" />
- <path refid="lib.classpath" />
+ <pathelement location="${core.classes.build.dir}"/>
+ <pathelement location="${ant.classes.build.dir}"/>
+ <pathelement location="${optional.classes.build.dir}"/>
+ <path refid="lib.classpath"/>
</path>
<path id="test.classpath">
- <pathelement location="${coverage.classes.dir}" />
+ <pathelement location="${coverage.classes.dir}"/>
<fileset dir="${lib.dir}">
- <include name="*.jar" />
- <exclude name="ant.jar" />
- <exclude name="ant-launcher.jar" />
+ <include name="*.jar"/>
+ <exclude name="ant.jar"/>
+ <exclude name="ant-launcher.jar"/>
<exclude name="ant-nodeps.jar"/>
<exclude name="ant-trax.jar"/>
</fileset>
- <pathelement location="${core.classes.build.dir}" />
- <pathelement location="${ant.classes.build.dir}" />
- <pathelement location="${optional.classes.build.dir}" />
- <pathelement path="${test.build.dir}" />
+ <pathelement location="${core.classes.build.dir}"/>
+ <pathelement location="${ant.classes.build.dir}"/>
+ <pathelement location="${optional.classes.build.dir}"/>
+ <pathelement path="${test.build.dir}"/>
</path>
</target>
<target name="prepare" depends="init">
- <mkdir dir="${classes.build.dir}" />
- <mkdir dir="${core.classes.build.dir}" />
- <mkdir dir="${bootstrap.classes.build.dir}" />
- <mkdir dir="${ant.classes.build.dir}" />
- <mkdir dir="${optional.classes.build.dir}" />
- <mkdir dir="${all.classes.build.dir}" />
- <mkdir dir="${test.build.dir}" />
- <mkdir dir="${artifacts.build.dir}" />
- <mkdir dir="${test.report.dir}" />
- <mkdir dir="${ivy.report.dir}" />
+ <mkdir dir="${classes.build.dir}"/>
+ <mkdir dir="${core.classes.build.dir}"/>
+ <mkdir dir="${bootstrap.classes.build.dir}"/>
+ <mkdir dir="${ant.classes.build.dir}"/>
+ <mkdir dir="${optional.classes.build.dir}"/>
+ <mkdir dir="${all.classes.build.dir}"/>
+ <mkdir dir="${test.build.dir}"/>
+ <mkdir dir="${artifacts.build.dir}"/>
+ <mkdir dir="${test.report.dir}"/>
+ <mkdir dir="${ivy.report.dir}"/>
</target>
<target name="clean" description="delete all generated files keeping sources only">
- <delete dir="${classes.build.dir}" />
- <delete dir="${test.build.dir}" />
- <delete dir="${artifacts.build.dir}" />
- <delete dir="${test.report.dir}" />
- <delete dir="${javadoc.build.dir}" />
- <delete dir="${doc.build.dir}" />
- <delete dir="${build.dir}" />
+ <delete dir="${classes.build.dir}"/>
+ <delete dir="${test.build.dir}"/>
+ <delete dir="${artifacts.build.dir}"/>
+ <delete dir="${test.report.dir}"/>
+ <delete dir="${javadoc.build.dir}"/>
+ <delete dir="${doc.build.dir}"/>
+ <delete dir="${build.dir}"/>
</target>
<target name="clean-lib">
- <delete dir="${lib.dir}" />
+ <delete dir="${lib.dir}"/>
</target>
<target name="clean-ivy-cache" depends="init-ivy-home">
- <delete dir="${ivy.home}/cache" />
+ <delete dir="${ivy.home}/cache"/>
</target>
<target name="clean-ivy-home" depends="init-ivy-home">
- <delete dir="${ivy.home}" />
+ <delete dir="${ivy.home}"/>
</target>
<target name="clean-examples" description="clean all examples">
<subant target="clean" failonerror="false">
- <fileset dir="${example.dir}" includes="**/build.xml" />
+ <fileset dir="${example.dir}" includes="**/build.xml"/>
</subant>
</target>
- <target name="clean-all" depends="clean, clean-lib, clean-examples" />
+ <target name="clean-all" depends="clean-examples,clean,clean-lib"/>
<target name="/noresolve" description="use to skip dependency resolution">
- <property name="no.resolve" value="true" />
+ <property name="no.resolve" value="true"/>
</target>
<target name="/notest" description="use to skip tests">
- <property name="skip.test" value="true" />
+ <property name="skip.test" value="true"/>
</target>
<target name="/nojavadoc" description="use to skip javadoc">
- <property name="skip.javadoc" value="true" />
+ <property name="skip.javadoc" value="true"/>
</target>
<target name="/localivy" description="use a local ivy home">
- <property name="ivy.use.local.home" value="true" />
+ <property name="ivy.use.local.home" value="true"/>
</target>
<target name="/offline" depends="/noresolve" description="use to indicate no internet connection is available">
- <property name="offline" value="true" />
+ <property name="offline" value="true"/>
</target>
<target name="default-version">
<tstamp>
- <format property="pubdate" pattern="yyyyMMddHHmmss" />
+ <format property="pubdate" pattern="yyyyMMddHHmmss"/>
</tstamp>
- <property name="version.prefix" value="${target.ivy.version}-local-" />
- <property name="build.version" value="${version.prefix}${pubdate}" />
- <property name="bundle.version" value="${target.ivy.bundle.version}.${target.ivy.bundle.version.qualifier}${pubdate}" />
+ <property name="version.prefix" value="${target.ivy.version}-local-"/>
+ <property name="build.version" value="${version.prefix}${pubdate}"/>
+ <property name="bundle.version" value="${target.ivy.bundle.version}.${target.ivy.bundle.version.qualifier}${pubdate}"/>
</target>
<!-- =================================================================
@@ -192,30 +192,30 @@
target="${ivy.minimum.javaversion}"
debug="${debug.mode}"
includeantruntime="no">
- <excludesfile name="ant.patterns" />
- <excludesfile name="optional.patterns" />
+ <excludesfile name="ant.patterns"/>
+ <excludesfile name="optional.patterns"/>
</javac>
<copy todir="${core.classes.build.dir}" includeEmptyDirs="false">
<fileset dir="${src.dir}">
- <exclude name="**/*.java" />
- <excludesfile name="ant.patterns" />
- <excludesfile name="optional.patterns" />
+ <exclude name="**/*.java"/>
+ <excludesfile name="ant.patterns"/>
+ <excludesfile name="optional.patterns"/>
</fileset>
</copy>
<!-- copy settings files for backward compatibility with ivyconf naming -->
<copy file="${core.classes.build.dir}/org/apache/ivy/core/settings/ivysettings-local.xml"
- tofile="${core.classes.build.dir}/org/apache/ivy/core/settings/ivyconf-local.xml" />
+ tofile="${core.classes.build.dir}/org/apache/ivy/core/settings/ivyconf-local.xml"/>
<copy file="${core.classes.build.dir}/org/apache/ivy/core/settings/ivysettings-default-chain.xml"
- tofile="${core.classes.build.dir}/org/apache/ivy/core/settings/ivyconf-default-chain.xml" />
+ tofile="${core.classes.build.dir}/org/apache/ivy/core/settings/ivyconf-default-chain.xml"/>
<copy file="${core.classes.build.dir}/org/apache/ivy/core/settings/ivysettings-main-chain.xml"
- tofile="${core.classes.build.dir}/org/apache/ivy/core/settings/ivyconf-main-chain.xml" />
+ tofile="${core.classes.build.dir}/org/apache/ivy/core/settings/ivyconf-main-chain.xml"/>
<copy file="${core.classes.build.dir}/org/apache/ivy/core/settings/ivysettings-public.xml"
- tofile="${core.classes.build.dir}/org/apache/ivy/core/settings/ivyconf-public.xml" />
+ tofile="${core.classes.build.dir}/org/apache/ivy/core/settings/ivyconf-public.xml"/>
<copy file="${core.classes.build.dir}/org/apache/ivy/core/settings/ivysettings-shared.xml"
- tofile="${core.classes.build.dir}/org/apache/ivy/core/settings/ivyconf-shared.xml" />
+ tofile="${core.classes.build.dir}/org/apache/ivy/core/settings/ivyconf-shared.xml"/>
<copy file="${core.classes.build.dir}/org/apache/ivy/core/settings/ivysettings.xml"
- tofile="${core.classes.build.dir}/org/apache/ivy/core/settings/ivyconf.xml" />
+ tofile="${core.classes.build.dir}/org/apache/ivy/core/settings/ivyconf.xml"/>
</target>
<!-- Build the Ant tasks with the current Ant runtime -->
@@ -228,18 +228,18 @@
target="${ivy.minimum.javaversion}"
debug="${debug.mode}"
includeantruntime="yes">
- <includesfile name="ant.patterns" />
+ <includesfile name="ant.patterns"/>
</javac>
<copy todir="${bootstrap.classes.build.dir}" includeEmptyDirs="false">
<fileset dir="${src.dir}">
- <includesfile name="ant.patterns" />
- <exclude name="**/*.java" />
+ <includesfile name="ant.patterns"/>
+ <exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<!-- Build the Ant tasks with the minimal Ant runtime -->
- <target name="compile-ant" depends="compile-core, resolve">
+ <target name="compile-ant" depends="compile-core,resolve">
<javac srcdir="${src.dir}"
destdir="${ant.classes.build.dir}"
sourcepath=""
@@ -248,21 +248,21 @@
target="${ivy.minimum.javaversion}"
debug="${debug.mode}"
includeantruntime="no">
- <includesfile name="ant.patterns" />
+ <includesfile name="ant.patterns"/>
</javac>
<copy todir="${ant.classes.build.dir}" includeEmptyDirs="false">
<fileset dir="${src.dir}">
- <includesfile name="ant.patterns" />
- <exclude name="**/*.java" />
+ <includesfile name="ant.patterns"/>
+ <exclude name="**/*.java"/>
</fileset>
</copy>
<!-- copy antlib for backward compatibility with fr.jayasoft.ivy package -->
<copy file="${ant.classes.build.dir}/org/apache/ivy/ant/antlib.xml"
- todir="${ant.classes.build.dir}/fr/jayasoft/ivy/ant" />
+ todir="${ant.classes.build.dir}/fr/jayasoft/ivy/ant"/>
</target>
- <target name="compile-optional" depends="compile-ant, resolve">
+ <target name="compile-optional" depends="compile-ant,resolve">
<javac srcdir="${src.dir}"
destdir="${optional.classes.build.dir}"
sourcepath=""
@@ -271,13 +271,13 @@
target="${ivy.minimum.javaversion}"
debug="${debug.mode}"
includeantruntime="no">
- <includesfile name="optional.patterns" />
- <includesfile name="ant.patterns" />
+ <includesfile name="optional.patterns"/>
+ <includesfile name="ant.patterns"/>
</javac>
<copy todir="${core.classes.build.dir}" includeEmptyDirs="false">
<fileset dir="${src.dir}">
- <includesfile name="optional.patterns" />
- <exclude name="**/*.java" />
+ <includesfile name="optional.patterns"/>
+ <exclude name="**/*.java"/>
</fileset>
</copy>
</target>
@@ -285,10 +285,10 @@
<!-- =================================================================
Create the two jar files (Ivy core and Ivy core + Ant tasks)
================================================================= -->
- <target name="jar" depends="compile-optional, default-version" description="Create Jar files">
+ <target name="jar" depends="compile-optional,default-version" description="Create Jar files">
<!-- identify compiled ivy version -->
- <echo message="version=${build.version}${line.separator}" file="${core.classes.build.dir}/module.properties" append="true" />
- <echo message="date=${pubdate}${line.separator}" file="${core.classes.build.dir}/module.properties" append="true" />
+ <echo message="version=${build.version}${line.separator}" file="${core.classes.build.dir}/module.properties" append="true"/>
+ <echo message="date=${pubdate}${line.separator}" file="${core.classes.build.dir}/module.properties" append="true"/>
<mkdir dir="${artifacts.build.dir}/jars/"/>
@@ -299,38 +299,38 @@
-->
<copy file="${basedir}/META-INF/MANIFEST.MF" tofile="${artifacts.build.dir}/MANIFEST.MF">
<filterchain>
- <replaceregex pattern="Bundle-Version:.*" replace="Bundle-Version: ${bundle.version}" byline="true" />
+ <replaceregex pattern="Bundle-Version:.*" replace="Bundle-Version: ${bundle.version}" byline="true"/>
</filterchain>
</copy>
<copy todir="${all.classes.build.dir}">
- <fileset dir="${core.classes.build.dir}" />
- <fileset dir="${ant.classes.build.dir}" />
- <fileset dir="${optional.classes.build.dir}" />
+ <fileset dir="${core.classes.build.dir}"/>
+ <fileset dir="${ant.classes.build.dir}"/>
+ <fileset dir="${optional.classes.build.dir}"/>
</copy>
<jar destfile="${artifacts.build.dir}/jars/${final.name}"
manifest="${artifacts.build.dir}/MANIFEST.MF">
- <metainf dir="${basedir}" includes="LICENSE,NOTICE" />
+ <metainf dir="${basedir}" includes="LICENSE,NOTICE"/>
<manifest>
- <attribute name="Specification-Title" value="Apache Ivy with Ant tasks" />
- <attribute name="Specification-Version" value="${build.version}" />
- <attribute name="Specification-Vendor" value="Apache Software Foundation" />
- <attribute name="Implementation-Title" value="org.apache.ivy" />
- <attribute name="Implementation-Version" value="${build.version}" />
- <attribute name="Implementation-Vendor" value="Apache Software Foundation" />
- <attribute name="Implementation-Vendor-Id" value="org.apache" />
- <attribute name="Extension-name" value="org.apache.ivy" />
- <attribute name="Build-Version" value="${build.version}" />
+ <attribute name="Specification-Title" value="Apache Ivy with Ant tasks"/>
+ <attribute name="Specification-Version" value="${build.version}"/>
+ <attribute name="Specification-Vendor" value="Apache Software Foundation"/>
+ <attribute name="Implementation-Title" value="org.apache.ivy"/>
+ <attribute name="Implementation-Version" value="${build.version}"/>
+ <attribute name="Implementation-Vendor" value="Apache Software Foundation"/>
+ <attribute name="Implementation-Vendor-Id" value="org.apache"/>
+ <attribute name="Extension-name" value="org.apache.ivy"/>
+ <attribute name="Build-Version" value="${build.version}"/>
</manifest>
- <fileset dir="${all.classes.build.dir}" />
+ <fileset dir="${all.classes.build.dir}"/>
</jar>
<!-- copy main jar to ease its use as an OSGi bundle -->
<copy file="${artifacts.build.dir}/jars/${final.name}"
- tofile="${artifacts.build.dir}/org.apache.ivy_${bundle.version}.jar" />
+ tofile="${artifacts.build.dir}/org.apache.ivy_${bundle.version}.jar"/>
<!-- clean generated module properties file -->
- <delete file="${core.classes.build.dir}/module.properties" />
+ <delete file="${core.classes.build.dir}/module.properties"/>
</target>
<!-- =================================================================
@@ -339,75 +339,75 @@
<target name="publish-local" depends="jar,sources" description="publishes Ivy to Ivy local repository">
<ivy:publish resolver="local" pubrevision="${build.version}"
artifactsPattern="${artifacts.build.dir}/[type]s/[artifact].[ext]"
- forcedeliver="true" />
+ forcedeliver="true"/>
</target>
<!-- =================================================================
TESTS
================================================================= -->
<target name="build-custom-resolver-jar" depends="jar">
- <mkdir dir="${build.dir}/custom-classpath" />
+ <mkdir dir="${build.dir}/custom-classpath"/>
<javac srcdir="${basedir}/test/custom-classpath"
destdir="${build.dir}/custom-classpath"
classpathref="run.classpath"
source="${ivy.minimum.javaversion}"
target="${ivy.minimum.javaversion}"
debug="${debug.mode}"
- includeantruntime="no" />
+ includeantruntime="no"/>
<jar destfile="${test.dir}/org/apache/ivy/core/settings/custom-resolver.jar"
- basedir="${build.dir}/custom-classpath" />
+ basedir="${build.dir}/custom-classpath"/>
</target>
<target name="init-tests-offline" if="offline">
<fileset id="test.fileset" dir="${test.dir}">
- <include name="**/${test.class.pattern}.java" />
- <exclude name="**/Abstract*Test.java" />
- <not><contains text="remote.test" /></not>
+ <include name="**/${test.class.pattern}.java"/>
+ <exclude name="**/Abstract*Test.java"/>
+ <not><contains text="remote.test"/></not>
</fileset>
</target>
<target name="init-tests-online" unless="offline">
<fileset id="test.fileset" dir="${test.dir}">
- <include name="**/${test.class.pattern}.java" />
- <exclude name="**/Abstract*Test.java" />
+ <include name="**/${test.class.pattern}.java"/>
+ <exclude name="**/Abstract*Test.java"/>
</fileset>
</target>
- <target name="init-tests" depends="init-tests-offline, init-tests-online" />
+ <target name="init-tests" depends="init-tests-offline,init-tests-online"/>
<target name="emma" depends="jar" unless="skip.test">
<ivy:cachepath organisation="emma" module="emma" revision="2.0.5312"
inline="true" conf="default" pathid="emma.classpath"
- log="download-only" />
+ log="download-only"/>
<ivy:cachepath organisation="emma" module="emma_ant" revision="2.0.5312"
inline="true" conf="default" pathid="emma.ant.classpath" transitive="false"
- log="download-only" />
+ log="download-only"/>
<taskdef resource="emma_ant.properties">
- <classpath refid="emma.classpath" />
- <classpath refid="emma.ant.classpath" />
+ <classpath refid="emma.classpath"/>
+ <classpath refid="emma.ant.classpath"/>
</taskdef>
- <property name="emma.enabled" value="true" />
- <property name="coverage.dir" value="${build.dir}/coverage" />
- <property name="coverage.classes.dir" value="${coverage.dir}/classes" />
- <mkdir dir="${coverage.dir}" />
- <mkdir dir="${coverage.classes.dir}" />
+ <property name="emma.enabled" value="true"/>
+ <property name="coverage.dir" value="${build.dir}/coverage"/>
+ <property name="coverage.classes.dir" value="${coverage.dir}/classes"/>
+ <mkdir dir="${coverage.dir}"/>
+ <mkdir dir="${coverage.classes.dir}"/>
<emma enabled="${emma.enabled}">
<instr mode="copy"
destdir="${coverage.dir}/classes"
metadatafile="${coverage.dir}/metadata.emma">
<instrpath>
- <pathelement location="${core.classes.build.dir}" />
- <pathelement location="${ant.classes.build.dir}" />
- <pathelement location="${optional.classes.build.dir}" />
+ <pathelement location="${core.classes.build.dir}"/>
+ <pathelement location="${ant.classes.build.dir}"/>
+ <pathelement location="${optional.classes.build.dir}"/>
</instrpath>
</instr>
</emma>
- <delete file="${coverage.dir}/coverage.emma" />
+ <delete file="${coverage.dir}/coverage.emma"/>
<!-- add emma path to test path, because emma jars need to be available when running
instrumented classes -->
<ivy:addpath topath="test.classpath" first="true">
- <pathelement location="${coverage.dir}/classes" />
- <path refid="emma.classpath" />
+ <pathelement location="${coverage.dir}/classes"/>
+ <path refid="emma.classpath"/>
</ivy:addpath>
</target>
@@ -419,30 +419,30 @@
target="${ivy.minimum.javaversion}"
debug="${debug.mode}"
encoding="ISO-8859-1"
- includeantruntime="no" />
+ includeantruntime="no"/>
<copy todir="${test.build.dir}">
<fileset dir="${test.dir}">
- <exclude name="**/*.java" />
+ <exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="prepare-osgi-tests" depends="resolve" unless="skip.test">
- <ant dir="${basedir}/test/test-repo" target="generate-bundles" />
+ <ant dir="${basedir}/test/test-repo" target="generate-bundles"/>
</target>
<target name="prepare-test-jar-repositories" unless="skip.test">
- <mkdir dir="${basedir}/test/jar-repos" />
+ <mkdir dir="${basedir}/test/jar-repos"/>
<jar destfile="${basedir}/test/jar-repos/jarrepo1.jar" >
- <fileset dir="${basedir}/test/repositories/1" />
+ <fileset dir="${basedir}/test/repositories/1"/>
</jar>
<jar destfile="${basedir}/test/jar-repos/jarrepo1_subdir.jar">
- <fileset dir="${basedir}/test/repositories" includes="1/**/*" />
+ <fileset dir="${basedir}/test/repositories" includes="1/**/*"/>
</jar>
</target>
- <target name="test-internal" depends="build-test, init-tests, prepare-osgi-tests, prepare-test-jar-repositories" unless="skip.test">
- <mkdir dir="${test.xml.dir}" />
+ <target name="test-internal" depends="build-test,init-tests,prepare-osgi-tests,prepare-test-jar-repositories" unless="skip.test">
+ <mkdir dir="${test.xml.dir}"/>
<junit
haltonfailure="off"
@@ -455,25 +455,25 @@
dir="${basedir}"
fork="true">
<classpath>
- <path refid="test.classpath" />
+ <path refid="test.classpath"/>
<pathelement path="${ant.home}/lib/ant-nodeps.jar"/>
<pathelement path="${ant.home}/lib/ant-trax.jar"/>
</classpath>
<!-- pass the proxy properties to the forked junit process to use correct proxy -->
<syspropertyset>
- <propertyref prefix="http" />
- </syspropertyset>
- <jvmarg value="-Demma.coverage.out.file=${coverage.dir}/coverage.emma" />
- <jvmarg value="-Demma.coverage.out.merge=true" />
+ <propertyref prefix="http"/>
+ </syspropertyset>
+ <jvmarg value="-Demma.coverage.out.file=${coverage.dir}/coverage.emma"/>
+ <jvmarg value="-Demma.coverage.out.merge=true"/>
<!-- Added this to test IVY-65 -->
- <jvmarg value="-Duser.region=TR" />
- <jvmarg value="-Duser.language=tr" />
+ <jvmarg value="-Duser.region=TR"/>
+ <jvmarg value="-Duser.language=tr"/>
<formatter type="xml"/>
<batchtest todir="${test.xml.dir}">
- <fileset refid="test.fileset" />
+ <fileset refid="test.fileset"/>
</batchtest>
</junit>
</target>
@@ -481,7 +481,7 @@
<target name="x" depends="init,build-test">
<java classname="org.apache.ivy.plugins.resolver.FileSystemResolverTest">
<classpath>
- <path refid="test.classpath" />
+ <path refid="test.classpath"/>
<pathelement path="${ant.home}/lib/ant-nodeps.jar"/>
<pathelement path="${ant.home}/lib/ant-trax.jar"/>
</classpath>
@@ -490,7 +490,7 @@
<target name="test" depends="test-internal" description="Run the test">
<fail if="test.failed"
- message="At least one test has failed. See logs (in ${test.xml.dir}) for details (use the target test-report to run the test with a report)" />
+ message="At least one test has failed. See logs (in ${test.xml.dir}) for details (use the target test-report to run the test with a report)"/>
</target>
<!-- =================================================================
@@ -499,25 +499,25 @@
<target name="test-report" depends="test-internal" unless="skip.test">
<junitreport todir="${test.xml.dir}">
<fileset dir="${test.xml.dir}">
- <include name="TEST-*.xml" />
+ <include name="TEST-*.xml"/>
</fileset>
- <report format="frames" todir="${test.report.dir}" />
+ <report format="frames" todir="${test.report.dir}"/>
</junitreport>
<fail if="test.failed"
- message="At least one test has failed. See logs (in ${test.xml.dir}) or report (in ${test.report.dir})" />
+ message="At least one test has failed. See logs (in ${test.xml.dir}) or report (in ${test.report.dir})"/>
</target>
- <target name="coverage-report" depends="emma, test-report" unless="skip.test"
+ <target name="coverage-report" depends="emma,test-report" unless="skip.test"
description="run tests with instrumentation and generate coverage report">
- <mkdir dir="${coverage.report.dir}" />
+ <mkdir dir="${coverage.report.dir}"/>
<emma>
<report sourcepath="${src.dir}">
<fileset dir="${coverage.dir}">
- <include name="*.emma" />
+ <include name="*.emma"/>
</fileset>
- <txt outfile="${coverage.report.dir}/coverage.txt" />
- <html outfile="${coverage.report.dir}/coverage.html" />
+ <txt outfile="${coverage.report.dir}/coverage.txt"/>
+ <html outfile="${coverage.report.dir}/coverage.html"/>
</report>
</emma>
</target>
@@ -526,45 +526,51 @@
<ivy:report todir="${ivy.report.dir}"/>
</target>
- <target name="javadoc" unless="skip.javadoc">
- <javadoc destdir="${javadoc.build.dir}" useexternalfile="true">
- <fileset dir="${src.dir}" includes="**/*.java" />
+ <target name="javadoc" depends="init" unless="skip.javadoc">
+ <tstamp>
+ <format pattern="2007-yyyy" property="years"/>
+ </tstamp>
+ <property name="copyright" value="Copyright &copy;${years} The Apache Software Foundation, Licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0.txt">Apache License, Version 2.0</a>."/>
+ <property name="title" value="Apache Ivy&trade; dependency manager ${target.ivy.version} API"/>
+ <javadoc destdir="${javadoc.build.dir}"
+ useexternalfile="true"
+ windowtitle="Apache Ivy&trade;"
+ doctitle="${title}"
+ bottom="${copyright}"
+ classpathref="lib.classpath">
+ <fileset dir="${src.dir}" includes="**/*.java"/>
+ <arg value="-tag"/>
+ <arg value="pre:a:Precondition:"/>
</javadoc>
</target>
<target name="sources" depends="default-version" description="Create source archive files">
<mkdir dir="${artifacts.build.dir}/sources/"/>
<jar destfile="${artifacts.build.dir}/sources/${final.name}">
- <metainf dir="${basedir}" includes="LICENSE,NOTICE" />
+ <metainf dir="${basedir}" includes="LICENSE,NOTICE"/>
<manifest>
- <attribute name="Specification-Title" value="Apache Ivy Sources" />
- <attribute name="Specification-Version" value="${build.version}" />
- <attribute name="Specification-Vendor" value="Apache Software Foundation" />
+ <attribute name="Specification-Title" value="Apache Ivy Sources"/>
+ <attribute name="Specification-Version" value="${build.version}"/>
+ <attribute name="Specification-Vendor" value="Apache Software Foundation"/>
</manifest>
- <fileset dir="${src.dir}" />
+ <fileset dir="${src.dir}"/>
</jar>
</target>
<target name="fixcrlf">
<property name="eol.native.includes"
- value="**/*.html,**/*.json,**/*.java,**/*.xml,**/*.txt,**/*.MF,**/*.properties,**/*.patterns,**/*.pom,**/*.xsl,**/*.css" />
+ value="**/*.html,**/*.json,**/*.java,**/*.xml,**/*.txt,**/*.MF,**/*.properties,**/*.patterns,**/*.pom,**/*.xsl,**/*.css"/>
<property name="eol.native.excludes"
- value="build/**,bin/**,lib/**" />
+ value="build/**,bin/**,lib/**"/>
<fileset id="eol.native.fileset"
dir="${basedir}"
includes="${eol.native.includes}"
- excludes="${eol.native.excludes}" />
+ excludes="${eol.native.excludes}"/>
<fixcrlf srcdir="${basedir}"
includes="${eol.native.includes}"
- excludes="${eol.native.excludes}" />
- <apply executable="svn">
- <fileset refid="eol.native.fileset" />
- <arg value="propset" />
- <arg value="svn:eol-style" />
- <arg value='"native"' />
- </apply>
+ excludes="${eol.native.excludes}"/>
</target>
<!-- Checks Ivy codebase according to ${checkstyle.src.dir}/checkstyle-config -->
@@ -572,35 +578,35 @@
<ivy:cachepath organisation="checkstyle" module="checkstyle" revision="5.0"
inline="true" conf="default" pathid="checkstyle.classpath" transitive="true"
log="download-only"/>
- <taskdef resource="checkstyletask.properties" classpathref="checkstyle.classpath" />
+ <taskdef resource="checkstyletask.properties" classpathref="checkstyle.classpath"/>
- <mkdir dir="${checkstyle.report.dir}" />
+ <mkdir dir="${checkstyle.report.dir}"/>
<checkstyle config="${checkstyle.src.dir}/checkstyle-config"
failOnViolation="false" failureProperty="checkstyle.failed">
<classpath>
- <path refid="run.classpath" />
+ <path refid="run.classpath"/>
</classpath>
- <formatter type="xml" toFile="${checkstyle.report.dir}/checkstyle.xml" />
+ <formatter type="xml" toFile="${checkstyle.report.dir}/checkstyle.xml"/>
<fileset dir="${src.dir}">
- <include name="**/*.java" />
+ <include name="**/*.java"/>
</fileset>
<fileset dir="${example.dir}">
- <include name="**/*.java" />
+ <include name="**/*.java"/>
</fileset>
</checkstyle>
</target>
<target name="checkstyle" depends="checkstyle-internal" description="checks Ivy codebase according to ${checkstyle.src.dir}/checkstyle-config">
<fail if="checkstyle.failed"
- message="Checkstyle has errors. See report in ${checkstyle.report.dir}" />
+ message="Checkstyle has errors. See report in ${checkstyle.report.dir}"/>
</target>
<target name="checkstyle-report" depends="checkstyle-internal">
- <property name="checkstyle.basedir" location="${src.dir}" />
+ <property name="checkstyle.basedir" location="${src.dir}"/>
<xslt in="${checkstyle.report.dir}/checkstyle.xml"
style="${checkstyle.src.dir}/checkstyle-frames.xsl"
out="${checkstyle.report.dir}/output.txt">
- <param name="basedir" expression="${checkstyle.basedir}" />
+ <param name="basedir" expression="${checkstyle.basedir}"/>
</xslt>
</target>
@@ -625,8 +631,7 @@
property="findbugs.home"
value="${findbugs.download.to}/${findbugs.download.name}"
file="${findbugs.download.to}/${findbugs.download.name}/lib/findbugs.jar"
- description="Check if Findbugs is already installed."
- />
+ description="Check if Findbugs is already installed."/>
<!-- Findbugs: Running Findbugs -->
<property name="findbugs.reportdir"
@@ -655,7 +660,7 @@
</path>
<!-- Load the Findbugs AntTasks -->
- <taskdef uri="http://findbugs.sourceforge.net/" resource="edu/umd/cs/findbugs/anttask/tasks.properties" classpathref="findbugs.real.classpath" />
+ <taskdef uri="http://findbugs.sourceforge.net/" resource="edu/umd/cs/findbugs/anttask/tasks.properties" classpathref="findbugs.real.classpath"/>
<!-- Start Findbugs -->
<mkdir dir="${findbugs.reportdir}"/>
@@ -665,8 +670,8 @@
outputFile="${findbugs.reportdir}/${findbugs.raw}"
jvmargs="${findbugs.jvmargs}"
projectName="${Name} ${project.version}">
- <class location="${core.classes.build.dir}" />
- <sourcePath path="${src.dir}" />
+ <class location="${core.classes.build.dir}"/>
+ <sourcePath path="${src.dir}"/>
</fb:findbugs>
<!-- Generate (human) readable output -->
@@ -680,24 +685,24 @@
<!-- =================================================================
IDE SPECIFIC
================================================================= -->
- <available file="${basedir}/.classpath" property="eclipse.classpath.exists" />
+ <available file="${basedir}/.classpath" property="eclipse.classpath.exists"/>
<target name="check-eclipse-classpath-overwrite" if="eclipse.classpath.exists">
<input message=".classpath file already exists.${line.separator}Are you sure you want to overwrite it and loose your original file?"
- validargs="Y,N,y,n" addproperty="eclipse.classpath.confirm" />
+ validargs="Y,N,y,n" addproperty="eclipse.classpath.confirm"/>
<condition property="eclipse.classpath.abort">
- <equals arg1="${eclipse.classpath.confirm}" arg2="N" casesensitive="false" />
+ <equals arg1="${eclipse.classpath.confirm}" arg2="N" casesensitive="false"/>
</condition>
</target>
- <target name="eclipse-default" depends="resolve, check-eclipse-classpath-overwrite"
+ <target name="eclipse-default" depends="resolve,check-eclipse-classpath-overwrite"
unless="eclipse.classpath.abort"
description="creates a default .classpath for eclipse, using jars resolved by this ant build">
- <copy file="${basedir}/.classpath.default" tofile="${basedir}/.classpath" overwrite="true" />
+ <copy file="${basedir}/.classpath.default" tofile="${basedir}/.classpath" overwrite="true"/>
</target>
<target name="eclipse-ivyde" depends="check-eclipse-classpath-overwrite"
unless="eclipse.classpath.abort"
description="creates a .classpath for eclipse using Apache IvyDE version">
- <copy file="${basedir}/.classpath.ivyde" tofile="${basedir}/.classpath" overwrite="true" />
+ <copy file="${basedir}/.classpath.ivyde" tofile="${basedir}/.classpath" overwrite="true"/>
</target>
</project>
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/Ivy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/Ivy.java b/src/java/org/apache/ivy/Ivy.java
index 1a57ce9..8876739 100644
--- a/src/java/org/apache/ivy/Ivy.java
+++ b/src/java/org/apache/ivy/Ivy.java
@@ -76,6 +76,7 @@ import org.apache.ivy.util.MessageLoggerEngine;
* <a href="http://ant.apache.org/ivy/">Ivy</a> is a free java based dependency manager.
* <p>
* This class is the main class of Ivy, which acts as a Facade to all services offered by Ivy:
+ * </p>
* <ul>
* <li>resolve dependencies</li>
* <li>retrieve artifacts to a local location</li>
@@ -83,22 +84,21 @@ import org.apache.ivy.util.MessageLoggerEngine;
* <li>repository search and listing</li>
* </ul>
* Here is one typical usage:
- *
* <pre>
* Ivy ivy = Ivy.newInstance();
* ivy.configure(new URL("ivysettings.xml"));
* ivy.resolve(new URL("ivy.xml"));
* </pre>
- *
- * </p>
* <h2>Using Ivy engines directly</h2>
* <p>
* If the methods offered by the {@link Ivy} class are not flexible enough and you want to use Ivy
* engines directly, you need to call the methods within a single {@link IvyContext} associated to
- * the {@link Ivy} instance you use.<br/>
+ * the {@link Ivy} instance you use.
+ * </p>
+ * <p>
* To do so, it is recommended to use the {@link #execute(org.apache.ivy.Ivy.IvyCallback)} method
* like this:
- *
+ * </p>
* <pre>
* Ivy ivy = Ivy.newInstance();
* ivy.execute(new IvyCallback() {
@@ -111,19 +111,17 @@ import org.apache.ivy.util.MessageLoggerEngine;
* }
* });
* </pre>
- *
- * </p>
*/
public class Ivy {
/**
* Callback used to execute a set of Ivy related methods within an {@link IvyContext}.
- *
+ *
* @see Ivy#execute(org.apache.ivy.Ivy.IvyCallback)
*/
public static interface IvyCallback {
/**
* Executes Ivy related job within an {@link IvyContext}
- *
+ *
* @param ivy
* the {@link Ivy} instance to which this callback is related
* @param context
@@ -171,7 +169,7 @@ public class Ivy {
/**
* Returns the current version of Ivy, as displayed on the console when Ivy is initialized.
- *
+ *
* @return the current version of Ivy
*/
public static String getIvyVersion() {
@@ -180,9 +178,8 @@ public class Ivy {
/**
* Returns the date at which this version of Ivy has been built.
- * <p>
- * May be empty if unknown.
- *
+ * <p>May be empty if unknown.</p>
+ *
* @return the date at which this version of Ivy has been built
*/
public static String getIvyDate() {
@@ -191,7 +188,7 @@ public class Ivy {
/**
* Returns the URL at which Ivy web site can be found.
- *
+ *
* @return the URL at which Ivy web site can be found
*/
public static String getIvyHomeURL() {
@@ -218,7 +215,7 @@ public class Ivy {
/**
* True if this instance of Ivy has already been bound to its dependencies, false otherwise.
- *
+ *
* @see #bind()
*/
private boolean bound;
@@ -344,7 +341,7 @@ public class Ivy {
* <p>
* Alternatively you can use the {@link #pushContext()} and {@link #popContext()} methods, but
* this is not recommended:
- *
+ * </p>
* <pre>
* Object result = null;
* pushContext();
@@ -355,9 +352,7 @@ public class Ivy {
* }
* doSomethingWithResult(result);
* </pre>
- *
- * </p>
- *
+ *
* @param callback IvyCallback
* @return Object
*/
@@ -446,6 +441,9 @@ public class Ivy {
/**
* Configures Ivy with 1.4 compatible default settings
+ *
+ * @throws ParseException if something goes wrong
+ * @throws IOException if something goes wrong
*/
public void configureDefault14() throws ParseException, IOException {
pushContext();
@@ -594,13 +592,13 @@ public class Ivy {
/**
* Example of use: deliver(mrid, "1.5", "target/ivy/ivy-[revision].xml",
* DeliverOptions.newInstance(settings).setStatus("release").setValidate(false));
- *
+ *
* @param mrid ModuleRevisionId
* @param revision String
* @param destIvyPattern String
* @param options DeliverOptions
- * @throws IOException
- * @throws ParseException
+ * @throws IOException if something goes wrong
+ * @throws ParseException if something goes wrong
*/
public void deliver(ModuleRevisionId mrid, String revision, String destIvyPattern,
DeliverOptions options) throws IOException, ParseException {
@@ -633,6 +631,10 @@ public class Ivy {
/**
* Sorts the collection of IvyNode from the less dependent to the more dependent
+ *
+ * @param nodes Collection<IvyNode>
+ * @param options SortOptions
+ * @return List<IvyNode>
*/
public List<IvyNode> sortNodes(Collection<IvyNode> nodes, SortOptions options) {
pushContext();
@@ -647,7 +649,7 @@ public class Ivy {
* Sorts the given ModuleDescriptors from the less dependent to the more dependent. This sort
* ensures that a ModuleDescriptor is always found in the list before all ModuleDescriptors
* depending directly on it.
- *
+ *
* @param moduleDescriptors
* a Collection of ModuleDescriptor to sort
* @param options
@@ -779,6 +781,8 @@ public class Ivy {
/**
* Interrupts the current running operation in the given operating thread, no later than
* interruptTimeout milliseconds after the call
+ *
+ * @param operatingThread Thread
*/
@SuppressWarnings("deprecation")
public void interrupt(Thread operatingThread) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/Ivy14.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/Ivy14.java b/src/java/org/apache/ivy/Ivy14.java
index 0ae8b7a..28bc4ca 100644
--- a/src/java/org/apache/ivy/Ivy14.java
+++ b/src/java/org/apache/ivy/Ivy14.java
@@ -61,17 +61,17 @@ import org.apache.ivy.util.filter.FilterHelper;
* instance of this class.
* <p>
* For instance, where you were doing:
- *
+ *
* <pre>
* Ivy ivy = new Ivy();
* </pre>
- *
+ *
* do instead:
- *
+ *
* <pre>
* Ivy14 ivy = new Ivy14();
* </pre>
- *
+ *
* And that should be enough in most cases!
*/
public class Ivy14 {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/ant/AntBuildTrigger.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/AntBuildTrigger.java b/src/java/org/apache/ivy/ant/AntBuildTrigger.java
index 96f3813..1950333 100644
--- a/src/java/org/apache/ivy/ant/AntBuildTrigger.java
+++ b/src/java/org/apache/ivy/ant/AntBuildTrigger.java
@@ -38,14 +38,14 @@ import org.apache.tools.ant.taskdefs.Property;
* Triggers an ant build on an event occurrence.
* <p>
* Example of use:
- *
+ * </p>
* <pre>
- * <ant-build-trigger event="pre-resolve-dependency"
+ * <ant-build-trigger event="pre-resolve-dependency"
* filter="revision=latest.integration"
- * antfile="/path/to/[module]/build.xml"
+ * antfile="/path/to/[module]/build.xml"
* target="compile"/>
* </pre>
- *
+ * <p>
* Triggers an ant build for any dependency in asked in latest.integration, just before resolving
* the dependency.
* </p>
@@ -53,7 +53,7 @@ import org.apache.tools.ant.taskdefs.Property;
* The onlyonce property is used to tell if the ant build should be triggered only once, or several
* times in the same build.
* </p>
- *
+ *
* @see AntCallTrigger
* @since 1.4
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/ant/IvyAntSettings.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyAntSettings.java b/src/java/org/apache/ivy/ant/IvyAntSettings.java
index 64efc9e..9f169d6 100644
--- a/src/java/org/apache/ivy/ant/IvyAntSettings.java
+++ b/src/java/org/apache/ivy/ant/IvyAntSettings.java
@@ -107,7 +107,7 @@ public class IvyAntSettings extends DataType {
/**
* Returns the default ivy settings of this classloader. If it doesn't exist yet, a new one is
* created using the given project to back the VariableContainer.
- *
+ *
* @param task
* TODO add text.
* @return An IvySetting instance.
@@ -241,7 +241,8 @@ public class IvyAntSettings extends DataType {
/**
* Return the configured Ivy instance.
- *
+ *
+ * @param task ProjectComponent
* @return Returns the configured Ivy instance.
*/
public Ivy getConfiguredIvyInstance(ProjectComponent task) {
@@ -336,7 +337,7 @@ public class IvyAntSettings extends DataType {
/**
* Set file or url to its default value
- *
+ *
* @param variableContainer IvyVariableContainer
*/
private void defineDefaultSettingFile(IvyVariableContainer variableContainer,
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/ant/IvyBuildList.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyBuildList.java b/src/java/org/apache/ivy/ant/IvyBuildList.java
index 55cbe74..bdc9ab9 100644
--- a/src/java/org/apache/ivy/ant/IvyBuildList.java
+++ b/src/java/org/apache/ivy/ant/IvyBuildList.java
@@ -352,7 +352,7 @@ public class IvyBuildList extends IvyTask {
/**
* Returns a collection of ModuleDescriptors that are contained in the input collection of
* ModuleDescriptors and upon which the root module depends
- *
+ *
* @param mds
* input collection of ModuleDescriptors
* @param rootmds
@@ -393,7 +393,7 @@ public class IvyBuildList extends IvyTask {
* Adds the current node to the toKeep collection and then processes the each of the direct
* dependencies of this node that appear in the moduleIdMap (indicating that the dependency is
* part of this BuildList)
- *
+ *
* @param node
* the node to be processed
* @param toKeep
@@ -423,7 +423,7 @@ public class IvyBuildList extends IvyTask {
/**
* Returns a collection of ModuleDescriptors that are contained in the input collection of
* ModuleDescriptors which depends on the leaf module
- *
+ *
* @param mds
* input collection of ModuleDescriptors
* @param leafmds
@@ -461,7 +461,7 @@ public class IvyBuildList extends IvyTask {
/**
* Search in the moduleIdMap modules depending on node, add them to the toKeep set and process
* them recursively.
- *
+ *
* @param node
* the node to be processed
* @param toKeep
@@ -520,6 +520,7 @@ public class IvyBuildList extends IvyTask {
}
/**
+ * @return boolean
* @deprecated use {@link #getOnMissingDescriptor()} instead.
*/
@Deprecated
@@ -528,6 +529,7 @@ public class IvyBuildList extends IvyTask {
}
/**
+ * @param skipBuildFilesWithoutIvy boolean
* @deprecated use {@link #setOnMissingDescriptor(String)} instead.
*/
@Deprecated
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/ant/IvyPublish.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyPublish.java b/src/java/org/apache/ivy/ant/IvyPublish.java
index 1c2921b..9795231 100644
--- a/src/java/org/apache/ivy/ant/IvyPublish.java
+++ b/src/java/org/apache/ivy/ant/IvyPublish.java
@@ -98,6 +98,7 @@ public class IvyPublish extends IvyTask {
}
/**
+ * @return String
* @deprecated use {@link #getSrcivypattern()} instead.
*/
@Deprecated
@@ -106,6 +107,7 @@ public class IvyPublish extends IvyTask {
}
/**
+ * @param destivypattern String
* @deprecated use {@link #setSrcivypattern(String)} instead.
*/
@Deprecated
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/ant/IvyResolve.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyResolve.java b/src/java/org/apache/ivy/ant/IvyResolve.java
index 5a30ab5..8e42f71 100644
--- a/src/java/org/apache/ivy/ant/IvyResolve.java
+++ b/src/java/org/apache/ivy/ant/IvyResolve.java
@@ -193,6 +193,7 @@ public class IvyResolve extends IvyTask {
}
/**
+ * @param failureProperty String
* @deprecated Use {@link #setFailureProperty(String)} instead
*/
@Deprecated
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/ant/IvyRetrieve.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyRetrieve.java b/src/java/org/apache/ivy/ant/IvyRetrieve.java
index 20695d9..c783827 100644
--- a/src/java/org/apache/ivy/ant/IvyRetrieve.java
+++ b/src/java/org/apache/ivy/ant/IvyRetrieve.java
@@ -159,6 +159,8 @@ public class IvyRetrieve extends IvyPostResolveTask {
/**
* Option to create symlinks instead of copying.
+ *
+ * @param symlink boolean
*/
public void setSymlink(boolean symlink) {
this.symlink = symlink;
@@ -166,6 +168,8 @@ public class IvyRetrieve extends IvyPostResolveTask {
/**
* Option to create symlinks in one mass action, instead of separately.
+ *
+ * @param symlinkmass boolean
*/
public void setSymlinkmass(boolean symlinkmass) {
this.symlinkmass = symlinkmass;
@@ -185,9 +189,9 @@ public class IvyRetrieve extends IvyPostResolveTask {
/**
* Add a mapper to convert the file names.
- *
+ *
* @param mapper
- * a <code>Mapper</code> value.
+ * a Mapper value.
*/
public void addMapper(Mapper mapper) {
if (this.mapper != null) {
@@ -198,7 +202,7 @@ public class IvyRetrieve extends IvyPostResolveTask {
/**
* Add a nested filenamemapper.
- *
+ *
* @param fileNameMapper
* the mapper to add.
*/
@@ -210,7 +214,7 @@ public class IvyRetrieve extends IvyPostResolveTask {
/**
* Returns the path of the file relative to the given base directory.
- *
+ *
* @param base
* the parent directory to which the file must be evaluated.
* @param file
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/ant/IvyTask.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyTask.java b/src/java/org/apache/ivy/ant/IvyTask.java
index 42997d9..a421447 100644
--- a/src/java/org/apache/ivy/ant/IvyTask.java
+++ b/src/java/org/apache/ivy/ant/IvyTask.java
@@ -278,8 +278,8 @@ public abstract class IvyTask extends Task {
/**
* The real logic of task execution after project has been set in the context. MUST be
* implemented by subclasses
- *
- * @throws BuildException
+ *
+ * @throws BuildException if something goes wrong
*/
public abstract void doExecute() throws BuildException;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/IvyContext.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/IvyContext.java b/src/java/org/apache/ivy/core/IvyContext.java
index 4ff0f3b..ab73511 100644
--- a/src/java/org/apache/ivy/core/IvyContext.java
+++ b/src/java/org/apache/ivy/core/IvyContext.java
@@ -36,7 +36,7 @@ import org.apache.ivy.util.MessageLogger;
/**
* This class represents an execution context of an Ivy action. It contains several getters to
* retrieve information, like the used Ivy instance, the cache location...
- *
+ *
* @see IvyThread
*/
public class IvyContext {
@@ -90,7 +90,7 @@ public class IvyContext {
* {@link #popContext()} should usually be called when the job for which this context has been
* pushed is finished.
* </p>
- *
+ *
* @return the newly pushed context
*/
public static IvyContext pushNewContext() {
@@ -104,7 +104,7 @@ public class IvyContext {
* {@link #popContext()} should usually be called when the job for which this context has been
* pushed is finished.
* </p>
- *
+ *
* @return the newly pushed context
*/
public static IvyContext pushNewCopyContext() {
@@ -115,7 +115,7 @@ public class IvyContext {
* Changes the context associated with this thread. This is especially useful when launching a
* new thread, to associate it with the same context as the initial one. Do not forget to call
* {@link #popContext()} when done.
- *
+ *
* @param context
* the new context to use in this thread.
* @return the pushed context
@@ -129,7 +129,7 @@ public class IvyContext {
* Pops one context used with this thread. This is usually called after having finished a task
* for which a call to {@link #pushNewContext()} or {@link #pushContext(IvyContext)} was done
* prior to beginning the task.
- *
+ *
* @return the popped context
*/
public static IvyContext popContext() {
@@ -144,7 +144,7 @@ public class IvyContext {
* This methods does a similar job to {@link #peek(String)}, except that it considers the whole
* context stack and not only one instance.
* </p>
- *
+ *
* @param key
* context key for the string
* @return top object from the list (index 0) of the first context in the stack containing this
@@ -172,7 +172,7 @@ public class IvyContext {
* Then, or if no ivy method has been called, a default ivy instance is returned by this method,
* so that it never returns <code>null</code>.
* </p>
- *
+ *
* @return the current ivy instance
*/
public Ivy getIvy() {
@@ -187,7 +187,7 @@ public class IvyContext {
* If you want get a default Ivy instance in case no instance if currently associated, use
* {@link #getIvy()}.
* </p>
- *
+ *
* @return the current ivy instance, or <code>null</code> if there is no current ivy instance.
*/
public Ivy peekIvy() {
@@ -233,7 +233,7 @@ public class IvyContext {
/**
* Reads the first object from the list saved under given key in the context. If value under key
* represents non List object then a RuntimeException is thrown.
- *
+ *
* @param key
* context key for the string
* @return top object from the list (index 0) or null if no key or list empty
@@ -259,7 +259,7 @@ public class IvyContext {
/**
* Removes and returns first object from the list saved under given key in the context. If value
* under key represents non List object then a RuntimeException is thrown.
- *
+ *
* @param key
* context key for the string
* @return top object from the list (index 0) or null if no key or list empty
@@ -286,9 +286,11 @@ public class IvyContext {
* Removes and returns first object from the list saved under given key in the context but only
* if it equals the given expectedValue - if not a false value is returned. If value under key
* represents non List object then a RuntimeException is thrown.
- *
+ *
* @param key
* context key for the string
+ * @param expectedValue
+ * expected value of the key
* @return true if the r
*/
public boolean pop(String key, Object expectedValue) {
@@ -318,7 +320,7 @@ public class IvyContext {
* under key represents non List object then a RuntimeException is thrown. If no list exists
* under given key a new LinkedList is created. This is kept without WeakReference in opposite
* to the put() results.
- *
+ *
* @param key
* key context key for the string
* @param value
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/RelativeUrlResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/RelativeUrlResolver.java b/src/java/org/apache/ivy/core/RelativeUrlResolver.java
index abf6f01..701c4c5 100644
--- a/src/java/org/apache/ivy/core/RelativeUrlResolver.java
+++ b/src/java/org/apache/ivy/core/RelativeUrlResolver.java
@@ -28,19 +28,20 @@ public abstract class RelativeUrlResolver {
/**
* Resolve the url in the context of context.
- *
+ *
* @param context
* The URL of the resource containing the reference url
* @param url
* a relative or absolution url string
- * @throws MalformedURLException
+ * @return URL
+ * @throws MalformedURLException if url is wrong
*/
public abstract URL getURL(URL context, String url) throws MalformedURLException;
/**
* Resolve file or url path relatively to a context. file is considered first. If file is not
* defined, url will be considered.
- *
+ *
* @param context
* The URL of the resource containing the reference file or url
* @param file
@@ -48,7 +49,7 @@ public abstract class RelativeUrlResolver {
* @param url
* a relative or absolution url string
* @return the resulting url or null if failed and url are null.
- * @throws MalformedURLException
+ * @throws MalformedURLException if url is wrong
*/
public URL getURL(URL context, String file, String url) throws MalformedURLException {
if (file != null) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java b/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java
index 66dc5f5..7e397af 100644
--- a/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java
+++ b/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java
@@ -22,7 +22,7 @@ import org.apache.ivy.util.Checks;
/**
* This class contains information about the origin of an artifact.
- *
+ *
* @see org.apache.ivy.plugins.resolver.BasicResolver
* @see org.apache.ivy.plugins.resolver.util.ResolvedResource
*/
@@ -31,6 +31,9 @@ public class ArtifactOrigin {
/**
* ArtifactOrigin instance used when the origin is unknown.
+ *
+ * @param artifact ditto
+ * @return ArtifactOrigin
*/
public static final ArtifactOrigin unknown(Artifact artifact) {
return new ArtifactOrigin(artifact, false, UNKNOWN);
@@ -58,7 +61,7 @@ public class ArtifactOrigin {
/**
* Create a new instance
- *
+ *
* @param artifact
* the artifact pointed by this location. Must not be <code>null</code>.
* @param isLocal
@@ -77,7 +80,7 @@ public class ArtifactOrigin {
/**
* Is this resource local to this host, i.e. is it on the file system?
- *
+ *
* @return <code>boolean</code> value indicating if the resource is local.
*/
public boolean isLocal() {
@@ -86,7 +89,7 @@ public class ArtifactOrigin {
/**
* Return the location of the resource (normally a url)
- *
+ *
* @return the location of the resource
*/
public String getLocation() {
@@ -99,7 +102,7 @@ public class ArtifactOrigin {
/**
* Return the artifact that this location is pointing at.
- *
+ *
* @return the artifact that this location is pointing at.
*/
public Artifact getArtifact() {
@@ -109,7 +112,7 @@ public class ArtifactOrigin {
/**
* The last time the resource was checked to be up to date. Maybe <code>null</code> if this
* information is not actually used by in some case.
- *
+ *
* @return Long timestamp
*/
public Long getLastChecked() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/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 f659d87..ea01797 100644
--- a/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
+++ b/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
@@ -306,7 +306,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* True if this cache should check lastmodified date to know if ivy files are up to date.
- *
+ *
* @return boolean
*/
public boolean isCheckmodified() {
@@ -324,6 +324,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.
+ *
+ * @return boolean
*/
public boolean isUseOrigin() {
if (useOrigin == null) {
@@ -340,6 +342,9 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
* Returns a File object pointing to where the artifact can be found on the local file system.
* This is usually in the cache, but it can be directly in the repository if it is local and if
* the resolve has been done with useOrigin = true
+ *
+ * @param artifact Artifact
+ * @return File
*/
public File getArchiveFileInCache(Artifact artifact) {
ArtifactOrigin origin = getSavedArtifactOrigin(artifact);
@@ -350,6 +355,10 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
* Returns a File object pointing to where the artifact can be found on the local file system.
* This is usually in the cache, but it can be directly in the repository if it is local and if
* the resolve has been done with useOrigin = true
+ *
+ * @param artifact Artifact
+ * @param origin ArtifactOrigin
+ * @return File
*/
public File getArchiveFileInCache(Artifact artifact, ArtifactOrigin origin) {
File archive = new File(getRepositoryCacheRoot(), getArchivePathInCache(artifact, origin));
@@ -368,6 +377,11 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
* using or not the original location depending on the availability of origin information
* provided as parameter and the setting of useOrigin. If useOrigin is false, this method will
* always return the file in the cache.
+ *
+ * @param artifact Artifact
+ * @param origin ArtifactOrigin
+ * @param useOrigin boolean
+ * @return File
*/
private File getArchiveFileInCache(Artifact artifact, ArtifactOrigin origin, boolean useOrigin) {
if (useOrigin && !ArtifactOrigin.isUnknown(origin) && origin.isLocal()) {
@@ -390,7 +404,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Saves the information of which resolver was used to resolve a md, so that this info can be
* retrieve later (even after a jvm restart) by getSavedResolverName(ModuleDescriptor md)
- *
+ *
* @param md
* the module descriptor resolved
* @param name
@@ -406,7 +420,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Saves the information of which resolver was used to resolve a md, so that this info can be
* retrieve later (even after a jvm restart) by getSavedArtResolverName(ModuleDescriptor md)
- *
+ *
* @param md
* the module descriptor resolved
* @param metadataResolverName
@@ -573,7 +587,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Creates the unique prefix key that will reference the artifact within the properties.
- *
+ *
* @param artifact
* the artifact to create the unique key from. Cannot be null.
* @return the unique prefix key as a string.
@@ -588,7 +602,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Returns the key used to identify the location of the artifact.
- *
+ *
* @param artifact
* the artifact to generate the key from. Cannot be null.
* @return the key to be used to reference the artifact location.
@@ -600,7 +614,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Returns the key used to identify if the artifact is local.
- *
+ *
* @param artifact
* the artifact to generate the key from. Cannot be null.
* @return the key to be used to reference the artifact locality.
@@ -612,7 +626,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Returns the key used to identify the last time the artifact was checked to be up to date.
- *
+ *
* @param artifact
* the artifact to generate the key from. Cannot be null.
* @return the key to be used to reference the artifact's last check date.
@@ -624,7 +638,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Returns the key used to identify the existence of the remote artifact.
- *
+ *
* @param artifact
* the artifact to generate the key from. Cannot be null.
* @return the key to be used to reference the existence of the artifact.
@@ -636,7 +650,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Returns the key used to identify the original artifact.
- *
+ *
* @param artifact
* the artifact to generate the key from. Cannot be null.
* @return the key to be used to reference the original artifact.
@@ -786,7 +800,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Choose write module descriptor parser for a given moduleDescriptor
- *
+ *
* @param moduleDescriptorFile
* a given module descriptor
* @return ModuleDescriptorParser
@@ -1153,7 +1167,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Compute a SHA1 of the resource name, encoded in base64, so we can use it as a file name.
- *
+ *
* @param resource
* the resource which name will be hashed
* @return the hash
@@ -1169,7 +1183,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Check that a cached file can be considered up to date and thus not downloaded
- *
+ *
* @param archiveFile
* the file in the cache
* @param resource
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/check/CheckEngine.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/check/CheckEngine.java b/src/java/org/apache/ivy/core/check/CheckEngine.java
index 34d6323..8f85f4b 100644
--- a/src/java/org/apache/ivy/core/check/CheckEngine.java
+++ b/src/java/org/apache/ivy/core/check/CheckEngine.java
@@ -52,6 +52,10 @@ public class CheckEngine {
* are available in the corresponding resolver. Note that the check is not performed
* recursively, i.e. if a dependency has itself dependencies badly described or not available,
* this check will not discover it.
+ *
+ * @param ivyFile URL
+ * @param resolvername String
+ * @return boolean
*/
public boolean check(URL ivyFile, String resolvername) {
try {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/deliver/DeliverEngine.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/deliver/DeliverEngine.java b/src/java/org/apache/ivy/core/deliver/DeliverEngine.java
index 05ac1c7..11a843a 100644
--- a/src/java/org/apache/ivy/core/deliver/DeliverEngine.java
+++ b/src/java/org/apache/ivy/core/deliver/DeliverEngine.java
@@ -53,13 +53,15 @@ public class DeliverEngine {
* Delivers a resolved ivy file based upon last resolve call status. If resolve report file
* cannot be found in cache, then it throws an IllegalStateException (maybe resolve has not been
* called before ?).
- *
+ *
* @param revision
* the revision to which the module should be delivered
* @param destIvyPattern
* the pattern to which the delivered ivy file should be written
* @param options
* the options with which deliver should be done
+ * @throws IOException if something goes wrong
+ * @throws ParseException if something goes wrong
*/
public void deliver(String revision, String destIvyPattern, DeliverOptions options)
throws IOException, ParseException {
@@ -86,7 +88,7 @@ public class DeliverEngine {
* Delivers a resolved ivy file based upon last resolve call status. If resolve report file
* cannot be found in cache, then it throws an IllegalStateException (maybe resolve has not been
* called before ?).
- *
+ *
* @param mrid
* the module revision id of the module to deliver
* @param revision
@@ -95,6 +97,8 @@ public class DeliverEngine {
* the pattern to which the delivered ivy file should be written
* @param options
* the options with which deliver should be done
+ * @throws IOException if something goes wrong
+ * @throws ParseException if something goes wrong
*/
public void deliver(ModuleRevisionId mrid, String revision, String destIvyPattern,
DeliverOptions options) throws IOException, ParseException {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/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 6577b7a..05b70d5 100644
--- a/src/java/org/apache/ivy/core/deliver/DeliverOptions.java
+++ b/src/java/org/apache/ivy/core/deliver/DeliverOptions.java
@@ -55,7 +55,7 @@ public class DeliverOptions {
/**
* Returns an instance of DeliverOptions with options corresponding to default values taken from
* the given settings.
- *
+ *
* @param settings
* The settings to use to get default option values
* @return a DeliverOptions instance ready to be used or customized
@@ -74,6 +74,12 @@ public class DeliverOptions {
/**
* Creates an instance of DeliverOptions with all options explicitly set.
+ * @param status String
+ * @param pubDate Date
+ * @param pdrResolver PublishingDependencyRevisionResolver
+ * @param validate boolean
+ * @param resolveDynamicRevisions boolean
+ * @param confs String[]
*/
public DeliverOptions(String status, Date pubDate,
PublishingDependencyRevisionResolver pdrResolver, boolean validate,
@@ -93,7 +99,7 @@ public class DeliverOptions {
* PublishingDependencyRevisionResolver can then do the delivering work for the dependency and
* return the new (delivered) dependency info (with the delivered revision). Note that
* PublishingDependencyRevisionResolver is only called for each <b>direct</b> dependency.
- *
+ *
* @return the pdrResolver that will be used during deliver
*/
public PublishingDependencyRevisionResolver getPdrResolver() {
@@ -107,7 +113,8 @@ public class DeliverOptions {
* PublishingDependencyRevisionResolver can then do the delivering work for the dependency and
* return the new (delivered) dependency info (with the delivered revision). Note that
* PublishingDependencyRevisionResolver is only called for each <b>direct</b> dependency.
- *
+ *
+ * @param pdrResolver PublishingDependencyRevisionResolver
* @return the instance of DeliverOptions on which the method has been called, for easy method
* chaining
*/
@@ -155,7 +162,7 @@ public class DeliverOptions {
/**
* Returns the status to which the module should be delivered, or null if the current status
* should be kept.
- *
+ *
* @return the status to which the module should be delivered
*/
public String getStatus() {
@@ -165,7 +172,8 @@ public class DeliverOptions {
/**
* Sets the status to which the module should be delivered, use null if the current status
* should be kept.
- *
+ *
+ * @param status String
* @return the instance of DeliverOptions on which the method has been called, for easy method
* chaining
*/
@@ -176,7 +184,7 @@ public class DeliverOptions {
/**
* Returns the id of a previous resolve to use for delivering.
- *
+ *
* @return the id of a previous resolve
*/
public String getResolveId() {
@@ -185,7 +193,7 @@ public class DeliverOptions {
/**
* Sets the id of a previous resolve to use for delivering.
- *
+ *
* @param resolveId
* the id of a previous resolve
* @return the instance of DeliverOptions on which the method has been called, for easy method
@@ -199,7 +207,7 @@ 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 to deliver
*/
public String[] getConfs() {
@@ -208,7 +216,7 @@ public class DeliverOptions {
/**
* Sets the configurations to deliver.
- *
+ *
* @param confs
* the configurations to deliver
* @return the instance of DeliverOptions on which the method has been called, for easy method
@@ -222,7 +230,7 @@ public class DeliverOptions {
/**
* Returns the branch with which the Ivy file should be delivered, or <code>null</code> if
* branch info shouldn't be changed.
- *
+ *
* @return the branch with which the Ivy file should be delivered
*/
public String getPubBranch() {
@@ -231,7 +239,7 @@ public class DeliverOptions {
/**
* Sets the branch with which the Ivy file should be delivered.
- *
+ *
* @param pubBranch
* the branch with which the Ivy file should be delivered
* @return the instance of DeliverOptions on which the method has been called, for easy method
@@ -264,7 +272,6 @@ public class DeliverOptions {
return "status=" + status + " pubdate=" + pubdate + " validate=" + validate
+ " resolveDynamicRevisions=" + resolveDynamicRevisions + " merge=" + merge
+ " resolveId=" + resolveId + " pubBranch=" + pubBranch;
-
}
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/core/event/IvyEvent.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/event/IvyEvent.java b/src/java/org/apache/ivy/core/event/IvyEvent.java
index 18697a0..02ab78e 100644
--- a/src/java/org/apache/ivy/core/event/IvyEvent.java
+++ b/src/java/org/apache/ivy/core/event/IvyEvent.java
@@ -27,15 +27,19 @@ import org.apache.ivy.core.module.id.ModuleRevisionId;
import org.apache.ivy.util.StringUtils;
/**
+ * <p>
* The root of all ivy events Any ivy event knows which ivy instance triggered the event (the
* source) and also has a name and a map of attributes. The name of the event represents the event
* type, usually there is a one - one mapping between event names and IvyEvent subclass, even if
- * this is not mandatory. Example: pre-resolve pre-resolve-dependency post-download The map of
- * attributes is a Map from String keys to String values. It is especially useful to filter events,
- * and to get some of their essential data in some context where access to Java types is not easy
- * (in an ant build file, for example), Example: pre-resolve (organisation=foo, module=bar,
- * revision=1.0, conf=default) post-download (organisation=foo, module=bar, revision=1.0,
- * artifact=foo-test, type=jar, ext=jar)
+ * this is not mandatory. Example: <code>pre-resolve pre-resolve-dependency post-download</code>
+ * </p>
+ * <p>
+ * The map of attributes is a Map from String keys to String values. It is especially useful to
+ * filter events, and to get some of their essential data in some context where access to Java types
+ * is not easy (in an Ant build file, for example), Example: <code>pre-resolve (organisation=foo,
+ * module=bar, revision=1.0, conf=default) post-download (organisation=foo, module=bar,
+ * revision=1.0, artifact=foo-test, type=jar, ext=jar)</code>
+ * </p>
*/
public class IvyEvent {
private EventManager source;
@@ -51,7 +55,7 @@ public class IvyEvent {
/**
* Should only be called during event object construction, since events should be immutable
- *
+ *
* @param key ditto
* @param value ditto
*/
@@ -93,9 +97,9 @@ public class IvyEvent {
}
/**
- * Returns the attributes of this event, as a Map(String->String)
- *
- * @return the attributes of this event, as a Map(String->String)
+ * Returns the attributes of this event, as a Map(String,String)
+ *
+ * @return the attributes of this event, as a Map(String,String)
*/
public Map getAttributes() {
return new HashMap(attributes);
[06/15] ant-ivy git commit: Make Java 8 doclint happy;
adjust javadoc Ant target; remove connection to svn from build.xml
Posted by jh...@apache.org.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/plugins/version/VersionMatcher.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/version/VersionMatcher.java b/src/java/org/apache/ivy/plugins/version/VersionMatcher.java
index 41f9533..184b28e 100644
--- a/src/java/org/apache/ivy/plugins/version/VersionMatcher.java
+++ b/src/java/org/apache/ivy/plugins/version/VersionMatcher.java
@@ -45,7 +45,7 @@ public interface VersionMatcher {
/**
* Indicates if the given asked ModuleRevisionId should be considered as dynamic for the current
* VersionMatcher or not.
- *
+ *
* @param askedMrid
* the dependency module revision id as asked by a module
* @return true if this revision is considered as a dynamic one, false otherwise
@@ -55,7 +55,7 @@ public interface VersionMatcher {
/**
* Indicates if this version matcher considers that the module revision found matches the asked
* one.
- *
+ *
* @param askedMrid ModuleRevisionId
* @param foundMrid ModuleRevisionId
* @return boolean
@@ -66,7 +66,9 @@ public interface VersionMatcher {
* Indicates if this VersionMatcher needs module descriptors to determine if a module revision
* matches the asked one. Note that returning true in this method may imply big performance
* issues.
- *
+ *
+ * @param askedMrid ModuleRevisionId
+ * @param foundMrid ModuleRevisionId
* @return boolean
*/
public boolean needModuleDescriptor(ModuleRevisionId askedMrid, ModuleRevisionId foundMrid);
@@ -76,7 +78,7 @@ public interface VersionMatcher {
* method can be called even needModuleDescriptor(ModuleRevisionId askedMrid, ModuleRevisionId
* foundMrid) returns false, so it is required to implement it in any case, a usual default
* implementation being: return accept(askedMrid, foundMD.getResolvedModuleRevisionId());
- *
+ *
* @param askedMrid ModuleRevisionId
* @param foundMD ModuleDescriptor
* @return boolean
@@ -88,7 +90,7 @@ public interface VersionMatcher {
* should be considered the greater. If there is not enough information to know which one is the
* greater, the dynamic one should be considered greater and this method should return 0. This
* method should never be called with a askedMrid for which isDynamic returns false.
- *
+ *
* @param askedMrid
* the dynamic revision to compare
* @param foundMrid
@@ -103,7 +105,7 @@ public interface VersionMatcher {
/**
* Returns the version matcher name identifying this version matcher
- *
+ *
* @return the version matcher name identifying this version matcher
*/
public String getName();
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/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 aca4007..c938007 100644
--- a/src/java/org/apache/ivy/util/FileUtil.java
+++ b/src/java/org/apache/ivy/util/FileUtil.java
@@ -57,9 +57,9 @@ public final class FileUtil {
// Utility class
}
- // according to tests by users, 64kB seems to be a good value for the buffer used during copy
+ // according to tests by users, 64kB seems to be a good value for the buffer used during copy;
// further improvements could be obtained using NIO API
- private static final int BUFFER_SIZE = 64 * 1024;
+ private static final int BUFFER_SIZE = 64 * 1024;
private static final byte[] EMPTY_BUFFER = new byte[0];
@@ -67,13 +67,12 @@ public final class FileUtil {
public static void symlinkInMass(Map<File, File> destToSrcMap, boolean overwrite)
throws IOException {
-
- // This pattern could be more forgiving if somebody wanted it to be...
- // ...but this should satisfy 99+% of all needs, without letting unsafe operations be done.
+ // This pattern could be more forgiving if somebody wanted it to be... but this should
+ // satisfy 99+% of all needs, without letting unsafe operations be done.
// If you paths is not supported, you then skip this mass option.
// NOTE: A space inside the path is allowed (I can't control other programmers who like them
- // in their working directory names)...
- // but trailing spaces on file names will be checked otherwise and refused.
+ // in their working directory names)... but trailing spaces on file names will be checked
+ // otherwise and refused.
try {
StringBuffer sb = new StringBuffer();
@@ -456,10 +455,14 @@ public final class FileUtil {
/**
* Returns a list of Files composed of all directories being parent of file and child of root +
- * file and root themselves. Example: getPathFiles(new File("test"), new
- * File("test/dir1/dir2/file.txt")) => {new File("test/dir1"), new File("test/dir1/dir2"), new
- * File("test/dir1/dir2/file.txt") } Note that if root is not an ancestor of file, or if root is
- * null, all directories from the file system root will be returned.
+ * file and root themselves. Example: <code>getPathFiles(new File("test"), new
+ * File("test/dir1/dir2/file.txt")) => {new File("test/dir1"), new File("test/dir1/dir2"),
+ * new File("test/dir1/dir2/file.txt") }</code> Note that if root is not an ancestor of file, or
+ * if root is null, all directories from the file system root will be returned.
+ *
+ * @param root File
+ * @param file File
+ * @return List<File>
*/
public static List<File> getPathFiles(File root, File file) {
List<File> ret = new ArrayList<File>();
@@ -475,15 +478,13 @@ public final class FileUtil {
}
/**
- * Returns a collection of all Files being contained in the given directory, recursively,
- * including directories.
- *
* @param dir
* The directory from which all files, including files in subdirectory) are
* extracted.
* @param ignore
* a Collection of filenames which must be excluded from listing
- * @return A collection containing all the files of the given directory and it's subdirectories.
+ * @return a collection containing all the files of the given directory and it's subdirectories,
+ * recursively.
*/
public static Collection<File> listAll(File dir, Collection<String> ignore) {
return listAll(dir, new ArrayList<File>(), ignore);
@@ -534,12 +535,9 @@ public final class FileUtil {
* Unlike {@link File#getCanonicalPath()} this method specifically does not resolve symbolic
* links.
*
- * @param path
- * the path to be normalized.
+ * @param path the path to be normalized.
* @return the normalized version of the path.
- *
- * @throws java.lang.NullPointerException
- * if path is null.
+ * @throws NullPointerException if path is null.
*/
public static File normalize(final String path) {
Stack<String> s = new Stack<String>();
@@ -577,21 +575,20 @@ public final class FileUtil {
/**
* Dissect the specified absolute path.
*
- * @param path
- * the path to dissect.
+ * @param path the path to dissect.
* @return String[] {root, remaining path}.
- * @throws java.lang.NullPointerException
- * if path is null.
+ * @throws NullPointerException if path is null.
* @since Ant 1.7
*/
private static String[] dissect(String path) {
char sep = File.separatorChar;
path = path.replace('/', sep).replace('\\', sep);
- // // make sure we are dealing with an absolute path
- // if (!isAbsolutePath(path)) {
- // throw new BuildException(path + " is not an absolute path");
- // }
+ /* // make sure we are dealing with an absolute path
+ * if (!isAbsolutePath(path)) {
+ * throw new BuildException(path + " is not an absolute path");
+ * }
+ */
String root = null;
int colon = path.indexOf(':');
if (colon > 0) { // && (ON_DOS || ON_NETWARE)) {
@@ -627,8 +624,8 @@ public final class FileUtil {
/**
* Get the length of the file, or the sum of the children lengths if it is a directory
*
- * @param file
- * @return
+ * @param file File
+ * @return long
*/
public static long getFileLength(File file) {
long l = 0;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/util/StringUtils.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/StringUtils.java b/src/java/org/apache/ivy/util/StringUtils.java
index 1151872..01f31dc 100644
--- a/src/java/org/apache/ivy/util/StringUtils.java
+++ b/src/java/org/apache/ivy/util/StringUtils.java
@@ -47,8 +47,7 @@ public final class StringUtils {
* will try to be as precise as possible, handling cases where e.getMessage() is not meaningful,
* like {@link NullPointerException} for instance.
*
- * @param t
- * the throwable to get the error message from
+ * @param t the throwable to get the error message from
* @return the error message of the given exception
*/
public static String getErrorMessage(Throwable t) {
@@ -89,7 +88,7 @@ public final class StringUtils {
* Example:
*
* <pre>
- * join(new String[] {"one", "two", "three"}, ", ") -> "one, two, three"
+ * join(new String[] {"one", "two", "three"}, ", ") -> "one, two, three"
* </pre>
*
* @param objs
@@ -110,7 +109,9 @@ public final class StringUtils {
}
// basic string codec (same algo as CVS passfile, inspired by ant CVSPass class
- /** Array contain char conversion data */
+ /**
+ * Array containing char conversion data
+ */
private static final char[] SHIFTS = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 114, 120, 53, 79, 96, 109,
72, 108, 70, 64, 76, 67, 116, 74, 68, 87, 111, 52, 75, 119, 49, 34, 82, 81, 95, 65,
@@ -130,7 +131,7 @@ public final class StringUtils {
* Encrypt the given string in a way which anybody having access to this method algorithm can
* easily decrypt. This is useful only to avoid clear string storage in a file for example, but
* shouldn't be considered as a real mean of security. This only works with simple characters
- * (char < 256).
+ * (char < 256).
*
* @param str
* the string to encrypt
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/util/XMLHelper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/XMLHelper.java b/src/java/org/apache/ivy/util/XMLHelper.java
index 78d691e..894ccc8 100644
--- a/src/java/org/apache/ivy/util/XMLHelper.java
+++ b/src/java/org/apache/ivy/util/XMLHelper.java
@@ -95,6 +95,9 @@ public abstract class XMLHelper {
/**
* Convert an URL to a valid systemId according to RFC 2396.
+ *
+ * @param url URL
+ * @return String
*/
public static String toSystemId(URL url) {
try {
@@ -105,9 +108,9 @@ public abstract class XMLHelper {
}
// IMPORTANT: validation errors are only notified to the given handler, and
- // do not cause exception
- // implement warning error and fatalError methods in handler to be informed
- // of validation errors
+ // do not cause exception implement warning error and fatalError methods in
+ // handler to be informed of validation errors
+
public static void parse(URL xmlURL, URL schema, DefaultHandler handler) throws SAXException,
IOException, ParserConfigurationException {
parse(xmlURL, schema, handler, null);
@@ -177,12 +180,12 @@ public abstract class XMLHelper {
/**
* Escapes invalid XML characters in the given character data using XML entities. For the
- * moment, only the following characters are being escaped: (<), (&), (') and (").
- *
- * Remark: we don't escape the (>) character to keep the readability of the configuration
- * mapping! The XML spec only requires that the (&) and (<) characters are being escaped inside
- * character data.
- *
+ * moment, only the following characters are being escaped: (<), (&), (') and (").
+ *
+ * Remark: we don't escape the (>) character to keep the readability of the configuration
+ * mapping! The XML spec only requires that the (&) and (<) characters are being escaped
+ * inside character data.
+ *
* @param text
* the character data to escape
* @return the escaped character data
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/src/java/org/apache/ivy/util/filter/FilterHelper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/filter/FilterHelper.java b/src/java/org/apache/ivy/util/filter/FilterHelper.java
index 9e79e13..a665a00 100644
--- a/src/java/org/apache/ivy/util/filter/FilterHelper.java
+++ b/src/java/org/apache/ivy/util/filter/FilterHelper.java
@@ -54,19 +54,19 @@ public final class FilterHelper {
}
/**
- * Returns a new collection containing only the items from the given collection, which are
- * accepted by the filter.
- *
+ * @param <T> The type parameter
* @param col
* The collection to filter.
* @param filter
* The filter to use.
- * @return A new collection instance containing the only the instance accepted by the filter.
+ * @return a new collection instance containing the only the the items from the given
+ * collection, which are accepted by the filter.
*
- * <br />
- * Comment: We could have used
- * <a href="http://jakarta.apache.org/commons/collections/">Commons-Collections</a>
- * facility for this. If we accepted to add dependencies on third party jars.
+ * <p>
+ * Comment: We could have used
+ * <a href="http://jakarta.apache.org/commons/collections/">Commons Collections</a> facility for
+ * this, if we accepted additional dependencies on third party jars.
+ * </p>
*/
public static <T> Collection<T> filter(Collection<T> col, Filter<T> filter) {
if (filter == null) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/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 96b51d9..b429ef9 100644
--- a/src/java/org/apache/ivy/util/url/URLHandler.java
+++ b/src/java/org/apache/ivy/util/url/URLHandler.java
@@ -83,48 +83,44 @@ public interface URLHandler {
/**
* Please prefer getURLInfo when several infos are needed.
- *
- * @param url
- * the url to check
+ *
+ * @param url the url to check
* @return true if the target is reachable
*/
public boolean isReachable(URL url);
/**
* Please prefer getURLInfo when several infos are needed.
- *
- * @param url
- * the url to check
+ *
+ * @param url the url to check
+ * @param timeout the timeout in milliseconds
* @return true if the target is reachable
*/
public boolean isReachable(URL url, int timeout);
/**
- * Returns the length of the target if the given url is reachable, and without error code in
- * case of http urls. Please prefer getURLInfo when several infos are needed.
- *
- * @param url
- * the url to check
- * @return the length of the target if available, 0 if not reachable
+ * 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.
*/
public long getContentLength(URL url);
/**
- * Returns the length of the target if the given url is reachable, and without error code in
- * case of http urls.
- *
* @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 available, 0 if not reachable
+ * 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.
*/
public long getContentLength(URL url, int timeout);
/**
* Please prefer getURLInfo when several infos are needed.
- *
+ *
* @param url
* the url to check
* @return last modified timestamp of the given url
@@ -133,33 +129,28 @@ public interface URLHandler {
/**
* Please prefer getURLInfo when several infos are needed.
- *
- * @param url
- * the url to check
+ *
+ * @param url the url to check
+ * @param timeout the timeout in milliseconds
* @return last modified timestamp of the given url
*/
public long getLastModified(URL url, int timeout);
/**
- * Returns the URLInfo of the given url or a {@link #UNAVAILABLE} instance, if the url is not
- * reachable.
- *
* @param url
* The url from which information is retrieved.
- * @return The URLInfo extracted from the given url, or {@link #UNAVAILABLE} when the url is not
- * available.
+ * @return The URLInfo extracted from the given url, or {@link #UNAVAILABLE} instance when the
+ * url is not reachable.
*/
public URLInfo getURLInfo(URL url);
/**
- * never returns null, return UNAVAILABLE when url is not reachable
- *
* @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
- * available.
+ * reachable, never null.
*/
public URLInfo getURLInfo(URL url, int timeout);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baf03a91/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 8bffe97..cd78811 100644
--- a/src/java/org/apache/ivy/util/url/URLHandlerRegistry.java
+++ b/src/java/org/apache/ivy/util/url/URLHandlerRegistry.java
@@ -39,7 +39,7 @@ public final class URLHandlerRegistry {
/**
* This method is used to get appropriate http downloader depending on Jakarta Commons
* HttpClient availability in classpath, or simply use jdk url handling in other cases.
- *
+ *
* @return most accurate http downloader
*/
public static URLHandler getHttp() {
[04/15] ant-ivy git commit: More code cleanup
Posted by jh...@apache.org.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/event/IvyEventFilter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/event/IvyEventFilter.java b/src/java/org/apache/ivy/core/event/IvyEventFilter.java
index d47059f..6b0d87e 100644
--- a/src/java/org/apache/ivy/core/event/IvyEventFilter.java
+++ b/src/java/org/apache/ivy/core/event/IvyEventFilter.java
@@ -150,10 +150,7 @@ public class IvyEventFilter implements Filter {
}
public boolean accept(Object o) {
- if (!(o instanceof IvyEvent)) {
- return false;
- }
- return nameFilter.accept(o) && attFilter.accept(o);
+ return o instanceof IvyEvent && nameFilter.accept(o) && attFilter.accept(o);
}
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/event/publish/EndArtifactPublishEvent.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/event/publish/EndArtifactPublishEvent.java b/src/java/org/apache/ivy/core/event/publish/EndArtifactPublishEvent.java
index 36c98ce..864e5cb 100644
--- a/src/java/org/apache/ivy/core/event/publish/EndArtifactPublishEvent.java
+++ b/src/java/org/apache/ivy/core/event/publish/EndArtifactPublishEvent.java
@@ -30,6 +30,7 @@ import org.apache.ivy.plugins.resolver.DependencyResolver;
*/
public class EndArtifactPublishEvent extends PublishEvent {
+ @SuppressWarnings("unused")
private static final long serialVersionUID = -65690169431499422L;
public static final String NAME = "post-publish-artifact";
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/event/publish/StartArtifactPublishEvent.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/event/publish/StartArtifactPublishEvent.java b/src/java/org/apache/ivy/core/event/publish/StartArtifactPublishEvent.java
index 2682eb5..42fb224 100644
--- a/src/java/org/apache/ivy/core/event/publish/StartArtifactPublishEvent.java
+++ b/src/java/org/apache/ivy/core/event/publish/StartArtifactPublishEvent.java
@@ -30,6 +30,7 @@ import org.apache.ivy.plugins.resolver.DependencyResolver;
*/
public class StartArtifactPublishEvent extends PublishEvent {
+ @SuppressWarnings("unused")
private static final long serialVersionUID = -1134274781039590219L;
public static final String NAME = "pre-publish-artifact";
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/install/InstallEngine.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/install/InstallEngine.java b/src/java/org/apache/ivy/core/install/InstallEngine.java
index b213fbb..47e45e7 100644
--- a/src/java/org/apache/ivy/core/install/InstallEngine.java
+++ b/src/java/org/apache/ivy/core/install/InstallEngine.java
@@ -78,7 +78,7 @@ public class InstallEngine {
// build module file declaring the dependency
Message.info(":: installing " + mrid + " ::");
- DependencyResolver oldDicator = resolveEngine.getDictatorResolver();
+ DependencyResolver oldDictator = resolveEngine.getDictatorResolver();
boolean log = settings.logNotConvertedExclusionRule();
try {
settings.setLogNotConvertedExclusionRule(true);
@@ -203,7 +203,7 @@ public class InstallEngine {
// IVY-834: log the problems if there were any...
Message.sumupProblems();
- resolveEngine.setDictatorResolver(oldDicator);
+ resolveEngine.setDictatorResolver(oldDictator);
settings.setLogNotConvertedExclusionRule(log);
}
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/module/descriptor/AbstractIncludeExcludeRule.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/AbstractIncludeExcludeRule.java b/src/java/org/apache/ivy/core/module/descriptor/AbstractIncludeExcludeRule.java
index ccd262a..607690c 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/AbstractIncludeExcludeRule.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/AbstractIncludeExcludeRule.java
@@ -70,7 +70,7 @@ public abstract class AbstractIncludeExcludeRule extends UnmodifiableExtendableI
/**
* Add a configuration for this rule
*
- * @param conf
+ * @param conf String
*/
public void addConfiguration(String conf) {
confs.add(conf);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/module/descriptor/Configuration.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/Configuration.java b/src/java/org/apache/ivy/core/module/descriptor/Configuration.java
index de43912..88061d0 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/Configuration.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/Configuration.java
@@ -42,7 +42,7 @@ public class Configuration extends DefaultExtendableItem implements InheritableI
} else if ("public".equals(name)) {
return PUBLIC;
} else {
- throw new IllegalArgumentException("unknwon visibility " + name);
+ throw new IllegalArgumentException("unknown visibility " + name);
}
}
@@ -203,10 +203,7 @@ public class Configuration extends DefaultExtendableItem implements InheritableI
@Override
public boolean equals(Object obj) {
- if (!(obj instanceof Configuration)) {
- return false;
- }
- return ((Configuration) obj).getName().equals(getName());
+ return obj instanceof Configuration && ((Configuration) obj).getName().equals(getName());
}
@Override
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/module/descriptor/ConfigurationGroup.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/ConfigurationGroup.java b/src/java/org/apache/ivy/core/module/descriptor/ConfigurationGroup.java
index b25bebd..e532ebd 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/ConfigurationGroup.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/ConfigurationGroup.java
@@ -37,7 +37,7 @@ public class ConfigurationGroup extends Configuration {
* <p>
* This list is built from the configuration name, if some of these configuration names have
* actually not been recognized in the module, they will be <code>null</code> when accessed from
- * {@link #getIntersectedConfiguration(String)}.
+ * {@link org.apache.ivy.core.module.descriptor.ConfigurationIntersection#getIntersectedConfiguration(String)}.
* </p>
*
* @return the list of configurations' names this object is an intersection of.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyArtifactDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyArtifactDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyArtifactDescriptor.java
index 42202f9..eca0ecf 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyArtifactDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyArtifactDescriptor.java
@@ -42,10 +42,12 @@ public class DefaultDependencyArtifactDescriptor extends UnmodifiableExtendableI
private DependencyDescriptor dd;
/**
- * @param dd
- * @param name
- * @param type
- * @param url
+ * @param dd DependencyDescriptor
+ * @param name ditto
+ * @param type ditto
+ * @param ext ditto
+ * @param url ditto
+ * @param extraAttributes ditto
*/
public DefaultDependencyArtifactDescriptor(DependencyDescriptor dd, String name, String type,
String ext, URL url, Map extraAttributes) {
@@ -84,7 +86,7 @@ public class DefaultDependencyArtifactDescriptor extends UnmodifiableExtendableI
/**
* Add a configuration for this artifact.
*
- * @param conf
+ * @param conf ditto
*/
public void addConfiguration(String conf) {
confs.add(conf);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
index 11ca953..00fdea8 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
@@ -58,9 +58,9 @@ public class DefaultDependencyDescriptor implements DependencyDescriptor {
* namespace, because they aren't transformable (the name space hasn't the ability to convert
* regular expressions). However, method doesExclude will work with system artifacts.</i>
*
- * @param dd
- * @param ns
- * @return
+ * @param dd DependencyDescriptor
+ * @param ns Namespace
+ * @return DependencyDescriptor
*/
public static DependencyDescriptor transformInstance(DependencyDescriptor dd, Namespace ns) {
NamespaceTransformer t = ns.getToSystemTransformer();
@@ -77,9 +77,9 @@ public class DefaultDependencyDescriptor implements DependencyDescriptor {
* will be attached to the transformed dependency descriptor, so calling doesExclude is not
* recommended (doesExclude only works when namespace is properly set)
*
- * @param dd
- * @param t
- * @return
+ * @param dd DependencyDescriptor
+ * @param t NamespaceTransformer
+ * @return DefaultDependencyDescriptor
*/
public static DefaultDependencyDescriptor transformInstance(DependencyDescriptor dd,
NamespaceTransformer t, boolean fromSystem) {
@@ -607,9 +607,8 @@ public class DefaultDependencyDescriptor implements DependencyDescriptor {
}
/**
- * Returns true if this descriptor contains any exclusion rule
*
- * @return
+ * @return true if this descriptor contains any exclusion rule
*/
public boolean canExclude() {
return excludeRules != null && !excludeRules.isEmpty();
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/module/descriptor/DefaultExtendsDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/DefaultExtendsDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/DefaultExtendsDescriptor.java
index 1c7be57..1900a05 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/DefaultExtendsDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/DefaultExtendsDescriptor.java
@@ -18,6 +18,7 @@
package org.apache.ivy.core.module.descriptor;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import org.apache.ivy.core.module.id.ModuleRevisionId;
@@ -42,9 +43,7 @@ public class DefaultExtendsDescriptor implements ExtendsDescriptor {
this.location = location;
this.local = local;
this.extendsTypes = new ArrayList(types.length);
- for (int i = 0; i < types.length; ++i) {
- extendsTypes.add(types[i]);
- }
+ extendsTypes.addAll(Arrays.asList(types));
}
public ModuleRevisionId getParentRevisionId() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
index 39256d2..1c039b6 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
@@ -134,9 +134,9 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
* in system namespace, because they aren't transformable (the name space hasn't the ability to
* convert regular expressions)</i>
*
- * @param md
- * @param ns
- * @return
+ * @param md ModuleDescriptor
+ * @param ns Namespace
+ * @return ModuleDescriptor
*/
public static ModuleDescriptor transformInstance(ModuleDescriptor md, Namespace ns) {
NamespaceTransformer t = ns.getToSystemTransformer();
@@ -362,8 +362,8 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
* Artifact configurations are not used since added artifact may not be entirely completed, so
* its configurations data may not be accurate
*
- * @param conf
- * @param artifact
+ * @param conf ditto
+ * @param artifact ditto
*/
public void addArtifact(String conf, Artifact artifact) {
Configuration c = getConfiguration(conf);
@@ -600,9 +600,9 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
* regular expressions as explained in Pattern class may be used in ModuleId organisation and
* name
*
- * @param moduleId
- * @param matcher
- * @param resolverName
+ * @param moduleId ditto
+ * @param matcher PatternMatcher
+ * @param manager ConflictManager
*/
public void addConflictManager(ModuleId moduleId, PatternMatcher matcher,
ConflictManager manager) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java
index 1780d1f..13973d8 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java
@@ -112,9 +112,9 @@ public interface DependencyDescriptor extends ExtendableItem, InheritableItem {
/**
* Returns true if
*
- * @param moduleConfigurations
- * @param artifactId
- * @return
+ * @param moduleConfigurations ditto
+ * @param artifactId ditto
+ * @return boolean
*/
boolean doesExclude(String[] moduleConfigurations, ArtifactId artifactId);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/module/descriptor/ExcludeRule.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/ExcludeRule.java b/src/java/org/apache/ivy/core/module/descriptor/ExcludeRule.java
index 33c82c2..33b0027 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/ExcludeRule.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/ExcludeRule.java
@@ -30,7 +30,7 @@ public interface ExcludeRule extends ExtendableItem {
/**
* Returns the id of the described artifact, without revision information
*
- * @return
+ * @return ArtifactId
*/
public ArtifactId getId();
@@ -44,7 +44,7 @@ public interface ExcludeRule extends ExtendableItem {
/**
* Returns the matcher to use to know if an artifact match the current descriptor
*
- * @return
+ * @return PatternMatcher
*/
public PatternMatcher getMatcher();
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/module/descriptor/IncludeRule.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/IncludeRule.java b/src/java/org/apache/ivy/core/module/descriptor/IncludeRule.java
index 7cbeada..14d841d 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/IncludeRule.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/IncludeRule.java
@@ -22,7 +22,7 @@ import org.apache.ivy.plugins.matcher.PatternMatcher;
import org.apache.ivy.util.extendable.ExtendableItem;
/**
- * This describes a rule of inclusion. It is used to resctrict the artifacts and modules asked for a
+ * This describes a rule of inclusion. It is used to restrict the artifacts and modules asked for a
* dependency, by including only modules and artifacts matching the rule
*/
public interface IncludeRule extends ExtendableItem {
@@ -30,7 +30,7 @@ public interface IncludeRule extends ExtendableItem {
/**
* Returns the id of the described artifact, without revision information
*
- * @return
+ * @return ArtifactId
*/
public ArtifactId getId();
@@ -44,7 +44,7 @@ public interface IncludeRule extends ExtendableItem {
/**
* Returns the matcher to use to know if an artifact match the current descriptor
*
- * @return
+ * @return PatternMatcher
*/
public PatternMatcher getMatcher();
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
index 4eb4a1e..1116d88 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
@@ -49,7 +49,7 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
* Returns true if this descriptor is a default one, i.e. one generated for a module not
* actually having one.
*
- * @return
+ * @return boolean
*/
boolean isDefault();
@@ -61,14 +61,14 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
* the returned ModuleRevisionId. This revision must be the same as the module descriptor
* resolved revision id unless no module descriptor is defined
*
- * @return
+ * @return ModuleRevisionId
*/
ModuleRevisionId getResolvedModuleRevisionId();
/**
* This method update the resolved module revision id
*
- * @param revId
+ * @param revId ModuleRevisionId
*/
void setResolvedModuleRevisionId(ModuleRevisionId revId);
@@ -81,7 +81,7 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
/**
* This method update the resolved publication date
*
- * @param publicationDate
+ * @param publicationDate Date
*/
void setResolvedPublicationDate(Date publicationDate);
@@ -90,7 +90,7 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
/**
* May be <code>null</code> if unknown in the descriptor itself.
*
- * @return The publication date or <code>null</code> when not knwon.
+ * @return The publication date or <code>null</code> when not known.
*/
Date getPublicationDate();
@@ -125,23 +125,24 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
Artifact[] getAllArtifacts();
/**
- * @retun The dependencies of the module. If there is no dependencies return an empty array (non
+ * @return The dependencies of the module. If there is no dependencies return an empty array (non
* null)
*/
DependencyDescriptor[] getDependencies();
/**
- * Returns true if the module described by this descriptor dependes directly upon the given
+ * Returns true if the module described by this descriptor depends directly upon the given
* module descriptor
- *
- * @param md
- * @return
+ *
+ * @param matcher VersionMatcher
+ * @param md ModuleDescriptor
+ * @return boolean
*/
boolean dependsOn(VersionMatcher matcher, ModuleDescriptor md);
/**
- * @param confName
- * @return
+ * @param confName ditto
+ * @return Configuration
*/
Configuration getConfiguration(String confName);
@@ -149,15 +150,15 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
* Returns the conflict manager to use for the given ModuleId, or <code>null</code> if no
* specific conflict manager is associated with the given module id in this module descriptor.
*
- * @param id
- * @return
+ * @param id ModuleId
+ * @return ConflictManager
*/
ConflictManager getConflictManager(ModuleId id);
/**
* Returns the licenses of the module described by this descriptor
*
- * @return
+ * @return License[]
*/
License[] getLicenses();
@@ -180,7 +181,7 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
/**
* The ModuleDescriptorParser used to parse this module descriptor, null is no parser was used.
*
- * @return
+ * @return ModuleDescriptorParser
*/
ModuleDescriptorParser getParser();
@@ -188,7 +189,7 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
* The resource being the source of this module descriptor, null if no resource corresponds to
* this module descriptor
*
- * @return
+ * @return Resource
*/
Resource getResource();
@@ -216,9 +217,9 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
* Returns true if an exclude rule of this module attached to any of the given configurations
* matches the given artifact id, and thus exclude it
*
- * @param moduleConfs
- * @param artifactId
- * @return
+ * @param moduleConfs String[]
+ * @param artifactId ditto
+ * @return boolean
*/
boolean doesExclude(String[] moduleConfs, ArtifactId artifactId);
@@ -271,7 +272,7 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
* description are given.
*
* @since 2.4.0
- * @return
+ * @return List<ExtraInfoHolder>
*/
List<ExtraInfoHolder> getExtraInfos();
@@ -279,7 +280,7 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
* Returns content from first extrainfo matching with given tag name
*
* @since 2.4.0
- * @return
+ * @return ditto
*/
String getExtraInfoContentByTagName(String tagName);
@@ -287,7 +288,7 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
* Returns first extrainfo matching with given tag name
*
* @since 2.4.0
- * @return
+ * @return ExtraInfoHolder
*/
ExtraInfoHolder getExtraInfoByTagName(String tagName);
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/module/id/MatcherLookup.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/id/MatcherLookup.java b/src/java/org/apache/ivy/core/module/id/MatcherLookup.java
index e4650de..c1fa6ad 100644
--- a/src/java/org/apache/ivy/core/module/id/MatcherLookup.java
+++ b/src/java/org/apache/ivy/core/module/id/MatcherLookup.java
@@ -71,7 +71,7 @@ public class MatcherLookup {
*
* If matcher is not exact pattern matcher, it will be placed into non-keyed collection
*
- * @param matcher
+ * @param matcher MapMatcher
*/
public void add(MapMatcher matcher) {
if (!(matcher.getPatternMatcher() instanceof ExactPatternMatcher)) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/module/id/ModuleId.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/id/ModuleId.java b/src/java/org/apache/ivy/core/module/id/ModuleId.java
index 8d2a85d..7effb7d 100644
--- a/src/java/org/apache/ivy/core/module/id/ModuleId.java
+++ b/src/java/org/apache/ivy/core/module/id/ModuleId.java
@@ -183,7 +183,7 @@ public class ModuleId implements Comparable<ModuleId> {
/**
* Returns a ModuleId
*
- * @param encoded
+ * @param encoded String
* @return The new ModuleId.
* @throws IllegalArgumentException
* If the given String could not be decoded.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/module/id/ModuleRevisionId.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/id/ModuleRevisionId.java b/src/java/org/apache/ivy/core/module/id/ModuleRevisionId.java
index 38de003..0d63514 100644
--- a/src/java/org/apache/ivy/core/module/id/ModuleRevisionId.java
+++ b/src/java/org/apache/ivy/core/module/id/ModuleRevisionId.java
@@ -231,17 +231,11 @@ public class ModuleRevisionId extends UnmodifiableExtendableItem {
}
ModuleRevisionId other = (ModuleRevisionId) obj;
- if (!other.getRevision().equals(getRevision())) {
- return false;
- } else if (other.getBranch() == null && getBranch() != null) {
- return false;
- } else if (other.getBranch() != null && !other.getBranch().equals(getBranch())) {
- return false;
- } else if (!other.getModuleId().equals(getModuleId())) {
- return false;
- } else {
- return other.getQualifiedExtraAttributes().equals(getQualifiedExtraAttributes());
- }
+ return other.getRevision().equals(getRevision())
+ && !(other.getBranch() == null && getBranch() != null)
+ && !(other.getBranch() != null && !other.getBranch().equals(getBranch()))
+ && other.getModuleId().equals(getModuleId())
+ && other.getQualifiedExtraAttributes().equals(getQualifiedExtraAttributes());
}
@Override
@@ -337,7 +331,7 @@ public class ModuleRevisionId extends UnmodifiableExtendableItem {
private static String normalizeRevision(String revision) {
if (revision.startsWith("[") && revision.endsWith("]") && revision.indexOf(',') == -1) {
if (IvyPatternHelper.getTokenString(IvyPatternHelper.REVISION_KEY).equals(revision)) {
- // this is the case when listing dynamic revions
+ // this is the case when listing dynamic revisions
return revision;
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/module/status/StatusManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/status/StatusManager.java b/src/java/org/apache/ivy/core/module/status/StatusManager.java
index 53fc382..0e355d7 100644
--- a/src/java/org/apache/ivy/core/module/status/StatusManager.java
+++ b/src/java/org/apache/ivy/core/module/status/StatusManager.java
@@ -119,7 +119,7 @@ public class StatusManager {
Message.debug("unknown status " + status + ": assuming integration");
return true;
}
- return isIntegration.booleanValue();
+ return isIntegration;
}
public String getDeliveryStatusListString() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/pack/OsgiBundlePacking.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/pack/OsgiBundlePacking.java b/src/java/org/apache/ivy/core/pack/OsgiBundlePacking.java
index a9f9344..737a1f9 100644
--- a/src/java/org/apache/ivy/core/pack/OsgiBundlePacking.java
+++ b/src/java/org/apache/ivy/core/pack/OsgiBundlePacking.java
@@ -18,7 +18,6 @@
package org.apache.ivy.core.pack;
import java.io.File;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
@@ -37,7 +36,7 @@ public class OsgiBundlePacking extends ZipPacking {
}
@Override
- protected void writeFile(InputStream zip, File f) throws FileNotFoundException, IOException {
+ protected void writeFile(InputStream zip, File f) throws IOException {
// XXX maybe we should only unpack file listed by the 'Bundle-ClassPath' MANIFEST header ?
if (f.getName().endsWith(".jar.pack.gz")) {
zip = FileUtil.unwrapPack200(zip);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/pack/PackagingManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/pack/PackagingManager.java b/src/java/org/apache/ivy/core/pack/PackagingManager.java
index 2eba452..0271f87 100644
--- a/src/java/org/apache/ivy/core/pack/PackagingManager.java
+++ b/src/java/org/apache/ivy/core/pack/PackagingManager.java
@@ -64,11 +64,9 @@ public class PackagingManager implements IvySettingsAware {
}
ext = packing.getUnpackedExtension(ext);
- DefaultArtifact unpacked = new DefaultArtifact(artifact.getModuleRevisionId(),
+ return new DefaultArtifact(artifact.getModuleRevisionId(),
artifact.getPublicationDate(), artifact.getName(),
artifact.getType() + "_unpacked", ext);
-
- return unpacked;
}
public Artifact unpackArtifact(Artifact artifact, File localFile, File archiveFile)
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/pack/ZipPacking.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/pack/ZipPacking.java b/src/java/org/apache/ivy/core/pack/ZipPacking.java
index 87cfbdf..35da694 100644
--- a/src/java/org/apache/ivy/core/pack/ZipPacking.java
+++ b/src/java/org/apache/ivy/core/pack/ZipPacking.java
@@ -18,7 +18,6 @@
package org.apache.ivy.core.pack;
import java.io.File;
-import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -83,7 +82,7 @@ public class ZipPacking extends ArchivePacking {
}
}
- protected void writeFile(InputStream zip, File f) throws FileNotFoundException, IOException {
+ protected void writeFile(InputStream zip, File f) throws IOException {
FileOutputStream out = new FileOutputStream(f);
try {
FileUtil.copy(zip, out, null, false);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/publish/PublishEngine.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/publish/PublishEngine.java b/src/java/org/apache/ivy/core/publish/PublishEngine.java
index 6b42a35..d6a7904 100644
--- a/src/java/org/apache/ivy/core/publish/PublishEngine.java
+++ b/src/java/org/apache/ivy/core/publish/PublishEngine.java
@@ -182,9 +182,7 @@ public class PublishEngine {
for (int i = 0; i < confs.length; i++) {
Artifact[] artifacts = md.getArtifacts(confs[i]);
- for (int j = 0; j < artifacts.length; j++) {
- artifactsSet.add(artifacts[j]);
- }
+ artifactsSet.addAll(Arrays.asList(artifacts));
}
Artifact[] extraArtifacts = options.getExtraArtifacts();
if (extraArtifacts != null) {
@@ -207,11 +205,9 @@ public class PublishEngine {
}
if (!artifactsFiles.containsKey(artifact)) {
StringBuffer sb = new StringBuffer();
- sb.append("missing artifact " + artifact + ":\n");
+ sb.append("missing artifact ").append(artifact).append(":\n");
for (String pattern : srcArtifactPattern) {
- sb.append("\t"
- + settings.resolveFile(IvyPatternHelper.substitute(pattern, artifact))
- + " file does not exist\n");
+ sb.append("\t").append(settings.resolveFile(IvyPatternHelper.substitute(pattern, artifact))).append(" file does not exist\n");
}
if (options.isWarnOnMissing() || options.isHaltOnMissing()) {
Message.warn(sb.toString());
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java b/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java
index a395783..38296df 100644
--- a/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java
+++ b/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java
@@ -83,8 +83,6 @@ public class ConfigurationResolveReport {
* the new report is serialized there.</br> This function also use the internal dependencies
* that must already be filled. This function might be 'heavy' because it may have to parse the
* previous report.
- *
- * @return
*/
public void checkIfChanged() {
ResolutionCacheManager cache = resolveEngine.getSettings().getResolutionCacheManager();
@@ -98,7 +96,7 @@ public class ConfigurationResolveReport {
.getDependencyRevisionIds());
HashSet<ModuleRevisionId> previousDepSet = new HashSet<ModuleRevisionId>(
previousDeps);
- hasChanged = Boolean.valueOf(!previousDepSet.equals(getModuleRevisionIds()));
+ hasChanged = !previousDepSet.equals(getModuleRevisionIds());
} catch (Exception e) {
Message.warn("Error while parsing configuration resolve report "
+ previousReportFile.getAbsolutePath(), e);
@@ -113,7 +111,7 @@ public class ConfigurationResolveReport {
* @pre checkIfChanged has been called.
*/
public boolean hasChanged() {
- return hasChanged.booleanValue();
+ return hasChanged;
}
/**
@@ -292,7 +290,7 @@ public class ConfigurationResolveReport {
* specific download status, and also remove the download report for the evicted modules.
*
* @param downloadStatus
- * the status of download to retreive. Set it to <code>null</code> for no restriction
+ * the status of download to retrieve. Set it to <code>null</code> for no restriction
* on the download status
* @param withEvicted
* set it to <code>true</code> if the report for the evicted modules have to be
@@ -322,7 +320,7 @@ public class ConfigurationResolveReport {
}
/**
- * Get the report on the sucessfull download requests with the evicted modules
+ * Get the report on the successful download requests with the evicted modules
*
* @return the list of reports, never <code>null</code>
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/report/ResolveReport.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/report/ResolveReport.java b/src/java/org/apache/ivy/core/report/ResolveReport.java
index f2d5499..0fb05f0 100644
--- a/src/java/org/apache/ivy/core/report/ResolveReport.java
+++ b/src/java/org/apache/ivy/core/report/ResolveReport.java
@@ -150,7 +150,7 @@ public class ResolveReport {
* specific download status, and also remove the download report for the evicted modules.
*
* @param downloadStatus
- * the status of download to retreive. Set it to <code>null</code> for no restriction
+ * the status of download to retrieve. Set it to <code>null</code> for no restriction
* on the download status
* @param withEvicted
* set it to <code>true</code> if the report for the evicted modules have to be
@@ -320,9 +320,10 @@ public class ResolveReport {
* Get every configuration which extends the specified one. The returned list also includes the
* specified one.
*
- * @param extended
- * @return
+ * @param extended String
+ * @return String[]
*/
+ @SuppressWarnings("unused")
private String[] getExtendingConfs(String extended) {
String[] allConfs = md.getConfigurationsNames();
Set<String> extendingConfs = new HashSet<String>();
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/repository/RepositoryManagementEngine.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/repository/RepositoryManagementEngine.java b/src/java/org/apache/ivy/core/repository/RepositoryManagementEngine.java
index fe552ed..286d7b4 100644
--- a/src/java/org/apache/ivy/core/repository/RepositoryManagementEngine.java
+++ b/src/java/org/apache/ivy/core/repository/RepositoryManagementEngine.java
@@ -62,7 +62,7 @@ import org.apache.ivy.util.Message;
* </p>
* <p>
* This engine is not intended to be used concurrently with publish, the order of repository loaded
- * being undeterministic and long, it could end up in having an inconsistent in memory state.
+ * being nondeterministic and long, it could end up in having an inconsistent in memory state.
* </p>
* <p>
* For better performance, we strongly suggest using this engine with cache in useOrigin mode.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/resolve/IvyNode.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/resolve/IvyNode.java b/src/java/org/apache/ivy/core/resolve/IvyNode.java
index 48b23db..4cac6c7 100644
--- a/src/java/org/apache/ivy/core/resolve/IvyNode.java
+++ b/src/java/org/apache/ivy/core/resolve/IvyNode.java
@@ -391,7 +391,7 @@ public class IvyNode implements Comparable<IvyNode> {
// no callers, but maybe some exclude
Boolean exclude = doesExclude(md, rootModuleConf, new String[] {rootModuleConf}, dd, a,
new Stack<ModuleRevisionId>());
- return exclude == null ? false : exclude.booleanValue();
+ return exclude != null && exclude;
}
return callers.doesCallersExclude(rootModuleConf, a);
}
@@ -516,7 +516,8 @@ public class IvyNode implements Comparable<IvyNode> {
/**
* returns the required configurations from the given node
*
- * @param in
+ * @param in IvyNode
+ * @param inConf ditto
* @return array of configuration names
*/
public String[] getRequiredConfigurations(IvyNode in, String inConf) {
@@ -564,7 +565,7 @@ public class IvyNode implements Comparable<IvyNode> {
/**
* Returns the configurations of the dependency required in a given root module configuration.
*
- * @param rootModuleConf
+ * @param rootModuleConf String
* @return array of configuration names
*/
public String[] getConfigurations(String rootModuleConf) {
@@ -762,7 +763,7 @@ public class IvyNode implements Comparable<IvyNode> {
* Returns all the artifacts of this dependency required in the root module configurations in
* which the node is not evicted nor blacklisted
*
- * @param artifactFilter
+ * @param artifactFilter Filter
* @return array of {@link Artifact}s
*/
public Artifact[] getSelectedArtifacts(Filter<Artifact> artifactFilter) {
@@ -780,7 +781,7 @@ public class IvyNode implements Comparable<IvyNode> {
* Returns the artifacts of this dependency required in the configurations themselves required
* in the given root module configuration
*
- * @param rootModuleConf
+ * @param rootModuleConf String
* @return array of {@link Artifact}s
*/
public Artifact[] getArtifacts(String rootModuleConf) {
@@ -993,7 +994,7 @@ public class IvyNode implements Comparable<IvyNode> {
/**
* Returns the last modified timestamp of the module represented by this Node, or 0 if the last
- * modified timestamp is currently unkwown (module not loaded)
+ * modified timestamp is currently unknown (module not loaded)
*
* @return the last modified timestamp of the module represented by this Node
*/
@@ -1190,7 +1191,7 @@ public class IvyNode implements Comparable<IvyNode> {
* Returns a collection of Nodes in conflict for which conflict has been detected but conflict
* resolution hasn't been done yet
*
- * @param rootModuleConf
+ * @param rootModuleConf ditto
* @param mid
* the module id for which pending conflicts should be found
* @return a Collection of IvyNode in pending conflict
@@ -1217,7 +1218,7 @@ public class IvyNode implements Comparable<IvyNode> {
* {@link LatestCompatibleConflictManager}
* </p>
*
- * @param rootModuleConf
+ * @param bdata
* the root module configuration in which the node should be blacklisted
*/
public void blacklist(IvyNodeBlacklist bdata) {
@@ -1259,7 +1260,7 @@ public class IvyNode implements Comparable<IvyNode> {
* the root module conf for which we'd like to know if the node is blacklisted
*
* @return true if this node is blacklisted int he given root module conf, false otherwise
- * @see #blacklist(String)
+ * @see #blacklist(IvyNodeBlacklist)
*/
public boolean isBlacklisted(String rootModuleConf) {
return usage.isBlacklisted(rootModuleConf);
@@ -1269,7 +1270,7 @@ public class IvyNode implements Comparable<IvyNode> {
* Indicates if this node has been blacklisted in all root module configurations.
*
* @return true if this node is blacklisted in all root module configurations, false otherwise
- * @see #blacklist(String)
+ * @see #blacklist(IvyNodeBlacklist)
*/
public boolean isCompletelyBlacklisted() {
if (isRoot()) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/resolve/IvyNodeCallers.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/resolve/IvyNodeCallers.java b/src/java/org/apache/ivy/core/resolve/IvyNodeCallers.java
index a53262a..e5f5966 100644
--- a/src/java/org/apache/ivy/core/resolve/IvyNodeCallers.java
+++ b/src/java/org/apache/ivy/core/resolve/IvyNodeCallers.java
@@ -151,9 +151,9 @@ public class IvyNodeCallers {
}
/**
- * @param rootModuleConf
- * @param mrid
- * @param callerConf
+ * @param rootModuleConf ditto
+ * @param callerNode IvyNode
+ * @param callerConf ditto
* @param dependencyConfs
* '*' must have been resolved
* @param dd
@@ -252,9 +252,9 @@ public class IvyNodeCallers {
/**
* Returns true if ALL callers exclude the given artifact in the given root module conf
*
- * @param rootModuleConf
- * @param artifact
- * @return
+ * @param rootModuleConf ditto
+ * @param artifact Artifact
+ * @return boolean
*/
boolean doesCallersExclude(String rootModuleConf, Artifact artifact) {
return doesCallersExclude(rootModuleConf, artifact, new Stack<ModuleRevisionId>());
@@ -268,7 +268,7 @@ public class IvyNodeCallers {
if (callers.length == 0) {
return false;
}
- boolean allUnconclusive = true;
+ boolean allInconclusive = true;
for (int i = 0; i < callers.length; i++) {
if (!callers[i].canExclude()) {
return false;
@@ -278,13 +278,13 @@ public class IvyNodeCallers {
callers[i].getCallerConfigurations(), callers[i].getDependencyDescriptor(),
artifact, callersStack);
if (doesExclude != null) {
- if (!doesExclude.booleanValue()) {
+ if (!doesExclude) {
return false;
}
- allUnconclusive = false;
+ allInconclusive = false;
}
}
- return allUnconclusive ? false : true;
+ return !allInconclusive;
} finally {
callersStack.pop();
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/resolve/IvyNodeEviction.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/resolve/IvyNodeEviction.java b/src/java/org/apache/ivy/core/resolve/IvyNodeEviction.java
index c08f94a..940dfa1 100644
--- a/src/java/org/apache/ivy/core/resolve/IvyNodeEviction.java
+++ b/src/java/org/apache/ivy/core/resolve/IvyNodeEviction.java
@@ -157,11 +157,7 @@ public class IvyNodeEviction {
@Override
public boolean equals(Object obj) {
- if (!(obj instanceof ModuleIdConf)) {
- return false;
- }
- return getModuleId().equals(((ModuleIdConf) obj).getModuleId())
- && getConf().equals(((ModuleIdConf) obj).getConf());
+ return obj instanceof ModuleIdConf && getModuleId().equals(((ModuleIdConf) obj).getModuleId()) && getConf().equals(((ModuleIdConf) obj).getConf());
}
@Override
@@ -342,7 +338,7 @@ public class IvyNodeEviction {
* Returns null if this node has only be evicted transitively, or the the collection of selected
* nodes if it has been evicted by other selected nodes
*
- * @return
+ * @return Collection<IvyNode>
*/
public Collection<IvyNode> getAllEvictingNodes() {
Collection<IvyNode> allEvictingNodes = null;
@@ -390,9 +386,9 @@ public class IvyNodeEviction {
* otherwise (if it hasn't been evicted in root) for the given rootModuleConf. Note that this
* method only works if conflict resolution has already be done in all the ancestors.
*
- * @param rootModuleConf
- * @param ancestor
- * @return
+ * @param rootModuleConf ditto
+ * @param ancestor IvyNode
+ * @return EvictionData
*/
public EvictionData getEvictionDataInRoot(String rootModuleConf, IvyNode ancestor) {
Collection<IvyNode> selectedNodes = node.getRoot().getResolvedNodes(node.getModuleId(),
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/resolve/IvyNodeUsage.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/resolve/IvyNodeUsage.java b/src/java/org/apache/ivy/core/resolve/IvyNodeUsage.java
index cb0eafe..0399f52 100644
--- a/src/java/org/apache/ivy/core/resolve/IvyNodeUsage.java
+++ b/src/java/org/apache/ivy/core/resolve/IvyNodeUsage.java
@@ -66,11 +66,7 @@ public class IvyNodeUsage {
@Override
public boolean equals(Object obj) {
- if (!(obj instanceof NodeConf)) {
- return false;
- }
- return getNode().equals(((NodeConf) obj).getNode())
- && getConf().equals(((NodeConf) obj).getConf());
+ return obj instanceof NodeConf && getNode().equals(((NodeConf) obj).getNode()) && getConf().equals(((NodeConf) obj).getConf());
}
@Override
@@ -151,8 +147,8 @@ public class IvyNodeUsage {
/**
* Returns the configurations of the dependency required in a given root module configuration.
*
- * @param rootModuleConf
- * @return
+ * @param rootModuleConf ditto
+ * @return Set<String>
*/
protected Set<String> getConfigurations(String rootModuleConf) {
return rootModuleConfs.get(rootModuleConf);
@@ -273,7 +269,7 @@ public class IvyNodeUsage {
* the root module conf for which we'd like to know if the node is blacklisted
*
* @return true if this node is blacklisted int he given root module conf, false otherwise
- * @see #blacklist(String)
+ * @see #blacklist(IvyNodeBlacklist)
*/
protected boolean isBlacklisted(String rootModuleConf) {
return blacklisted.containsKey(rootModuleConf);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/resolve/ResolveData.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/resolve/ResolveData.java b/src/java/org/apache/ivy/core/resolve/ResolveData.java
index f6cb9a7..0877f8b 100644
--- a/src/java/org/apache/ivy/core/resolve/ResolveData.java
+++ b/src/java/org/apache/ivy/core/resolve/ResolveData.java
@@ -171,7 +171,7 @@ public class ResolveData {
* Sets the currently visited node. WARNING: This should only be called by Ivy core
* ResolveEngine!
*
- * @param currentVisitNode
+ * @param currentVisitNode VisitNode
*/
void setCurrentVisitNode(VisitNode currentVisitNode) {
this.currentVisitNode = currentVisitNode;
@@ -217,7 +217,7 @@ public class ResolveData {
}
// replace visit data in Map (discards old one)
this.visitData.put(mrid, keptVisitData);
- // update visit data with discarde visit nodes
+ // update visit data with discarded visit nodes
keptVisitData.addVisitNodes(rootModuleConf, visitData.getVisitNodes(rootModuleConf));
report.updateDependency(mrid, node);
@@ -299,7 +299,7 @@ public class ResolveData {
// mediating dd through dependers stack
List<VisitNode> dependers = new ArrayList<VisitNode>(current.getPath());
// the returned path contains the currently visited node, we are only interested in
- // the dependers, so we remove the currently visted node from the end
+ // the dependers, so we remove the currently visited node from the end
dependers.remove(dependers.size() - 1);
// we want to apply mediation going up in the dependers stack, not the opposite
Collections.reverse(dependers);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/resolve/ResolveEngine.java b/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
index 33e908d..7c0a11a 100644
--- a/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
+++ b/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
@@ -495,12 +495,8 @@ public class ResolveEngine {
*
* @param ivySource
* url of the ivy file to use for dependency resolving
- * @param confs
- * an array of configuration names to resolve - must not be null nor empty
- * @param getCache
- * the cache to use - default cache is used if null
- * @param date
- * the date to which resolution must be done - may be null
+ * @param options
+ * ditto
* @return an array of the resolved dependencies
* @throws ParseException
* if a parsing problem occurred in the ivy file
@@ -610,7 +606,7 @@ public class ResolveEngine {
}
}
- // prune and reverse sort fectched dependencies
+ // prune and reverse sort fetched dependencies
Collection<IvyNode> nodes = data.getNodes();
// use a Set to avoid duplicates, linked to preserve order
Collection<IvyNode> dependencies = new LinkedHashSet<IvyNode>(nodes.size());
@@ -623,7 +619,7 @@ public class ResolveEngine {
SortOptions.SILENT);
Collections.reverse(sortedDependencies);
- handleTransiviteEviction(md, confs, data, sortedDependencies);
+ handleTransitiveEviction(md, confs, data, sortedDependencies);
return dependencies.toArray(new IvyNode[dependencies.size()]);
} finally {
@@ -631,8 +627,8 @@ public class ResolveEngine {
}
}
- private void handleTransiviteEviction(ModuleDescriptor md, String[] confs, ResolveData data,
- List<IvyNode> sortedDependencies) {
+ private void handleTransitiveEviction(ModuleDescriptor md, String[] confs, ResolveData data,
+ List<IvyNode> sortedDependencies) {
// handle transitive eviction now:
// if a module has been evicted then all its dependencies required only by it should be
// evicted too. Since nodes are now sorted from the more dependent to the less one, we
@@ -811,7 +807,7 @@ public class ResolveEngine {
}
markDependenciesFetched(node.getNode(), conf);
}
- // we have finiched with this configuration, if it was the original requested conf
+ // we have finished with this configuration, if it was the original requested conf
// we can clean it now
if (requestedConfSet) {
node.setRequestedConf(null);
@@ -840,9 +836,8 @@ public class ResolveEngine {
private String getDependenciesFetchedKey(IvyNode node, String conf) {
ModuleRevisionId moduleRevisionId = node.getResolvedId();
- String key = moduleRevisionId.getOrganisation() + "|" + moduleRevisionId.getName() + "|"
+ return moduleRevisionId.getOrganisation() + "|" + moduleRevisionId.getName() + "|"
+ moduleRevisionId.getRevision() + "|" + conf;
- return key;
}
private void resolveConflict(VisitNode node, String conf) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/resolve/ResolveOptions.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/resolve/ResolveOptions.java b/src/java/org/apache/ivy/core/resolve/ResolveOptions.java
index b872b4c..f71b015 100644
--- a/src/java/org/apache/ivy/core/resolve/ResolveOptions.java
+++ b/src/java/org/apache/ivy/core/resolve/ResolveOptions.java
@@ -184,7 +184,7 @@ public class ResolveOptions extends LogOptions {
/**
* @pre can only be called if useSpecialConfs()==false. When it is true, you have to provide a
- * module desciptor so that configurations can be resolved.
+ * module descriptor so that configurations can be resolved.
* @see #getConfs(ModuleDescriptor)
*/
public String[] getConfs() {
@@ -196,7 +196,7 @@ public class ResolveOptions extends LogOptions {
}
/**
- * Get the aksed confs. Special confs (like *) use the moduleDescriptor to find the values *
+ * Get the asked confs. Special confs (like *) use the moduleDescriptor to find the values *
*
* @param md
* Used to get the exact values for special confs.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/resolve/ResolveProcessException.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/resolve/ResolveProcessException.java b/src/java/org/apache/ivy/core/resolve/ResolveProcessException.java
index 07ccea8..58e37a3 100644
--- a/src/java/org/apache/ivy/core/resolve/ResolveProcessException.java
+++ b/src/java/org/apache/ivy/core/resolve/ResolveProcessException.java
@@ -27,6 +27,7 @@ package org.apache.ivy.core.resolve;
* Some subclasses have even a stronger power over the resolve process, like
* {@link RestartResolveProcess} which orders to restart the resolve process at the start.
*/
+@SuppressWarnings("serial")
public class ResolveProcessException extends RuntimeException {
public ResolveProcessException() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/resolve/ResolvedModuleRevision.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/resolve/ResolvedModuleRevision.java b/src/java/org/apache/ivy/core/resolve/ResolvedModuleRevision.java
index e25b21f..5fefcaf 100644
--- a/src/java/org/apache/ivy/core/resolve/ResolvedModuleRevision.java
+++ b/src/java/org/apache/ivy/core/resolve/ResolvedModuleRevision.java
@@ -126,10 +126,7 @@ public class ResolvedModuleRevision {
}
public boolean equals(Object obj) {
- if (!(obj instanceof ResolvedModuleRevision)) {
- return false;
- }
- return ((ResolvedModuleRevision) obj).getId().equals(getId());
+ return obj instanceof ResolvedModuleRevision && ((ResolvedModuleRevision) obj).getId().equals(getId());
}
public int hashCode() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/resolve/RestartResolveProcess.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/resolve/RestartResolveProcess.java b/src/java/org/apache/ivy/core/resolve/RestartResolveProcess.java
index c074067..4da7153 100644
--- a/src/java/org/apache/ivy/core/resolve/RestartResolveProcess.java
+++ b/src/java/org/apache/ivy/core/resolve/RestartResolveProcess.java
@@ -25,6 +25,7 @@ package org.apache.ivy.core.resolve;
* since the resolve engine itself won't check the same exception is not thrown ad libitum
* </p>
*/
+@SuppressWarnings("serial")
public class RestartResolveProcess extends ResolveProcessException {
public RestartResolveProcess(String message) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/resolve/VisitNode.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/resolve/VisitNode.java b/src/java/org/apache/ivy/core/resolve/VisitNode.java
index ff2d5a1..c38bce1 100644
--- a/src/java/org/apache/ivy/core/resolve/VisitNode.java
+++ b/src/java/org/apache/ivy/core/resolve/VisitNode.java
@@ -37,16 +37,13 @@ import org.apache.ivy.util.Checks;
/**
* A visit node is an object used to represent one visit from one parent on an {@link IvyNode} of
* the dependency graph. During dependency resolution, the {@link ResolveEngine} visits nodes of the
- * depency graph following the dependencies, thus the same node can be visited several times, if it
- * is requested from several module. In this case you will have one VisitNode per parent and per
+ * dependency graph following the dependencies, thus the same node can be visited several times, if
+ * it is requested from several module. In this case you will have one VisitNode per parent and per
* root module configuration. Thus VisitNode stores data specific to the visit:
* <ul>
- * <li>parent</li>
- * the node from which the visit is occuring
- * <li>parentConf</li>
- * the configuration of the parent in which this node is visited
- * <li>rootModuleConf</li>
- * the configuration of the root module which is currently resolved
+ * <li>parent</li> the node from which the visit is occurring
+ * <li>parentConf</li> the configuration of the parent in which this node is visited
+ * <li>rootModuleConf</li> the configuration of the root module which is currently resolved
* </ul>
*/
public class VisitNode {
@@ -66,7 +63,7 @@ public class VisitNode {
private VisitNode root = null;
/**
- * Direct path from root to this node. Note that the colleciton is ordered but is not a list
+ * Direct path from root to this node. Note that the collection is ordered but is not a list
* implementation This collection is null until it is required, see getPath
*/
private Collection<VisitNode> path = null;
@@ -156,7 +153,7 @@ public class VisitNode {
/**
* Get an ordered collection with the nodes from the root to this node
*
- * @return
+ * @return Collection<VisitNode>
*/
public Collection<VisitNode> getPath() {
if (path == null) {
@@ -232,18 +229,14 @@ public class VisitNode {
}
DependencyDescriptor dd = node.getDependencyDescriptor(getParentNode());
- if ((dd != null) && dd.isTransitive()) {
- return true;
- }
+ return (dd != null) && dd.isTransitive()
+ || node.hasAnyMergedUsageWithTransitiveDependency(rootModuleConf);
- return node.hasAnyMergedUsageWithTransitiveDependency(rootModuleConf);
}
/**
* Checks if the current node's parent configuration is transitive.
- *
- * @param node
- * current node
+ *
* @return true if the node's parent configuration is transitive
*/
protected boolean isParentConfTransitive() {
@@ -421,12 +414,12 @@ public class VisitNode {
/**
* Returns true if this node can already be found in the path
*
- * @return
+ * @return boolean
*/
public boolean isCircular() {
if (isCircular == null) {
if (parent != null) {
- isCircular = Boolean.FALSE; // asumme it's false, and see if it isn't by checking
+ isCircular = Boolean.FALSE; // assume it's false, and see if it isn't by checking
// the parent path
for (VisitNode ancestor : parent.getPath()) {
if (getId().getModuleId().equals(ancestor.getId().getModuleId())) {
@@ -438,7 +431,7 @@ public class VisitNode {
isCircular = Boolean.FALSE;
}
}
- return isCircular.booleanValue();
+ return isCircular;
}
public String[] getConfsToFetch() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/retrieve/RetrieveEngine.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/retrieve/RetrieveEngine.java b/src/java/org/apache/ivy/core/retrieve/RetrieveEngine.java
index 57481de..0e0d68c 100644
--- a/src/java/org/apache/ivy/core/retrieve/RetrieveEngine.java
+++ b/src/java/org/apache/ivy/core/retrieve/RetrieveEngine.java
@@ -79,10 +79,10 @@ public class RetrieveEngine {
@Deprecated
public int retrieve(ModuleRevisionId mrid, String destFilePattern, RetrieveOptions options)
throws IOException {
- RetrieveOptions retieveOptions = new RetrieveOptions(options);
- retieveOptions.setDestArtifactPattern(destFilePattern);
+ RetrieveOptions retrieveOptions = new RetrieveOptions(options);
+ retrieveOptions.setDestArtifactPattern(destFilePattern);
- RetrieveReport result = retrieve(mrid, retieveOptions);
+ RetrieveReport result = retrieve(mrid, retrieveOptions);
return result.getNbrArtifactsCopied();
}
@@ -486,7 +486,7 @@ public class RetrieveEngine {
* The returned comparator should consider greater the artifact which gains the conflict battle.
* This is used only during retrieve... prefer resolve conflict manager to resolve conflicts.
*
- * @return
+ * @return Comparator<ArtifactDownloadReport>
*/
private Comparator<ArtifactDownloadReport> getConflictResolvingPolicy() {
return new Comparator<ArtifactDownloadReport>() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/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 c80bb71..d3d4443 100644
--- a/src/java/org/apache/ivy/core/retrieve/RetrieveOptions.java
+++ b/src/java/org/apache/ivy/core/retrieve/RetrieveOptions.java
@@ -67,7 +67,7 @@ public class RetrieveOptions extends LogOptions {
private String overwriteMode = OVERWRITEMODE_NEWER;
/**
- * True if the original files should be used insteaad of their cache copy.
+ * True if the original files should be used instead of their cache copy.
*/
private boolean useOrigin = false;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/search/SearchEngine.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/search/SearchEngine.java b/src/java/org/apache/ivy/core/search/SearchEngine.java
index b35ee92..537566f 100644
--- a/src/java/org/apache/ivy/core/search/SearchEngine.java
+++ b/src/java/org/apache/ivy/core/search/SearchEngine.java
@@ -52,8 +52,9 @@ public class SearchEngine {
* Returns an empty array when no token values are found.
*
* @param token
+ * ditto
* @param otherTokenValues
- * @return
+ * @return String[]
*/
public String[] listTokenValues(String token, Map<String, Object> otherTokenValues) {
Set<String> entries = new LinkedHashSet<String>();
@@ -177,9 +178,10 @@ public class SearchEngine {
* ModuleId are returned in the system namespace.
* </p>
*
- * @param criteria
+ * @param moduleCrit
+ * ModuleId
* @param matcher
- * @return
+ * @return ModuleId[]
*/
public ModuleId[] listModules(ModuleId moduleCrit, PatternMatcher matcher) {
List<ModuleId> ret = new ArrayList<ModuleId>();
@@ -213,9 +215,10 @@ public class SearchEngine {
* ModuleRevisionId are returned in the system namespace.
* </p>
*
- * @param criteria
+ * @param moduleCrit
+ * ModuleRevisionId
* @param matcher
- * @return
+ * @return ModuleRevisionId[]
*/
public ModuleRevisionId[] listModules(ModuleRevisionId moduleCrit, PatternMatcher matcher) {
List<ModuleRevisionId> ret = new ArrayList<ModuleRevisionId>();
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/settings/IvySettings.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/settings/IvySettings.java b/src/java/org/apache/ivy/core/settings/IvySettings.java
index b5f4849..89c68ef 100644
--- a/src/java/org/apache/ivy/core/settings/IvySettings.java
+++ b/src/java/org/apache/ivy/core/settings/IvySettings.java
@@ -116,7 +116,7 @@ import org.apache.ivy.util.url.URLHandlerRegistry;
public class IvySettings implements SortEngineSettings, PublishEngineSettings, ParserSettings,
DeliverEngineSettings, CheckEngineSettings, InstallEngineSettings, ResolverSettings,
ResolveEngineSettings, RetrieveEngineSettings, RepositoryManagementEngineSettings {
- private static final long INTERUPT_TIMEOUT = 2000;
+ private static final long INTERRUPT_TIMEOUT = 2000;
private Map<String, Class<?>> typeDefs = new HashMap<String, Class<?>>();
@@ -642,7 +642,7 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
* Returns the variables loaded in configuration file. Those variables may better be seen as ant
* properties
*
- * @return
+ * @return IvyVariableContainer
*/
public synchronized IvyVariableContainer getVariables() {
return variableContainer;
@@ -1212,7 +1212,7 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
* Filters the names list by removing all names that should be ignored as defined by the listing
* ignore list
*
- * @param names
+ * @param names ditto
*/
public synchronized void filterIgnore(Collection<String> names) {
names.removeAll(listingIgnore);
@@ -1325,42 +1325,42 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
public synchronized boolean logModulesInUse() {
String var = getVariable("ivy.log.modules.in.use");
- return var == null || Boolean.valueOf(var).booleanValue();
+ return var == null || Boolean.valueOf(var);
}
public synchronized boolean logModuleWhenFound() {
String var = getVariable("ivy.log.module.when.found");
- return var == null || Boolean.valueOf(var).booleanValue();
+ return var == null || Boolean.valueOf(var);
}
public synchronized boolean logResolvedRevision() {
String var = getVariable("ivy.log.resolved.revision");
- return var == null || Boolean.valueOf(var).booleanValue();
+ return var == null || Boolean.valueOf(var);
}
public synchronized boolean debugConflictResolution() {
if (debugConflictResolution == null) {
String var = getVariable("ivy.log.conflict.resolution");
- debugConflictResolution = Boolean.valueOf(var != null
- && Boolean.valueOf(var).booleanValue());
+ debugConflictResolution = var != null
+ && Boolean.valueOf(var);
}
- return debugConflictResolution.booleanValue();
+ return debugConflictResolution;
}
public synchronized boolean debugLocking() {
if (debugLocking == null) {
String var = getVariable("ivy.log.locking");
- debugLocking = Boolean.valueOf(var != null && Boolean.valueOf(var).booleanValue());
+ debugLocking = var != null && Boolean.valueOf(var);
}
- return debugLocking.booleanValue();
+ return debugLocking;
}
public synchronized boolean dumpMemoryUsage() {
if (dumpMemoryUsage == null) {
String var = getVariable("ivy.log.memory");
- dumpMemoryUsage = Boolean.valueOf(var != null && Boolean.valueOf(var).booleanValue());
+ dumpMemoryUsage = var != null && Boolean.valueOf(var);
}
- return dumpMemoryUsage.booleanValue();
+ return dumpMemoryUsage;
}
public synchronized boolean logNotConvertedExclusionRule() {
@@ -1422,7 +1422,7 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
}
public final long getInterruptTimeout() {
- return INTERUPT_TIMEOUT;
+ return INTERRUPT_TIMEOUT;
}
public synchronized Collection<DependencyResolver> getResolvers() {
@@ -1444,7 +1444,7 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
/**
* Use a different variable container.
*
- * @param variables
+ * @param variables IvyVariableContainer
*/
public synchronized void setVariableContainer(IvyVariableContainer variables) {
variableContainer = variables;
@@ -1509,7 +1509,7 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
/**
* Validates all {@link Validatable} objects in the collection.
*
- * @param objects
+ * @param values
* the collection of objects to validate.
* @throws IllegalStateException
* if any of the objects is not valid.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java b/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java
index a40cc1c..bb9cad3 100644
--- a/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java
+++ b/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java
@@ -302,7 +302,7 @@ public class XmlSettingsParser extends DefaultHandler {
Message.deprecated("'checkUpToDate' is deprecated, "
+ "use the 'overwriteMode' on the 'ivy:retrieve' task instead (" + settings
+ ")");
- ivy.setCheckUpToDate(Boolean.valueOf(up2d).booleanValue());
+ ivy.setCheckUpToDate(Boolean.valueOf(up2d));
}
String resolutionDir = (String) attributes.get("resolutionCacheDir");
if (resolutionDir != null) {
@@ -310,7 +310,7 @@ public class XmlSettingsParser extends DefaultHandler {
}
String useOrigin = (String) attributes.get("useOrigin");
if (useOrigin != null) {
- ivy.setDefaultUseOrigin(Boolean.valueOf(useOrigin).booleanValue());
+ ivy.setDefaultUseOrigin(Boolean.valueOf(useOrigin));
}
String cacheIvyPattern = (String) attributes.get("ivyPattern");
if (cacheIvyPattern != null) {
@@ -346,18 +346,18 @@ public class XmlSettingsParser extends DefaultHandler {
}
String validate = (String) attributes.get("validate");
if (validate != null) {
- ivy.setValidate(Boolean.valueOf(validate).booleanValue());
+ ivy.setValidate(Boolean.valueOf(validate));
}
String up2d = (String) attributes.get("checkUpToDate");
if (up2d != null) {
Message.deprecated("'checkUpToDate' is deprecated, "
+ "use the 'overwriteMode' on the 'ivy:retrieve' task instead (" + settings
+ ")");
- ivy.setCheckUpToDate(Boolean.valueOf(up2d).booleanValue());
+ ivy.setCheckUpToDate(Boolean.valueOf(up2d));
}
String useRemoteConfig = (String) attributes.get("useRemoteConfig");
if (useRemoteConfig != null) {
- ivy.setUseRemoteConfig(Boolean.valueOf(useRemoteConfig).booleanValue());
+ ivy.setUseRemoteConfig(Boolean.valueOf(useRemoteConfig));
}
String cacheIvyPattern = (String) attributes.get("cacheIvyPattern");
if (cacheIvyPattern != null) {
@@ -402,7 +402,7 @@ public class XmlSettingsParser extends DefaultHandler {
"bad include tag: specify file or url to include");
} else {
try {
- // First asume that it is an absolute URL
+ // First assume that it is an absolute URL
settingsURL = new URL(propFilePath);
} catch (MalformedURLException e) {
// If that fail, it may be because it is a relative one.
@@ -477,8 +477,7 @@ public class XmlSettingsParser extends DefaultHandler {
String environmentPrefix = (String) attributes.get("environment");
if (propFilePath != null) {
String overrideStr = (String) attributes.get("override");
- boolean override = overrideStr == null ? true : Boolean.valueOf(overrideStr)
- .booleanValue();
+ boolean override = (overrideStr == null) ? true : Boolean.valueOf(overrideStr);
Message.verbose("loading properties: " + propFilePath);
try {
URL fileUrl = urlFromFileAttribute(propFilePath);
@@ -506,8 +505,8 @@ public class XmlSettingsParser extends DefaultHandler {
if (value == null) {
throw new IllegalArgumentException("missing attribute value on property tag");
}
- ivy.setVariable(name, value, override == null ? true : Boolean.valueOf(override)
- .booleanValue(), isSetVar, unlessSetVar);
+ ivy.setVariable(name, value, (override == null) ? true : Boolean.valueOf(override),
+ isSetVar, unlessSetVar);
}
private void typedefStarted(Map attributes) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/sort/CollectionOfModulesToSort.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/sort/CollectionOfModulesToSort.java b/src/java/org/apache/ivy/core/sort/CollectionOfModulesToSort.java
index c185e37..1f335b9 100644
--- a/src/java/org/apache/ivy/core/sort/CollectionOfModulesToSort.java
+++ b/src/java/org/apache/ivy/core/sort/CollectionOfModulesToSort.java
@@ -31,7 +31,7 @@ import org.apache.ivy.core.module.id.ModuleId;
import org.apache.ivy.plugins.version.VersionMatcher;
/**
- * Wrap a collection of descriptores wrapped themself in ModuleInSort elements. It contains some
+ * Wrap a collection of descriptors wrapped themselves in ModuleInSort elements. It contains some
* dedicated function to retrieve module descriptors based on dependencies descriptors.<br>
* <i>This class is designed to be used internally by the ModuleDescriptorSorter.</i>
*/
@@ -51,7 +51,7 @@ class CollectionOfModulesToSort implements Iterable<ModuleInSort> {
* @param matcher
* The matcher to used to check if dependencyDescriptor match a module in this
* collection
- * @param nonMatchingVersionReporter
+ * @param nonMatchingVersionReporter ditto
*/
public CollectionOfModulesToSort(Collection<ModuleDescriptor> modulesToSort,
VersionMatcher matcher, NonMatchingVersionReporter nonMatchingVersionReporter) {
@@ -87,7 +87,7 @@ class CollectionOfModulesToSort implements Iterable<ModuleInSort> {
/**
* Find a matching module descriptor in the list of module to sort.
*
- * @param descriptor
+ * @param descriptor ditto
* @return a ModuleDescriptor from the collection of module descriptors to sort. If none exists
* returns null.
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/sort/ModuleInSort.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/sort/ModuleInSort.java b/src/java/org/apache/ivy/core/sort/ModuleInSort.java
index f0f5556..225ee88 100644
--- a/src/java/org/apache/ivy/core/sort/ModuleInSort.java
+++ b/src/java/org/apache/ivy/core/sort/ModuleInSort.java
@@ -34,7 +34,8 @@ import org.apache.ivy.util.Message;
* ModuleInSort can be used in only one ModuleDescriptorSorter at a time.<br>
* The added fields are : <br>
* <ul>
- * <li><code>isSorted</code> : is true iff this module has already been added to the sorted list.</li>
+ * <li><code>isSorted</code> : is true iff this module has already been added to the sorted list.
+ * </li>
* <li><code>loopElements</code> : When the module is the root of a loop (=the first element of a
* loop met during the sort), <code>loopElements</code> contains all ModuleInSort of the loop
* (excluding the root itself.</li>
@@ -99,12 +100,12 @@ class ModuleInSort {
/**
* Check if a adding this element as a dependency of caller will introduce a circular
- * dependency. If it is, all the elements of the loop are flaged as 'loopIntermediateElement',
+ * dependency. If it is, all the elements of the loop are flagged as 'loopIntermediateElement',
* and the loopElements of this module (which is the root of the loop) is updated. The
* depStrategy is invoked on order to report a correct circular loop message.
*
- * @param futurCaller
- * @param depStrategy
+ * @param futurCaller ModuleInSort
+ * @param depStrategy CircularDependencyStrategy
* @return true if a loop is detected.
*/
public boolean checkLoop(ModuleInSort futurCaller, CircularDependencyStrategy depStrategy) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/sort/NonMatchingVersionReporter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/sort/NonMatchingVersionReporter.java b/src/java/org/apache/ivy/core/sort/NonMatchingVersionReporter.java
index 5870474..d713bd6 100644
--- a/src/java/org/apache/ivy/core/sort/NonMatchingVersionReporter.java
+++ b/src/java/org/apache/ivy/core/sort/NonMatchingVersionReporter.java
@@ -29,7 +29,7 @@ public interface NonMatchingVersionReporter {
* @param descriptor
* The non matching dependency descriptor.
* @param md
- * The module to sort having the corect moduleID but a non matching revision
+ * The module to sort having the correct moduleID but a non matching revision
*/
public void reportNonMatchingVersion(DependencyDescriptor descriptor, ModuleDescriptor md);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java b/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
index 136a32c..c97d966 100644
--- a/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
+++ b/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
@@ -80,7 +80,7 @@ public class BundleInfoAdapter {
*
* @param baseUri
* uri to help build the absolute url if the bundle info has a relative uri.
- * @return
+ * @return DefaultModuleDescriptor ditto
* @throws ProfileNotFoundException
*/
public static DefaultModuleDescriptor toModuleDescriptor(ModuleDescriptorParser parser,
@@ -249,7 +249,7 @@ public class BundleInfoAdapter {
try {
return new URI(builder.toString());
} catch (URISyntaxException e) {
- throw new RuntimeException("illformed ivy url", e);
+ throw new RuntimeException("ill-formed ivy url", e);
}
}
@@ -301,8 +301,7 @@ public class BundleInfoAdapter {
}
ModuleRevisionId amrid = ModuleRevisionId.newInstance(org, name, branch, rev);
- DefaultArtifact artifact = new DefaultArtifact(amrid, null, art, type, ext);
- return artifact;
+ return new DefaultArtifact(amrid, null, art, type, ext);
}
private static void requirementAsDependency(DefaultModuleDescriptor md, BundleInfo bundleInfo,
@@ -360,6 +359,7 @@ public class BundleInfoAdapter {
return ModuleRevisionId.newInstance(type, name, revision);
}
+ @SuppressWarnings("serial")
public static class ProfileNotFoundException extends RuntimeException {
public ProfileNotFoundException(String msg) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/core/ManifestParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/core/ManifestParser.java b/src/java/org/apache/ivy/osgi/core/ManifestParser.java
index 2aec72f..dcac35e 100644
--- a/src/java/org/apache/ivy/osgi/core/ManifestParser.java
+++ b/src/java/org/apache/ivy/osgi/core/ManifestParser.java
@@ -49,12 +49,14 @@ public class ManifestParser {
private static final String BUNDLE_VERSION = "Bundle-Version";
+ @SuppressWarnings("unused")
private static final String BUNDLE_NAME = "Bundle-Name";
private static final String BUNDLE_DESCRIPTION = "Bundle-Description";
private static final String BUNDLE_SYMBOLIC_NAME = "Bundle-SymbolicName";
+ @SuppressWarnings("unused")
private static final String BUNDLE_MANIFEST_VERSION = "Bundle-ManifestVersion";
private static final String BUNDLE_REQUIRED_EXECUTION_ENVIRONMENT = "Bundle-RequiredExecutionEnvironment";
@@ -73,20 +75,19 @@ public class ManifestParser {
public static BundleInfo parseJarManifest(InputStream jarStream) throws IOException,
ParseException {
+ @SuppressWarnings("resource")
JarInputStream jis = new JarInputStream(jarStream);
Manifest manifest = jis.getManifest();
if (manifest == null) {
return null;
}
- BundleInfo bundleInfo = parseManifest(manifest);
- return bundleInfo;
+ return parseManifest(manifest);
}
public static BundleInfo parseManifest(File manifestFile) throws IOException, ParseException {
FileInputStream fis = new FileInputStream(manifestFile);
try {
- BundleInfo parseManifest = parseManifest(fis);
- return parseManifest;
+ return parseManifest(fis);
} finally {
try {
fis.close();
@@ -184,7 +185,7 @@ public class ManifestParser {
parseCapability(bundleInfo, mainAttributes, EXPORT_SERVICE, BundleInfo.SERVICE_TYPE);
- // handle Eclipse specific source attachement
+ // handle Eclipse specific source attachment
String eclipseSourceBundle = mainAttributes.getValue(ECLIPSE_SOURCE_BUNDLE);
if (eclipseSourceBundle != null) {
bundleInfo.setSource(true);
@@ -269,8 +270,8 @@ public class ManifestParser {
* Ensure that the lines are not longer than 72 characters, so it can be parsed by the
* {@link Manifest} class
*
- * @param manifest
- * @return
+ * @param manifest ditto
+ * @return String
*/
public static String formatLines(String manifest) {
StringBuffer buffer = new StringBuffer(manifest.length());
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/core/OSGiManifestParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/core/OSGiManifestParser.java b/src/java/org/apache/ivy/osgi/core/OSGiManifestParser.java
index e331161..a0cc45b 100644
--- a/src/java/org/apache/ivy/osgi/core/OSGiManifestParser.java
+++ b/src/java/org/apache/ivy/osgi/core/OSGiManifestParser.java
@@ -20,7 +20,6 @@ package org.apache.ivy.osgi.core;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
-import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.text.ParseException;
@@ -54,10 +53,8 @@ public class OSGiManifestParser implements ModuleDescriptorParser {
}
public boolean accept(Resource res) {
- if (res == null || res.getName() == null || res.getName().trim().equals("")) {
- return false;
- }
- return res.getName().toUpperCase(Locale.US).endsWith("MANIFEST.MF");
+ return !(res == null || res.getName() == null || res.getName().trim().equals(""))
+ && res.getName().toUpperCase(Locale.US).endsWith("MANIFEST.MF");
}
public ModuleDescriptor parseDescriptor(ParserSettings ivySettings, URL descriptorURL,
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/core/OsgiLatestStrategy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/core/OsgiLatestStrategy.java b/src/java/org/apache/ivy/osgi/core/OsgiLatestStrategy.java
index 4cdf906..aeb0b49 100644
--- a/src/java/org/apache/ivy/osgi/core/OsgiLatestStrategy.java
+++ b/src/java/org/apache/ivy/osgi/core/OsgiLatestStrategy.java
@@ -36,15 +36,8 @@ public class OsgiLatestStrategy extends ComparatorLatestStrategy {
final class MridComparator implements Comparator<ModuleRevisionId> {
public int compare(ModuleRevisionId o1, ModuleRevisionId o2) {
- Version v1;
- Version v2;
- try {
- v1 = new Version(o1.getRevision());
- v2 = new Version(o2.getRevision());
- } catch (ParseException e) {
- throw new RuntimeException("Uncomparable versions:" + o1.getRevision() + " and "
- + o2.getRevision() + " (" + e.getMessage() + ")");
- }
+ Version v1 = new Version(o1.getRevision());
+ Version v2 = new Version(o2.getRevision());
try {
return v1.compareTo(v2);
} catch (RuntimeException e) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/osgi/core/jvm-packages.properties
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/core/jvm-packages.properties b/src/java/org/apache/ivy/osgi/core/jvm-packages.properties
index 4aa4ec1..fb9e030 100644
--- a/src/java/org/apache/ivy/osgi/core/jvm-packages.properties
+++ b/src/java/org/apache/ivy/osgi/core/jvm-packages.properties
@@ -26,7 +26,7 @@ OSGi/Minimum-1.1.pkglist =
OSGi/Minimum-1.2.aliases = OSGI_MINIMUM-1.2
OSGi/Minimum-1.2.pkglist =
-CDC-1.0/Foundation-1.0.aliases = CDC-1.0_Foundation-1.0
+CDC-1.0/Foundation-1.0.aliases = CDC-1.0_Foundation-1.0
CDC-1.0/Foundation-1.0.pkglist = \
javax.microedition.io
[12/15] ant-ivy git commit: Do not download findbugs every time
Posted by jh...@apache.org.
Do not download findbugs every time
Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/4498bdaf
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/4498bdaf
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/4498bdaf
Branch: refs/heads/master
Commit: 4498bdaf5b5ed138c4a32ca9a885e5fa6fee7e6d
Parents: af06da9
Author: twogee <g....@gmail.com>
Authored: Sun May 28 15:50:19 2017 +0200
Committer: twogee <g....@gmail.com>
Committed: Sun May 28 15:50:19 2017 +0200
----------------------------------------------------------------------
build.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/4498bdaf/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 29a48be..1bed091 100644
--- a/build.xml
+++ b/build.xml
@@ -648,7 +648,8 @@
description="JVMArgs for invoking Findbugs"/>
<mkdir dir="${findbugs.download.to}"/>
- <get src="${findbugs.download.url}" dest="${findbugs.download.to}/${findbugs.download.file}"/>
+ <get src="${findbugs.download.url}" dest="${findbugs.download.to}/${findbugs.download.file}"
+ usetimestamp="true" skipexisting="true"/>
<unzip src="${findbugs.download.to}/${findbugs.download.file}" dest="${findbugs.download.to}"/>
<property name="findbugs.home" location="${findbugs.download.to}/${findbugs.download.name}"/>
<mkdir dir="${findbugs.home}/plugin"/>
[02/15] ant-ivy git commit: More code cleanup
Posted by jh...@apache.org.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/parser/AbstractModuleDescriptorParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/AbstractModuleDescriptorParser.java b/src/java/org/apache/ivy/plugins/parser/AbstractModuleDescriptorParser.java
index 0dd9bb3..6307ff0 100644
--- a/src/java/org/apache/ivy/plugins/parser/AbstractModuleDescriptorParser.java
+++ b/src/java/org/apache/ivy/plugins/parser/AbstractModuleDescriptorParser.java
@@ -61,10 +61,10 @@ public abstract class AbstractModuleDescriptorParser implements ModuleDescriptor
private String defaultConf; // used only as defaultconf, not used for
- // guesssing right side part of a mapping
+ // guessing right side part of a mapping
private String defaultConfMapping; // same as default conf but is used
- // for guesssing right side part of a mapping
+ // for guessing right side part of a mapping
private DefaultDependencyDescriptor defaultConfMappingDescriptor;
private Resource res;
@@ -113,33 +113,33 @@ public abstract class AbstractModuleDescriptorParser implements ModuleDescriptor
}
protected void parseDepsConfs(String confs, DefaultDependencyDescriptor dd,
- boolean useDefaultMappingToGuessRightOperande) {
- parseDepsConfs(confs, dd, useDefaultMappingToGuessRightOperande, true);
+ boolean useDefaultMappingToGuessRightOperand) {
+ parseDepsConfs(confs, dd, useDefaultMappingToGuessRightOperand, true);
}
protected void parseDepsConfs(String confs, DefaultDependencyDescriptor dd,
- boolean useDefaultMappingToGuessRightOperande, boolean evaluateConditions) {
+ boolean useDefaultMappingToGuessRightOperand, boolean evaluateConditions) {
if (confs == null) {
return;
}
String[] conf = confs.split(";");
- parseDepsConfs(conf, dd, useDefaultMappingToGuessRightOperande, evaluateConditions);
+ parseDepsConfs(conf, dd, useDefaultMappingToGuessRightOperand, evaluateConditions);
}
protected void parseDepsConfs(String[] conf, DefaultDependencyDescriptor dd,
- boolean useDefaultMappingToGuessRightOperande) {
- parseDepsConfs(conf, dd, useDefaultMappingToGuessRightOperande, true);
+ boolean useDefaultMappingToGuessRightOperand) {
+ parseDepsConfs(conf, dd, useDefaultMappingToGuessRightOperand, true);
}
protected void parseDepsConfs(String[] conf, DefaultDependencyDescriptor dd,
- boolean useDefaultMappingToGuessRightOperande, boolean evaluateConditions) {
+ boolean useDefaultMappingToGuessRightOperand, boolean evaluateConditions) {
replaceConfigurationWildcards(md);
for (int i = 0; i < conf.length; i++) {
String[] ops = conf[i].split("->");
if (ops.length == 1) {
String[] modConfs = ops[0].split(",");
- if (!useDefaultMappingToGuessRightOperande) {
+ if (!useDefaultMappingToGuessRightOperand) {
for (int j = 0; j < modConfs.length; j++) {
dd.addDependencyConfiguration(modConfs[j].trim(), modConfs[j].trim());
}
@@ -182,20 +182,20 @@ public abstract class AbstractModuleDescriptorParser implements ModuleDescriptor
}
if (md.isMappingOverride()) {
- addExtendingConfigurations(conf, dd, useDefaultMappingToGuessRightOperande);
+ addExtendingConfigurations(conf, dd, useDefaultMappingToGuessRightOperand);
}
}
/**
* Evaluate the optional condition in the given configuration, like "[org=MYORG]confX". If
* the condition evaluates to true, the configuration is returned, if the condition
- * evaluatate to false, null is returned. If there are no conditions, the configuration
+ * evaluates to false, null is returned. If there are no conditions, the configuration
* itself is returned.
*
* @param conf
* the configuration to evaluate
* @param dd
- * the dependencydescriptor to which the configuration will be added
+ * the dependency descriptor to which the configuration will be added
* @return the evaluated condition
*/
private String evaluateCondition(String conf, DefaultDependencyDescriptor dd) {
@@ -250,14 +250,14 @@ public abstract class AbstractModuleDescriptorParser implements ModuleDescriptor
}
private void addExtendingConfigurations(String[] confs, DefaultDependencyDescriptor dd,
- boolean useDefaultMappingToGuessRightOperande) {
+ boolean useDefaultMappingToGuessRightOperand) {
for (int i = 0; i < confs.length; i++) {
- addExtendingConfigurations(confs[i], dd, useDefaultMappingToGuessRightOperande);
+ addExtendingConfigurations(confs[i], dd, useDefaultMappingToGuessRightOperand);
}
}
private void addExtendingConfigurations(String conf, DefaultDependencyDescriptor dd,
- boolean useDefaultMappingToGuessRightOperande) {
+ boolean useDefaultMappingToGuessRightOperand) {
Set<String> configsToAdd = new HashSet<String>();
Configuration[] configs = md.getConfigurations();
for (int i = 0; i < configs.length; i++) {
@@ -267,13 +267,13 @@ public abstract class AbstractModuleDescriptorParser implements ModuleDescriptor
String configName = configs[i].getName();
configsToAdd.add(configName);
addExtendingConfigurations(configName, dd,
- useDefaultMappingToGuessRightOperande);
+ useDefaultMappingToGuessRightOperand);
}
}
}
String[] confs = configsToAdd.toArray(new String[configsToAdd.size()]);
- parseDepsConfs(confs, dd, useDefaultMappingToGuessRightOperande);
+ parseDepsConfs(confs, dd, useDefaultMappingToGuessRightOperand);
}
protected DependencyDescriptor getDefaultConfMappingDescriptor() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
index cbb2eed..4967457 100644
--- a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
+++ b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
@@ -502,14 +502,14 @@ public class PomModuleDescriptorBuilder {
return result;
}
- private static String getDependencyMgtExtraInfoKeyForVersion(String groupId, String artifaceId) {
+ private static String getDependencyMgtExtraInfoKeyForVersion(String groupId, String artifactId) {
return DEPENDENCY_MANAGEMENT + EXTRA_INFO_DELIMITER + groupId + EXTRA_INFO_DELIMITER
- + artifaceId + EXTRA_INFO_DELIMITER + "version";
+ + artifactId + EXTRA_INFO_DELIMITER + "version";
}
- private static String getDependencyMgtExtraInfoKeyForScope(String groupId, String artifaceId) {
+ private static String getDependencyMgtExtraInfoKeyForScope(String groupId, String artifactId) {
return DEPENDENCY_MANAGEMENT + EXTRA_INFO_DELIMITER + groupId + EXTRA_INFO_DELIMITER
- + artifaceId + EXTRA_INFO_DELIMITER + "scope";
+ + artifactId + EXTRA_INFO_DELIMITER + "scope";
}
private static String getPropertyExtraInfoKey(String propertyName) {
@@ -517,9 +517,9 @@ public class PomModuleDescriptorBuilder {
}
private static String getDependencyMgtExtraInfoPrefixForExclusion(String groupId,
- String artifaceId) {
+ String artifactId) {
return DEPENDENCY_MANAGEMENT + EXTRA_INFO_DELIMITER + groupId + EXTRA_INFO_DELIMITER
- + artifaceId + EXTRA_INFO_DELIMITER + "exclusion_";
+ + artifactId + EXTRA_INFO_DELIMITER + "exclusion_";
}
private static List<ModuleId> getDependencyMgtExclusions(ModuleDescriptor descriptor,
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
index c7d82ba..9bb6433 100644
--- a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
+++ b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
@@ -176,7 +176,7 @@ public final class PomModuleDescriptorParser implements ModuleDescriptorParser {
+ " relocated to " + relocation
+ ". Please update your dependency to directly use the right version.");
Message.warn("Resolution will only pick dependencies of the relocated element."
- + " Artefact and other metadata will be ignored.");
+ + " Artifact and other metadata will be ignored.");
ResolvedModuleRevision relocatedModule = parseOtherPom(ivySettings, relocation);
if (relocatedModule == null) {
throw new ParseException(
@@ -233,7 +233,7 @@ public final class PomModuleDescriptorParser implements ModuleDescriptorParser {
// add plugins from parent
for (PomDependencyMgt pomDependencyMgt : PomModuleDescriptorBuilder
.getPlugins(parentDescr)) {
- mdBuilder.addPlugin((PomDependencyMgt) pomDependencyMgt);
+ mdBuilder.addPlugin(pomDependencyMgt);
}
}
@@ -399,8 +399,7 @@ public final class PomModuleDescriptorParser implements ModuleDescriptorParser {
return null;
} else {
dd = NameSpaceHelper.toSystem(dd, ivySettings.getContextNamespace());
- ResolvedModuleRevision otherModule = resolver.getDependency(dd, data);
- return otherModule;
+ return resolver.getDependency(dd, data);
}
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java
index 7dc318f..e2f72c0 100644
--- a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java
+++ b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java
@@ -51,6 +51,7 @@ public final class PomModuleDescriptorWriter {
private static final String SKIP_LINE = "SKIP_LINE";
+ @SuppressWarnings("serial")
private static final ConfigurationScopeMapping DEFAULT_MAPPING = new ConfigurationScopeMapping(
new LinkedHashMap<String, String>() {
{
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java b/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java
index bfefe7c..b9e8201 100644
--- a/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java
+++ b/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java
@@ -153,8 +153,9 @@ public class PomReader {
}
/**
- * Add a property if not yet set and value is not null. This garantee that property keep the
- * first value that is put on it and that the properties are never null.
+ * Add a property if not yet set and value is not null. This guarantees
+ * that property keeps the first value that is put on it and that the
+ * properties are never null.
*/
public void setProperty(String prop, String val) {
if (!properties.containsKey(prop) && val != null) {
@@ -535,7 +536,7 @@ public class PomReader {
return false;
}
String propertyValue = getFirstChildText(propertyActivation, VALUE);
-
+
Map<String, String> pomProperties = PomReader.this.getPomProperties();
boolean matched;
if (propertyValue == null || "".equals(propertyValue)) {
@@ -695,8 +696,7 @@ public class PomReader {
return prefix[count++];
}
- int result = super.read();
- return result;
+ return super.read();
}
@Override
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
index 1a247bb..a272d65 100644
--- a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
+++ b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
@@ -100,13 +100,13 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
}
/**
- * @param settings
+ * @param ivySettings ParserSettings
* @param xmlURL
* the url pointing to the file to parse
* @param res
* the real resource to parse, used for log only
- * @param validate
- * @return
+ * @param validate boolean
+ * @return ModuleDescriptor
* @throws ParseException
* @throws IOException
*/
@@ -412,7 +412,7 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
* <li>ask repositories to retrieve the parent module descriptor</li>
* </ul>
*
- * @param attributes
+ * @param attributes Attributes
* @throws ParseException
*/
protected void extendsStarted(Attributes attributes) throws ParseException {
@@ -523,7 +523,7 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
* Merge everything from a given parent
*
* @param parent
- * a given parent module desciptor
+ * a given parent module descriptor
*/
protected void mergeAll(ModuleDescriptor parent) {
mergeInfo(parent);
@@ -535,10 +535,10 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
}
/**
- * Explain how to inherit metadatas related to info element
+ * Explain how to inherit metadata related to info element
*
* @param parent
- * a given parent module decriptor
+ * a given parent module descriptor
*/
protected void mergeInfo(ModuleDescriptor parent) {
ModuleRevisionId parentMrid = parent.getModuleRevisionId();
@@ -590,10 +590,8 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
/**
* Describes how to merge configurations elements
*
- * @param sourceMrid
- * the source module revision id
- * @param configurations
- * array of configurations to be inherited
+ * @param parent
+ * the module descriptor
*/
protected void mergeConfigurations(ModuleDescriptor parent) {
ModuleRevisionId sourceMrid = parent.getModuleRevisionId();
@@ -849,14 +847,13 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
String visibility = settings.substitute(attributes.getValue("visibility"));
String ext = settings.substitute(attributes.getValue("extends"));
String transitiveValue = attributes.getValue("transitive");
- boolean transitive = (transitiveValue == null) ? true : Boolean.valueOf(
- attributes.getValue("transitive")).booleanValue();
+ boolean transitive = (transitiveValue == null) ? true
+ : Boolean.valueOf(attributes.getValue("transitive"));
String deprecated = attributes.getValue("deprecated");
Configuration configuration = new Configuration(conf,
- Configuration.Visibility.getVisibility(visibility == null ? "public"
- : visibility), settings.substitute(attributes
- .getValue("description")), ext == null ? null : ext.split(","),
- transitive, deprecated);
+ Configuration.Visibility.getVisibility((visibility == null) ? "public"
+ : visibility), settings.substitute(attributes.getValue("description")),
+ (ext == null) ? null : ext.split(","), transitive, deprecated);
ExtendableItemHelper.fillExtraAttributes(settings, configuration, attributes,
new String[] {"name", "visibility", "extends", "transitive", "description",
"deprecated"});
@@ -903,14 +900,12 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
if (org == null) {
org = getMd().getModuleRevisionId().getOrganisation();
}
- boolean force = Boolean.valueOf(settings.substitute(attributes.getValue("force")))
- .booleanValue();
- boolean changing = Boolean
- .valueOf(settings.substitute(attributes.getValue("changing"))).booleanValue();
+ boolean force = Boolean.valueOf(settings.substitute(attributes.getValue("force")));
+ boolean changing = Boolean.valueOf(settings.substitute(attributes.getValue("changing")));
String transitiveValue = settings.substitute(attributes.getValue("transitive"));
- boolean transitive = (transitiveValue == null) ? true : Boolean.valueOf(
- attributes.getValue("transitive")).booleanValue();
+ boolean transitive = (transitiveValue == null) ? true
+ : Boolean.valueOf(attributes.getValue("transitive"));
String name = settings.substitute(attributes.getValue("name"));
String branch = settings.substitute(attributes.getValue("branch"));
@@ -1008,7 +1003,7 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
String confMappingOverride = settings.substitute(attributes
.getValue("confmappingoverride"));
if (confMappingOverride != null) {
- getMd().setMappingOverride(Boolean.valueOf(confMappingOverride).booleanValue());
+ getMd().setMappingOverride(Boolean.valueOf(confMappingOverride));
}
checkConfigurations();
}
@@ -1018,8 +1013,7 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
setDefaultConfMapping(settings.substitute(attributes.getValue("defaultconfmapping")));
setDefaultConf(settings.substitute(attributes.getValue("defaultconf")));
getMd().setMappingOverride(
- Boolean.valueOf(settings.substitute(attributes.getValue("confmappingoverride")))
- .booleanValue());
+ Boolean.valueOf(settings.substitute(attributes.getValue("confmappingoverride"))));
}
protected void infoStarted(Attributes attributes) {
@@ -1053,7 +1047,7 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
getMd().setStatus(
status == null ? settings.getStatusManager().getDefaultStatus() : status);
getMd().setDefault(
- Boolean.valueOf(settings.substitute(attributes.getValue("default"))).booleanValue());
+ Boolean.valueOf(settings.substitute(attributes.getValue("default"))));
String pubDate = settings.substitute(attributes.getValue("publication"));
if (pubDate != null && pubDate.length() > 0) {
try {
@@ -1271,7 +1265,7 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
buffer.deleteCharAt(buffer.length() - 1);
buffer.append("/>");
} else {
- buffer.append("</" + qName + ">");
+ buffer.append("</").append(qName).append(">");
}
}
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java
index 9880f2d..b373acf 100644
--- a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java
+++ b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java
@@ -221,7 +221,7 @@ public final class XmlModuleDescriptorUpdater {
if (options.getConfsToExclude() != null) {
this.confs = Arrays.asList(options.getConfsToExclude());
} else {
- this.confs = Collections.EMPTY_LIST;
+ this.confs = Collections.emptyList();
}
}
@@ -920,7 +920,9 @@ public final class XmlModuleDescriptorUpdater {
}
}
- /** get the whitespace that should precede new elements at the current depth in the document */
+ /**
+ * get the whitespace that should precede new elements at the current depth in the document
+ */
private String getIndent() {
int level = context.size() - 1;
fillIndents(level);
@@ -1279,11 +1281,11 @@ public final class XmlModuleDescriptorUpdater {
if (print == null) {
return defaultPrint;
}
- return print.booleanValue();
+ return print;
}
void setPrint(boolean print) {
- this.print = Boolean.valueOf(print);
+ this.print = print;
}
void setDefaultPrint(boolean print) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java
index 2206663..828307b 100644
--- a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java
+++ b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java
@@ -552,6 +552,7 @@ public final class XmlModuleDescriptorWriter {
}
}
+ @SuppressWarnings("deprecation")
private static boolean requireInnerInfoElement(ModuleDescriptor md) {
return md.getExtraInfo().size() > 0 || md.getExtraInfos().size() > 0
|| md.getHomePage() != null
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/report/XmlReportParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/report/XmlReportParser.java b/src/java/org/apache/ivy/plugins/report/XmlReportParser.java
index 633eb56..c24fc11 100644
--- a/src/java/org/apache/ivy/plugins/report/XmlReportParser.java
+++ b/src/java/org/apache/ivy/plugins/report/XmlReportParser.java
@@ -78,7 +78,7 @@ public class XmlReportParser {
revisionArtifacts = new ArrayList<ArtifactDownloadReport>();
branch = attributes.getValue("branch");
revision = attributes.getValue("name");
- isDefault = Boolean.valueOf(attributes.getValue("default")).booleanValue();
+ isDefault = Boolean.valueOf(attributes.getValue("default"));
// retrieve position from file. If no position is found, it may be an old
// report generated with a previous version,
// in which case, we put it at the last position
@@ -137,7 +137,7 @@ public class XmlReportParser {
}
if (attributes.getValue("origin-location") != null) {
if (ArtifactOrigin.isUnknown(attributes.getValue("origin-location"))) {
- madr.setArtifactOrigin(ArtifactOrigin.unkwnown(madr.getArtifact()));
+ madr.setArtifactOrigin(ArtifactOrigin.unknown(madr.getArtifact()));
} else {
madr.setArtifactOrigin(new ArtifactOrigin(madr.getArtifact(),
parseBoolean(attributes.getValue("origin-is-local")),
@@ -175,7 +175,7 @@ public class XmlReportParser {
.get(revisionArtifacts.size() - 1);
if (ArtifactOrigin.isUnknown(attributes.getValue("location"))) {
- aReport.setArtifactOrigin(ArtifactOrigin.unkwnown(aReport.getArtifact()));
+ aReport.setArtifactOrigin(ArtifactOrigin.unknown(aReport.getArtifact()));
} else {
aReport.setArtifactOrigin(new ArtifactOrigin(aReport.getArtifact(),
parseBoolean(attributes.getValue("is-local")), attributes
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/repository/Resource.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/Resource.java b/src/java/org/apache/ivy/plugins/repository/Resource.java
index ea3ef01..7a62269 100644
--- a/src/java/org/apache/ivy/plugins/repository/Resource.java
+++ b/src/java/org/apache/ivy/plugins/repository/Resource.java
@@ -47,7 +47,7 @@ public interface Resource {
/**
* Get the name of the resource.
*
- * @return the repositorie's assigned resource name/identifier.
+ * @return the repository's assigned resource name/identifier.
*/
public String getName();
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/repository/TransferEvent.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/TransferEvent.java b/src/java/org/apache/ivy/plugins/repository/TransferEvent.java
index d7697e3..68c5adf 100644
--- a/src/java/org/apache/ivy/plugins/repository/TransferEvent.java
+++ b/src/java/org/apache/ivy/plugins/repository/TransferEvent.java
@@ -23,7 +23,7 @@ import org.apache.ivy.core.event.IvyEvent;
/**
* TransferEvent is used to notify TransferListeners about progress in transfer of resources form/to
- * the respository This class is LARGELY inspired by org.apache.maven.wagon.events.TransferEvent
+ * the repository This class is LARGELY inspired by org.apache.maven.wagon.events.TransferEvent
* released under the following copyright license:
*
* <pre>
@@ -44,7 +44,7 @@ import org.apache.ivy.core.event.IvyEvent;
*
* </pre>
*
- * Orginal class written by Michal Maczka.
+ * Original class written by Michal Maczka.
*/
public class TransferEvent extends IvyEvent {
/**
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java b/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java
index 1f5f93a..3b31ee9 100644
--- a/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java
+++ b/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java
@@ -86,6 +86,7 @@ public class SFTPRepository extends AbstractSshBasedRepository {
* @return a fully initialized resource, able to answer to all its methods without needing any
* further connection
*/
+ @SuppressWarnings("unchecked")
public Resource resolveResource(String path) {
try {
ChannelSftp c = getSftpChannel(path);
@@ -105,7 +106,7 @@ public class SFTPRepository extends AbstractSshBasedRepository {
}
} catch (Exception e) {
Message.debug("Error while resolving resource " + path, e);
- // silent fail, return unexisting resource
+ // silent fail, return nonexistent resource
}
return new BasicResource(path, false, 0, 0, false);
@@ -199,6 +200,7 @@ public class SFTPRepository extends AbstractSshBasedRepository {
return result;
}
+ @SuppressWarnings("unchecked")
public List list(String parent) throws IOException {
try {
ChannelSftp c = getSftpChannel(parent);
@@ -240,12 +242,9 @@ public class SFTPRepository extends AbstractSshBasedRepository {
* to check
* @param channel
* to use
- * @returns true if file exists, false otherwise
- * @throws IOException
- * @throws SftpException
+ * @return true if file exists, false otherwise
*/
- private boolean checkExistence(String file, ChannelSftp channel) throws IOException,
- SftpException {
+ private boolean checkExistence(String file, ChannelSftp channel) {
try {
return channel.stat(file) != null;
} catch (SftpException ex) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java b/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java
index e8a5aed..276cc25 100644
--- a/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java
+++ b/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java
@@ -63,7 +63,7 @@ public abstract class AbstractSshBasedRepository extends AbstractRepository {
**/
private static HashMap credentialsCache = new HashMap();
- private static final int MAX_CREDENTILAS_CACHE_SIZE = 100;
+ private static final int MAX_CREDENTIALS_CACHE_SIZE = 100;
/**
* get a new session using the default attributes if the given String is a full uri, use the
@@ -168,7 +168,7 @@ public abstract class AbstractSshBasedRepository extends AbstractRepository {
}
/**
- * Called, when user was not found in URL. Maintain static hashe of credentials and retrieve or
+ * Called, when user was not found in URL. Maintain static hash of credentials and retrieve or
* ask credentials for host.
*
* @param host
@@ -181,7 +181,7 @@ public abstract class AbstractSshBasedRepository extends AbstractRepository {
Credentials c = CredentialsUtil.promptCredentials(new Credentials(null, host, user,
userPassword), getPassFile());
if (c != null) {
- if (credentialsCache.size() > MAX_CREDENTILAS_CACHE_SIZE) {
+ if (credentialsCache.size() > MAX_CREDENTIALS_CACHE_SIZE) {
credentialsCache.clear();
}
credentialsCache.put(host, c);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/repository/ssh/RemoteScpException.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/ssh/RemoteScpException.java b/src/java/org/apache/ivy/plugins/repository/ssh/RemoteScpException.java
index bf09516..6765e48 100644
--- a/src/java/org/apache/ivy/plugins/repository/ssh/RemoteScpException.java
+++ b/src/java/org/apache/ivy/plugins/repository/ssh/RemoteScpException.java
@@ -19,7 +19,7 @@ package org.apache.ivy.plugins.repository.ssh;
/**
* This exception will be used for Remote SCP Exceptions (failures on the target system, no
- * connetion probs)
+ * connection probs)
*/
public class RemoteScpException extends Exception {
@@ -29,22 +29,22 @@ public class RemoteScpException extends Exception {
}
/**
- * @param message
+ * @param message ditto
*/
public RemoteScpException(String message) {
super(message);
}
/**
- * @param cause
+ * @param cause Throwable
*/
public RemoteScpException(Throwable cause) {
super(cause);
}
/**
- * @param message
- * @param cause
+ * @param message ditto
+ * @param cause Throwable
*/
public RemoteScpException(String message, Throwable cause) {
super(message, cause);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java b/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java
index ab53876..934ac7d 100644
--- a/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java
+++ b/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java
@@ -275,6 +275,7 @@ public class Scp {
fileInfo.setLastModified(modtime);
}
+ @SuppressWarnings("resource")
private void sendFile(Channel channel, String localFile, String remoteName, String mode)
throws IOException, RemoteScpException {
byte[] buffer = new byte[BUFFER_SIZE];
@@ -354,7 +355,7 @@ public class Scp {
* ssh channel to use
* @param file
* to receive from remote
- * @param target
+ * @param targetStream
* to store file into (if null, get only file info)
* @return file information of the file we received
* @throws IOException
@@ -450,7 +451,7 @@ public class Scp {
}
/**
- * @return
+ * @return ChannelExec
* @throws JSchException
*/
private ChannelExec getExecChannel() throws JSchException {
@@ -476,6 +477,7 @@ public class Scp {
* @throws RemoteScpException
* in case of problems on the target system (connection ok)
*/
+ @SuppressWarnings("unused")
public void put(String localFile, String remoteTargetDir, String remoteTargetName, String mode)
throws IOException, RemoteScpException {
ChannelExec channel = null;
@@ -550,6 +552,7 @@ public class Scp {
*/
public void get(String remoteFile, OutputStream localTarget) throws IOException,
RemoteScpException {
+ @SuppressWarnings("unused")
ChannelExec channel = null;
if ((remoteFile == null) || (localTarget == null)) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java b/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
index 095ec61..de87655 100644
--- a/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
+++ b/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
@@ -53,7 +53,7 @@ public final class SshCache {
private static final int SSH_DEFAULT_PORT = 22;
private SshCache() {
- };
+ }
private static SshCache instance = new SshCache();
@@ -151,7 +151,7 @@ public final class SshCache {
/**
* key is username / host / port
*
- * @see SshCache.createCacheKey() for details
+ * @see #createCacheKey(String, String, int) for details
*/
private Map uriCacheMap = new HashMap();
@@ -162,9 +162,13 @@ public final class SshCache {
/**
* retrieves a session entry for a given hostname from the cache
- *
- * @param hostname
+ *
+ * @param user
* to retrieve session for
+ * @param host
+ * ditto
+ * @param port
+ * ditto
* @return null or the existing entry
*/
private Entry getCacheEntry(String user, String host, int port) {
@@ -172,7 +176,7 @@ public final class SshCache {
}
/**
- * Creates a cobined cache key from the given key parts
+ * Creates a combined cache key from the given key parts
*
* @param user
* name of the user
@@ -241,7 +245,7 @@ public final class SshCache {
}
/**
- * discardes session entries from the cache
+ * discards session entries from the cache
*
* @param session
* to clear
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java b/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java
index ec5240c..cbe654f 100644
--- a/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java
+++ b/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java
@@ -71,7 +71,7 @@ public class SshRepository extends AbstractSshBasedRepository {
*
* @param source
* ssh uri for the file to get info for
- * @return SshResource filled with the needed informations
+ * @return SshResource filled with the needed information
* @see org.apache.ivy.plugins.repository.Repository#getResource(java.lang.String)
*/
public SshResource resolveResource(String source) {
@@ -195,9 +195,8 @@ public class SshRepository extends AbstractSshBasedRepository {
}
/**
- * @param session
- * @return
- * @throws JSchException
+ * @param session Session
+ * @return ChannelExec
*/
private ChannelExec getExecChannel(Session session) throws IOException {
ChannelExec channel;
@@ -215,7 +214,7 @@ public class SshRepository extends AbstractSshBasedRepository {
*
* @param command
* with argument placeholder or not
- * @param argument
+ * @param argument ditto
* @return replaced full command
*/
private String replaceArgument(String command, String argument) {
@@ -283,7 +282,7 @@ public class SshRepository extends AbstractSshBasedRepository {
*
* @param path
* to create
- * @param connnection
+ * @param session
* to use
*/
private void makePath(String path, Session session) throws IOException {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/repository/ssh/SshResource.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/ssh/SshResource.java b/src/java/org/apache/ivy/plugins/repository/ssh/SshResource.java
index 7fc797e..74a0cca 100644
--- a/src/java/org/apache/ivy/plugins/repository/ssh/SshResource.java
+++ b/src/java/org/apache/ivy/plugins/repository/ssh/SshResource.java
@@ -116,13 +116,7 @@ public class SshResource implements Resource {
}
public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append("SshResource:");
- buffer.append(uri);
- buffer.append(" (");
- buffer.append(len);
- buffer.append(")]");
- return buffer.toString();
+ return "SshResource:" + uri + " (" + len + ")]";
}
public boolean isLocal() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/repository/url/URLRepository.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/url/URLRepository.java b/src/java/org/apache/ivy/plugins/repository/url/URLRepository.java
index 098ccc3..2897642 100644
--- a/src/java/org/apache/ivy/plugins/repository/url/URLRepository.java
+++ b/src/java/org/apache/ivy/plugins/repository/url/URLRepository.java
@@ -131,7 +131,7 @@ public class URLRepository extends AbstractRepository {
}
return ret;
} else {
- return Collections.EMPTY_LIST;
+ return Collections.emptyList();
}
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java b/src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java
index aead7cf..6519811 100644
--- a/src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java
+++ b/src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java
@@ -118,7 +118,7 @@ public class VfsRepository extends AbstractRepository {
/**
* Get a VfsResource
*
- * @param source
+ * @param vfsURI
* a <code>String</code> identifying a VFS Resource
* @throws <code>IOException</code> on failure
* @see "Supported File Systems in the jakarta-commons-vfs documentation"
@@ -190,7 +190,7 @@ public class VfsRepository extends AbstractRepository {
* Transfer an Ivy resource to a VFS repository
*
* @param source
- * a <code>File</code> indentifying the local file to transfer to the repository
+ * a <code>File</code> identifying the local file to transfer to the repository
* @param vfsURI
* a <code>String</code> identifying the destination VFS Resource.
* @param overwrite
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java b/src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java
index 5cd7cc2..5a97924 100644
--- a/src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java
+++ b/src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java
@@ -80,8 +80,8 @@ public class VfsResource implements Resource {
}
/**
- * Get a list of direct descendents of the given resource. Note that attempts to get a list of
- * children does <emphasize>not</emphasize> result in an error. Instead an error message is
+ * Get a list of direct descendants of the given resource. Note that attempts to get a list of
+ * children does <em>not</em> result in an error. Instead an error message is
* logged and an empty ArrayList returned.
*
* @return A <code>ArrayList</code> of VFSResources
@@ -127,7 +127,7 @@ public class VfsResource implements Resource {
* The VFS FileName getURI method seems to have a bug in it where file: URIs will have 4 forward
* slashes instead of 3.
*
- * @param vfsURI
+ * @param vfsURI ditto
* @return a normalized <class>String</class> representing the VFS URI
*/
public static String normalize(String vfsURI) {
@@ -185,9 +185,9 @@ public class VfsResource implements Resource {
return resourceImpl.exists();
// originally I only checked for a FileSystemException. I expanded it to
// include all exceptions when I found it would throw a NPE exception when the query was
- // run on non-wellformed VFS URI.
+ // run on ill-formed VFS URI.
} catch (Exception e) {
- Message.verbose("Fail to check the existance of the resource " + getName(), e);
+ Message.verbose("Fail to check the existence of the resource " + getName(), e);
return false;
}
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/repository/vsftp/VsftpRepository.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/vsftp/VsftpRepository.java b/src/java/org/apache/ivy/plugins/repository/vsftp/VsftpRepository.java
index 13f773f..1ec8f4f 100644
--- a/src/java/org/apache/ivy/plugins/repository/vsftp/VsftpRepository.java
+++ b/src/java/org/apache/ivy/plugins/repository/vsftp/VsftpRepository.java
@@ -43,7 +43,7 @@ import org.apache.ivy.util.Message;
/**
* Repository using SecureCRT vsftp command line program to access an sftp repository This is
- * especially useful to leverage the gssapi authentication supported by SecureCRT. In caseswhere
+ * especially useful to leverage the gssapi authentication supported by SecureCRT. In cases where
* usual sftp is enough, prefer the 100% java solution of sftp repository. This requires SecureCRT
* to be in the PATH. Tested with SecureCRT 5.0.5
*/
@@ -305,7 +305,7 @@ public class VsftpRepository extends AbstractRepository {
* stream, even if everything is ok. So it's quite difficult if there was an error or not. Hence
* we compare the response with the expected message and deal with it. The problem is that this
* is very specific to the version of vsftp used for the test, That's why expected messages are
- * obtained using overridable protected methods.
+ * obtained using overriddable protected methods.
*/
protected void sendCommand(String command, Pattern expectedResponse, long timeout)
throws IOException {
@@ -366,6 +366,7 @@ public class VsftpRepository extends AbstractRepository {
return readResponse(sendErrorAsResponse, readTimeout);
}
+ @SuppressWarnings("deprecation")
protected synchronized String readResponse(final boolean sendErrorAsResponse, long timeout)
throws IOException {
final StringBuffer response = new StringBuffer();
@@ -638,9 +639,9 @@ public class VsftpRepository extends AbstractRepository {
/**
* Parses a ls -l line and transforms it in a resource
*
- * @param file
- * @param responseLine
- * @return
+ * @param file ditto
+ * @param responseLine ditto
+ * @return Resource
*/
protected Resource lslToResource(String file, String responseLine) {
if (responseLine == null || responseLine.startsWith("ls")) {
@@ -729,7 +730,7 @@ public class VsftpRepository extends AbstractRepository {
* Sets the reuse connection time. The same connection will be reused if the time here does not
* last between two commands. O indicates that the connection should never be reused
*
- * @param time
+ * @param time long
*/
public void setReuseConnection(long time) {
this.reuseConnection = time;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/resolver/AbstractPatternsBasedResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/AbstractPatternsBasedResolver.java b/src/java/org/apache/ivy/plugins/resolver/AbstractPatternsBasedResolver.java
index b813d38..ff99b8e 100644
--- a/src/java/org/apache/ivy/plugins/resolver/AbstractPatternsBasedResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/AbstractPatternsBasedResolver.java
@@ -273,7 +273,7 @@ public abstract class AbstractPatternsBasedResolver extends BasicResolver {
/**
* example of pattern : ~/Workspace/[module]/[module].ivy.xml
*
- * @param pattern
+ * @param pattern String
*/
public void addIvyPattern(String pattern) {
ivyPatterns.add(pattern);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/resolver/AbstractResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/AbstractResolver.java b/src/java/org/apache/ivy/plugins/resolver/AbstractResolver.java
index 7c5af9e..b310ed8 100644
--- a/src/java/org/apache/ivy/plugins/resolver/AbstractResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/AbstractResolver.java
@@ -144,18 +144,18 @@ public abstract class AbstractResolver implements DependencyResolver, HasLatestS
protected boolean doValidate(ResolveData data) {
if (validate != null) {
- return validate.booleanValue();
+ return validate;
} else {
return data.isValidate();
}
}
public boolean isValidate() {
- return validate == null ? true : validate.booleanValue();
+ return validate == null || validate;
}
public void setValidate(boolean validate) {
- this.validate = Boolean.valueOf(validate);
+ this.validate = validate;
}
protected void checkInterrupted() {
@@ -377,7 +377,7 @@ public abstract class AbstractResolver implements DependencyResolver, HasLatestS
}
public void setCheckmodified(boolean check) {
- checkmodified = Boolean.valueOf(check);
+ checkmodified = check;
}
public RepositoryCacheManager getRepositoryCacheManager() {
@@ -499,9 +499,10 @@ public abstract class AbstractResolver implements DependencyResolver, HasLatestS
* Returns true if rmr1 is after rmr2, using the latest strategy to determine which is the
* latest
*
- * @param rmr1
- * @param rmr2
- * @return
+ * @param rmr1 ResolvedModuleRevision
+ * @param rmr2 ResolvedModuleRevision
+ * @param date Date
+ * @return boolean
*/
protected boolean isAfter(ResolvedModuleRevision rmr1, ResolvedModuleRevision rmr2, Date date) {
ArtifactInfo[] ais = new ArtifactInfo[] {new ResolvedModuleRevisionArtifactInfo(rmr1),
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java b/src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java
index c309893..907ccb4 100644
--- a/src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java
@@ -66,7 +66,7 @@ public abstract class AbstractSshBasedResolver extends RepositoryResolver {
}
/**
- * Optional password file. If set the repository will use it as an encypted property file, to
+ * Optional password file. If set the repository will use it as an encrypted property file, to
* load username and passwd entries, and to store them if the user choose to do so. Defaults to
* user.dir/.ivy/[host].sftp.passwd, set it to null to disable this feature.
*/
@@ -147,8 +147,8 @@ public abstract class AbstractSshBasedResolver extends RepositoryResolver {
* sets the path to an OpenSSH-style config file to be used for reading configuration values for
* an ssh repository, such as a username
*
- * @param path
- * of the config file
+ * @param sshConfig
+ * path of the config file
*/
public void setSshConfig(String sshConfig) {
getSshBasedRepository().setSshConfig(sshConfig);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java b/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java
index 389998d..3f550b0 100644
--- a/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java
@@ -95,6 +95,7 @@ public abstract class BasicResolver extends AbstractResolver {
* converted in a message (either error or verbose) and returning null
* </p>
*/
+ @SuppressWarnings("serial")
private static class UnresolvedDependencyException extends RuntimeException {
private static final long serialVersionUID = 1L;
@@ -214,7 +215,7 @@ public abstract class BasicResolver extends AbstractResolver {
} else if (isForce() && rmr.getResolver() != this) {
Message.verbose("\t" + getName() + ": found revision in cache: " + systemMrid
+ " (resolved by " + rmr.getResolver().getName()
- + "): but we are in force mode, let's try to find one ourself");
+ + "): but we are in force mode, let's try to find one ourselves");
} else {
Message.verbose("\t" + getName() + ": revision in cache: " + systemMrid);
return checkLatest(systemDd, checkForcedResolvedModuleRevision(rmr), data);
@@ -583,16 +584,14 @@ public abstract class BasicResolver extends AbstractResolver {
Message.error("\t" + getName() + ": bad organisation found in " + ivyRef.getResource()
+ ": expected='" + mrid.getOrganisation() + "' found='"
+ md.getModuleRevisionId().getOrganisation() + "'");
- errors.append("bad organisation: expected='" + mrid.getOrganisation() + "' found='"
- + md.getModuleRevisionId().getOrganisation() + "'; ");
+ errors.append("bad organisation: expected='").append(mrid.getOrganisation()).append("' found='").append(md.getModuleRevisionId().getOrganisation()).append("'; ");
ok = false;
}
if (!mrid.getName().equals(md.getModuleRevisionId().getName())) {
Message.error("\t" + getName() + ": bad module name found in " + ivyRef.getResource()
+ ": expected='" + mrid.getName() + " found='"
+ md.getModuleRevisionId().getName() + "'");
- errors.append("bad module name: expected='" + mrid.getName() + "' found='"
- + md.getModuleRevisionId().getName() + "'; ");
+ errors.append("bad module name: expected='").append(mrid.getName()).append("' found='").append(md.getModuleRevisionId().getName()).append("'; ");
ok = false;
}
if (mrid.getBranch() != null
@@ -600,8 +599,7 @@ public abstract class BasicResolver extends AbstractResolver {
Message.error("\t" + getName() + ": bad branch name found in " + ivyRef.getResource()
+ ": expected='" + mrid.getBranch() + " found='"
+ md.getModuleRevisionId().getBranch() + "'");
- errors.append("bad branch name: expected='" + mrid.getBranch() + "' found='"
- + md.getModuleRevisionId().getBranch() + "'; ");
+ errors.append("bad branch name: expected='").append(mrid.getBranch()).append("' found='").append(md.getModuleRevisionId().getBranch()).append("'; ");
ok = false;
}
if (ivyRef.getRevision() != null && !ivyRef.getRevision().startsWith("working@")
@@ -611,15 +609,14 @@ public abstract class BasicResolver extends AbstractResolver {
Message.error("\t" + getName() + ": bad revision found in " + ivyRef.getResource()
+ ": expected='" + ivyRef.getRevision() + " found='"
+ md.getModuleRevisionId().getRevision() + "'");
- errors.append("bad revision: expected='" + ivyRef.getRevision() + "' found='"
- + md.getModuleRevisionId().getRevision() + "'; ");
+ errors.append("bad revision: expected='").append(ivyRef.getRevision()).append("' found='").append(md.getModuleRevisionId().getRevision()).append("'; ");
ok = false;
}
}
if (!getSettings().getStatusManager().isStatus(md.getStatus())) {
Message.error("\t" + getName() + ": bad status found in " + ivyRef.getResource()
+ ": '" + md.getStatus() + "'");
- errors.append("bad status: '" + md.getStatus() + "'; ");
+ errors.append("bad status: '").append(md.getStatus()).append("'; ");
ok = false;
}
for (Map.Entry<String, String> extra : mrid.getExtraAttributes().entrySet()) {
@@ -629,7 +626,7 @@ public abstract class BasicResolver extends AbstractResolver {
+ ": expected='" + extra.getValue() + "' found='"
+ md.getExtraAttribute(extra.getKey()) + "'";
Message.error("\t" + getName() + ": " + errorMsg);
- errors.append(errorMsg + ";");
+ errors.append(errorMsg).append(";");
ok = false;
}
}
@@ -878,10 +875,7 @@ public abstract class BasicResolver extends AbstractResolver {
@Override
public boolean exists(Artifact artifact) {
ResolvedResource artifactRef = getArtifactRef(artifact, null);
- if (artifactRef != null) {
- return artifactRef.getResource().exists();
- }
- return false;
+ return artifactRef != null && artifactRef.getResource().exists();
}
@Override
@@ -1067,8 +1061,8 @@ public abstract class BasicResolver extends AbstractResolver {
return checkconsistency;
}
- public void setCheckconsistency(boolean checkConsitency) {
- checkconsistency = checkConsitency;
+ public void setCheckconsistency(boolean checkConsistency) {
+ checkconsistency = checkConsistency;
}
public void setForce(boolean force) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/resolver/ChainResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/ChainResolver.java b/src/java/org/apache/ivy/plugins/resolver/ChainResolver.java
index e4a2987..8cf574c 100644
--- a/src/java/org/apache/ivy/plugins/resolver/ChainResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/ChainResolver.java
@@ -299,7 +299,7 @@ public class ChainResolver extends AbstractResolver {
return origin;
}
}
- return ArtifactOrigin.unkwnown(artifact);
+ return ArtifactOrigin.unknown(artifact);
}
@Override
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/resolver/DependencyResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/DependencyResolver.java b/src/java/org/apache/ivy/plugins/resolver/DependencyResolver.java
index 5d4c76c..8bd4898 100644
--- a/src/java/org/apache/ivy/plugins/resolver/DependencyResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/DependencyResolver.java
@@ -149,7 +149,7 @@ public interface DependencyResolver {
/**
* Reports last artifact download failure as Messages
*
- * @param art
+ * @param art Artifact
*/
void reportFailure(Artifact art);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/resolver/FileSystemResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/FileSystemResolver.java b/src/java/org/apache/ivy/plugins/resolver/FileSystemResolver.java
index fe0d0f2..8c7ca19 100644
--- a/src/java/org/apache/ivy/plugins/resolver/FileSystemResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/FileSystemResolver.java
@@ -220,7 +220,7 @@ public class FileSystemResolver extends RepositoryResolver {
return false;
}
checkSupportTransaction();
- return supportTransaction.booleanValue();
+ return supportTransaction;
}
private void closeTransaction() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/resolver/RepositoryResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/RepositoryResolver.java b/src/java/org/apache/ivy/plugins/resolver/RepositoryResolver.java
index 32c42ab..0084da0 100644
--- a/src/java/org/apache/ivy/plugins/resolver/RepositoryResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/RepositoryResolver.java
@@ -347,11 +347,11 @@ public class RepositoryResolver extends AbstractPatternsBasedResolver {
}
public boolean isAlwaysCheckExactRevision() {
- return alwaysCheckExactRevision == null ? true : alwaysCheckExactRevision.booleanValue();
+ return alwaysCheckExactRevision == null || alwaysCheckExactRevision;
}
public void setAlwaysCheckExactRevision(boolean alwaysCheckExactRevision) {
- this.alwaysCheckExactRevision = Boolean.valueOf(alwaysCheckExactRevision);
+ this.alwaysCheckExactRevision = alwaysCheckExactRevision;
}
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/resolver/SshResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/SshResolver.java b/src/java/org/apache/ivy/plugins/resolver/SshResolver.java
index f1114de..bdb5e98 100644
--- a/src/java/org/apache/ivy/plugins/resolver/SshResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/SshResolver.java
@@ -54,7 +54,7 @@ public class SshResolver extends AbstractSshBasedResolver {
/**
* set the command to get a directory listing the command has to be a shell command working on
* the target system and has to produce a listing of filenames, with each filename on a new line
- * the term %arg can be used in the command to substitue the path to be listed (e.g.
+ * the term %arg can be used in the command to substitute the path to be listed (e.g.
* "ls -1 %arg | grep -v CVS" to get a listing without CVS directory) if %arg is not part of the
* command, the path will be appended to the command default is: "ls -1"
*/
@@ -66,7 +66,7 @@ public class SshResolver extends AbstractSshBasedResolver {
* set the command to check for existence of a file the command has to be a shell command
* working on the target system and has to create an exit status of 0 for an existent file and
* <> 0 for a non existing file given as argument the term %arg can be used in the command to
- * substitue the path to be listed if %arg is not part of the command, the path will be appended
+ * substitute the path to be listed if %arg is not part of the command, the path will be appended
* to the command default is: "ls"
*/
public void setExistCommand(String cmd) {
@@ -76,7 +76,7 @@ public class SshResolver extends AbstractSshBasedResolver {
/**
* set the command to create a directory on the target system the command has to be a shell
* command working on the target system and has to create a directory with the given argument
- * the term %arg can be used in the command to substitue the path to be listed if %arg is not
+ * the term %arg can be used in the command to substitute the path to be listed if %arg is not
* part of the command, the path will be appended to the command default is: "mkdir"
*/
public void setCreateDirCommand(String cmd) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/resolver/packager/BuiltFileResource.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/packager/BuiltFileResource.java b/src/java/org/apache/ivy/plugins/resolver/packager/BuiltFileResource.java
index ce8912a..fdc5d9b 100644
--- a/src/java/org/apache/ivy/plugins/resolver/packager/BuiltFileResource.java
+++ b/src/java/org/apache/ivy/plugins/resolver/packager/BuiltFileResource.java
@@ -33,7 +33,7 @@ public class BuiltFileResource implements Resource {
/**
* Where the build file should put built artifacts (relative to the build directory). Value is:
- * * {@value}
+ * {@value}
*/
public static final String BUILT_ARTIFACT_PATTERN = "artifacts/[type]s/[artifact].[ext]";
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/resolver/util/ResolverHelper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/util/ResolverHelper.java b/src/java/org/apache/ivy/plugins/resolver/util/ResolverHelper.java
index d2575ed..2b7aec6 100644
--- a/src/java/org/apache/ivy/plugins/resolver/util/ResolverHelper.java
+++ b/src/java/org/apache/ivy/plugins/resolver/util/ResolverHelper.java
@@ -278,7 +278,7 @@ public final class ResolverHelper {
String acceptNamePattern = ".*"
+ IvyPatternHelper.substituteToken(namePattern, token, "([^/]+)")
+ ".*";
- Pattern p = Pattern.compile(acceptNamePattern.toString());
+ Pattern p = Pattern.compile(acceptNamePattern);
for (URL url : all) {
String path = standardize(url.getPath());
Matcher m = p.matcher(path);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/resolver/util/URLLister.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/util/URLLister.java b/src/java/org/apache/ivy/plugins/resolver/util/URLLister.java
index b8bc901..db1cd32 100644
--- a/src/java/org/apache/ivy/plugins/resolver/util/URLLister.java
+++ b/src/java/org/apache/ivy/plugins/resolver/util/URLLister.java
@@ -26,8 +26,8 @@ public interface URLLister {
* Indicates if this lister is able to list urls with the given pattern. In general, only
* protocol is used.
*
- * @param pattern
- * @return
+ * @param pattern ditto
+ * @return boolean
*/
boolean accept(String pattern);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/version/AbstractVersionMatcher.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/version/AbstractVersionMatcher.java b/src/java/org/apache/ivy/plugins/version/AbstractVersionMatcher.java
index e3100cb..b127005 100644
--- a/src/java/org/apache/ivy/plugins/version/AbstractVersionMatcher.java
+++ b/src/java/org/apache/ivy/plugins/version/AbstractVersionMatcher.java
@@ -54,8 +54,8 @@ public abstract class AbstractVersionMatcher implements VersionMatcher, IvySetti
}
/**
- * This method should be overriden in most cases, because it uses the default contract to return
- * 1 when it's not possible to know which revision is greater.
+ * This method should be overridden in most cases, because it uses the default contract to
+ * return 1 when it's not possible to know which revision is greater.
*/
public int compare(ModuleRevisionId askedMrid, ModuleRevisionId foundMrid,
Comparator staticComparator) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/version/ChainVersionMatcher.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/version/ChainVersionMatcher.java b/src/java/org/apache/ivy/plugins/version/ChainVersionMatcher.java
index fae5ca7..a1c159d 100644
--- a/src/java/org/apache/ivy/plugins/version/ChainVersionMatcher.java
+++ b/src/java/org/apache/ivy/plugins/version/ChainVersionMatcher.java
@@ -30,7 +30,7 @@ import org.apache.ivy.plugins.IvySettingsAware;
import org.apache.ivy.util.Checks;
/**
- * An implementation of {@link VersionMatcher} chaining several version matchers, and implemeting
+ * An implementation of {@link VersionMatcher} chaining several version matchers, and implementing
* the {@link VersionMatcher} interface by returning results from the first matcher in the chain
* accepting the version.
*/
@@ -83,7 +83,7 @@ public class ChainVersionMatcher extends AbstractVersionMatcher {
* Returns the list of matchers in the chain.
* <p>
* The list is returned as an unmodifiable view on the actual list of matchers, and will thus
- * reflect futher changes made in the chain.
+ * reflect further changes made in the chain.
*
* @return the list of matchers in the chain. Is never null.
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/version/LatestVersionMatcher.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/version/LatestVersionMatcher.java b/src/java/org/apache/ivy/plugins/version/LatestVersionMatcher.java
index 2ab2b33..cc60696 100644
--- a/src/java/org/apache/ivy/plugins/version/LatestVersionMatcher.java
+++ b/src/java/org/apache/ivy/plugins/version/LatestVersionMatcher.java
@@ -40,7 +40,7 @@ public class LatestVersionMatcher extends AbstractVersionMatcher {
public boolean needModuleDescriptor(ModuleRevisionId askedMrid, ModuleRevisionId foundMrid) {
List<Status> statuses = StatusManager.getCurrent().getStatuses();
- Status lowest = (Status) statuses.get(statuses.size() - 1);
+ Status lowest = statuses.get(statuses.size() - 1);
String latestLowest = "latest." + lowest.getName();
return !latestLowest.equals(askedMrid.getRevision());
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/version/VersionMatcher.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/version/VersionMatcher.java b/src/java/org/apache/ivy/plugins/version/VersionMatcher.java
index ffbc976..41f9533 100644
--- a/src/java/org/apache/ivy/plugins/version/VersionMatcher.java
+++ b/src/java/org/apache/ivy/plugins/version/VersionMatcher.java
@@ -56,9 +56,9 @@ public interface VersionMatcher {
* Indicates if this version matcher considers that the module revision found matches the asked
* one.
*
- * @param askedMrid
- * @param foundMrid
- * @return
+ * @param askedMrid ModuleRevisionId
+ * @param foundMrid ModuleRevisionId
+ * @return boolean
*/
public boolean accept(ModuleRevisionId askedMrid, ModuleRevisionId foundMrid);
@@ -67,7 +67,7 @@ public interface VersionMatcher {
* matches the asked one. Note that returning true in this method may imply big performance
* issues.
*
- * @return
+ * @return boolean
*/
public boolean needModuleDescriptor(ModuleRevisionId askedMrid, ModuleRevisionId foundMrid);
@@ -77,9 +77,9 @@ public interface VersionMatcher {
* foundMrid) returns false, so it is required to implement it in any case, a usual default
* implementation being: return accept(askedMrid, foundMD.getResolvedModuleRevisionId());
*
- * @param askedMrid
- * @param foundMD
- * @return
+ * @param askedMrid ModuleRevisionId
+ * @param foundMD ModuleDescriptor
+ * @return boolean
*/
public boolean accept(ModuleRevisionId askedMrid, ModuleDescriptor foundMD);
@@ -87,7 +87,7 @@ public interface VersionMatcher {
* Compares a dynamic revision (askedMrid) with a static one (foundMrid) to indicate which one
* should be considered the greater. If there is not enough information to know which one is the
* greater, the dynamic one should be considered greater and this method should return 0. This
- * method should never be called with a askdeMrid for which isDynamic returns false.
+ * method should never be called with a askedMrid for which isDynamic returns false.
*
* @param askedMrid
* the dynamic revision to compare
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/plugins/version/VersionRangeMatcher.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/version/VersionRangeMatcher.java b/src/java/org/apache/ivy/plugins/version/VersionRangeMatcher.java
index 7c59a3a..b547f4c 100644
--- a/src/java/org/apache/ivy/plugins/version/VersionRangeMatcher.java
+++ b/src/java/org/apache/ivy/plugins/version/VersionRangeMatcher.java
@@ -210,7 +210,7 @@ public class VersionRangeMatcher extends AbstractVersionMatcher {
}
int c = staticComparator.compare(ModuleRevisionId.newInstance(askedMrid, upper), foundMrid);
// if the comparison consider them equal, we must return -1, because we can't consider the
- // dynamic revision to be greater. Otherwise we can safeely return the result of the static
+ // dynamic revision to be greater. Otherwise we can safely return the result of the static
// comparison
return c == 0 ? -1 : c;
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/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 792f1e3..b3d1e61 100644
--- a/src/java/org/apache/ivy/util/ChecksumHelper.java
+++ b/src/java/org/apache/ivy/util/ChecksumHelper.java
@@ -75,7 +75,7 @@ public final class ChecksumHelper {
* @param algorithm
* the checksum algorithm to use
* @throws IOException
- * if an IO problem occur whle reading files or if the checksum is not compliant
+ * if an IO problem occur while reading files or if the checksum is not compliant
*/
public static void check(File dest, File checksumFile, String algorithm) throws IOException {
String csFileContent = FileUtil
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/util/ConfigurationUtils.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/ConfigurationUtils.java b/src/java/org/apache/ivy/util/ConfigurationUtils.java
index 1b5a637..343ece9 100644
--- a/src/java/org/apache/ivy/util/ConfigurationUtils.java
+++ b/src/java/org/apache/ivy/util/ConfigurationUtils.java
@@ -54,7 +54,7 @@ public final class ConfigurationUtils {
* the configurations, can contain wildcards
* @param md
* the configurations where the wildcards are replaced
- * @return
+ * @return configurations
*/
public static String[] replaceWildcards(String[] confs, ModuleDescriptor md) {
if (confs == null) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/util/CredentialsUtil.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/CredentialsUtil.java b/src/java/org/apache/ivy/util/CredentialsUtil.java
index 68a0ba8..9b5b7e0 100644
--- a/src/java/org/apache/ivy/util/CredentialsUtil.java
+++ b/src/java/org/apache/ivy/util/CredentialsUtil.java
@@ -38,6 +38,7 @@ import org.apache.ivy.Ivy;
public final class CredentialsUtil {
+ @SuppressWarnings("serial")
private static final class CredentialPanel extends JPanel {
private static final int FIELD_LENGTH = 20;
@@ -107,7 +108,7 @@ public final class CredentialsUtil {
String username = credentialPanel.userNameField.getText();
String passwd = credentialPanel.passwordField.getText();
if (credentialPanel.rememberDataCB.isSelected()) {
- Properties props = new EncrytedProperties();
+ Properties props = new EncryptedProperties();
props.setProperty("username", username);
props.setProperty("passwd", passwd);
FileOutputStream fos = null;
@@ -133,7 +134,7 @@ public final class CredentialsUtil {
public static Credentials loadPassfile(Credentials c, File passfile) {
if (passfile != null && passfile.exists()) {
- Properties props = new EncrytedProperties();
+ Properties props = new EncryptedProperties();
FileInputStream fis = null;
try {
fis = new FileInputStream(passfile);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/util/DefaultMessageLogger.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/DefaultMessageLogger.java b/src/java/org/apache/ivy/util/DefaultMessageLogger.java
index 7a88a36..bb3e84a 100644
--- a/src/java/org/apache/ivy/util/DefaultMessageLogger.java
+++ b/src/java/org/apache/ivy/util/DefaultMessageLogger.java
@@ -21,7 +21,7 @@ public class DefaultMessageLogger extends AbstractMessageLogger {
private int level = Message.MSG_INFO;
/**
- * @param level
+ * @param level ditto
*/
public DefaultMessageLogger(int level) {
this.level = level;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/util/EncryptedProperties.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/EncryptedProperties.java b/src/java/org/apache/ivy/util/EncryptedProperties.java
new file mode 100644
index 0000000..cbed952
--- /dev/null
+++ b/src/java/org/apache/ivy/util/EncryptedProperties.java
@@ -0,0 +1,65 @@
+/*
+ * 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
+ *
+ * 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;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * An implementation of Properties which stores the values encrypted. The use is transparent from
+ * the user point of view (use as any Properties instance), except that get, put and putAll do not
+ * handle encryption/decryption. This means that get returns the encrypted value, while put and
+ * putAll puts given values without encrypting them. It this thus recommended to void using them,
+ * use setProperty and getProperty instead.
+ */
+public class EncryptedProperties extends Properties {
+
+ public EncryptedProperties() {
+ super();
+ }
+
+ public synchronized Object setProperty(String key, String value) {
+ return StringUtils.decrypt((String) super.setProperty(key, StringUtils.encrypt(value)));
+ }
+
+ public String getProperty(String key) {
+ return StringUtils.decrypt(super.getProperty(key));
+ }
+
+ public String getProperty(String key, String defaultValue) {
+ return StringUtils.decrypt(super.getProperty(key, StringUtils.encrypt(defaultValue)));
+ }
+
+ public boolean containsValue(Object value) {
+ return super.containsValue(StringUtils.encrypt((String) value));
+ }
+
+ public synchronized boolean contains(Object value) {
+ return super.contains(StringUtils.encrypt((String) value));
+ }
+
+ public Collection values() {
+ List ret = new ArrayList(super.values());
+ for (int i = 0; i < ret.size(); i++) {
+ ret.set(i, StringUtils.decrypt((String) ret.get(i)));
+ }
+ return ret;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/util/EncrytedProperties.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/EncrytedProperties.java b/src/java/org/apache/ivy/util/EncrytedProperties.java
deleted file mode 100644
index 8d38fef..0000000
--- a/src/java/org/apache/ivy/util/EncrytedProperties.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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
- *
- * 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;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Properties;
-
-/**
- * An implementation of Properties which stores the values encrypted. The use is transparent from
- * the user point of view (use as any Properties instance), except that get, put and putAll do not
- * handle encryption/decryption. This means that get returns the encrypted value, while put and
- * putAll puts given values without encrypting them. It this thus recommended to void using them,
- * use setProperty and getProperty instead.
- */
-public class EncrytedProperties extends Properties {
-
- public EncrytedProperties() {
- super();
- }
-
- public synchronized Object setProperty(String key, String value) {
- return StringUtils.decrypt((String) super.setProperty(key, StringUtils.encrypt(value)));
- }
-
- public String getProperty(String key) {
- return StringUtils.decrypt(super.getProperty(key));
- }
-
- public String getProperty(String key, String defaultValue) {
- return StringUtils.decrypt(super.getProperty(key, StringUtils.encrypt(defaultValue)));
- }
-
- public boolean containsValue(Object value) {
- return super.containsValue(StringUtils.encrypt((String) value));
- }
-
- public synchronized boolean contains(Object value) {
- return super.contains(StringUtils.encrypt((String) value));
- }
-
- public Collection values() {
- List ret = new ArrayList(super.values());
- for (int i = 0; i < ret.size(); i++) {
- ret.set(i, StringUtils.decrypt((String) ret.get(i)));
- }
- return ret;
- }
-}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/util/FileResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/FileResolver.java b/src/java/org/apache/ivy/util/FileResolver.java
index 2827519..75e918c 100644
--- a/src/java/org/apache/ivy/util/FileResolver.java
+++ b/src/java/org/apache/ivy/util/FileResolver.java
@@ -33,7 +33,7 @@ public interface FileResolver {
*
* @param path
* The path of the file to resolve. Must not be <code>null</code>.
- * @param fileName
+ * @param filename
* The name of the file to resolve. This is used only for exception message if any.
* Must not be <code>null</code>.
*
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/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 e251f5c..aca4007 100644
--- a/src/java/org/apache/ivy/util/FileUtil.java
+++ b/src/java/org/apache/ivy/util/FileUtil.java
@@ -92,8 +92,7 @@ public final class FileUtil {
}
// Add to our buffer of commands
- sb.append("ln -s -f \"" + srcFile.getAbsolutePath() + "\" \""
- + destFile.getAbsolutePath() + "\";");
+ sb.append("ln -s -f \"").append(srcFile.getAbsolutePath()).append("\" \"").append(destFile.getAbsolutePath()).append("\";");
if (keyItr.hasNext()) {
sb.append("\n");
}
@@ -377,7 +376,7 @@ public final class FileUtil {
String line = in.readLine();
while (line != null) {
- buf.append(line + "\n");
+ buf.append(line).append("\n");
line = in.readLine();
}
return buf.toString();
@@ -459,7 +458,7 @@ public final class FileUtil {
* Returns a list of Files composed of all directories being parent of file and child of root +
* file and root themselves. Example: getPathFiles(new File("test"), new
* File("test/dir1/dir2/file.txt")) => {new File("test/dir1"), new File("test/dir1/dir2"), new
- * File("test/dir1/dir2/file.txt") } Note that if root is not an ancester of file, or if root is
+ * File("test/dir1/dir2/file.txt") } Note that if root is not an ancestor of file, or if root is
* null, all directories from the file system root will be returned.
*/
public static List<File> getPathFiles(File root, File file) {
@@ -484,7 +483,7 @@ public final class FileUtil {
* extracted.
* @param ignore
* a Collection of filenames which must be excluded from listing
- * @return A collectoin containing all the files of the given directory and it's subdirectories.
+ * @return A collection containing all the files of the given directory and it's subdirectories.
*/
public static Collection<File> listAll(File dir, Collection<String> ignore) {
return listAll(dir, new ArrayList<File>(), ignore);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/util/MemoryUtil.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/MemoryUtil.java b/src/java/org/apache/ivy/util/MemoryUtil.java
index fef4482..d27beba 100644
--- a/src/java/org/apache/ivy/util/MemoryUtil.java
+++ b/src/java/org/apache/ivy/util/MemoryUtil.java
@@ -65,8 +65,7 @@ public final class MemoryUtil {
long totalMemory = Runtime.getRuntime().totalMemory();
gc();
long freeMemory = Runtime.getRuntime().freeMemory();
- long usedMemory = totalMemory - freeMemory;
- return usedMemory;
+ return totalMemory - freeMemory;
}
private static void gc() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/util/MessageLogger.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/MessageLogger.java b/src/java/org/apache/ivy/util/MessageLogger.java
index 0c09efe..f08c0a5 100644
--- a/src/java/org/apache/ivy/util/MessageLogger.java
+++ b/src/java/org/apache/ivy/util/MessageLogger.java
@@ -50,7 +50,7 @@ public interface MessageLogger {
* @see Message#MSG_VERBOSE
* @see Message#MSG_INFO
* @see Message#MSG_WARN
- * @see Message#MSG_ERROR
+ * @see Message#MSG_ERR
*/
public abstract void log(String msg, int level);
[05/15] ant-ivy git commit: More code cleanup
Posted by jh...@apache.org.
More code cleanup
Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/6c92f32e
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/6c92f32e
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/6c92f32e
Branch: refs/heads/master
Commit: 6c92f32eda9effab1a3641c887538590e13da3c9
Parents: fbbf092
Author: twogee <g....@gmail.com>
Authored: Sat May 27 16:53:01 2017 +0200
Committer: twogee <g....@gmail.com>
Committed: Sat May 27 19:37:44 2017 +0200
----------------------------------------------------------------------
ivy.xml | 1 -
src/java/org/apache/ivy/Ivy.java | 16 +-
src/java/org/apache/ivy/Main.java | 5 +-
.../org/apache/ivy/ant/AntBuildTrigger.java | 9 +-
src/java/org/apache/ivy/ant/AntCallTrigger.java | 2 +-
.../org/apache/ivy/ant/AntMessageLogger.java | 8 +-
src/java/org/apache/ivy/ant/IvyAntSettings.java | 8 +-
.../apache/ivy/ant/IvyAntVariableContainer.java | 4 +-
.../org/apache/ivy/ant/IvyArtifactReport.java | 10 +-
src/java/org/apache/ivy/ant/IvyBuildList.java | 8 +-
.../org/apache/ivy/ant/IvyCacheFileset.java | 2 +-
src/java/org/apache/ivy/ant/IvyCachePath.java | 2 +-
src/java/org/apache/ivy/ant/IvyCacheTask.java | 2 +-
src/java/org/apache/ivy/ant/IvyCleanCache.java | 2 +-
src/java/org/apache/ivy/ant/IvyConflict.java | 6 +-
src/java/org/apache/ivy/ant/IvyDeliver.java | 4 +-
.../org/apache/ivy/ant/IvyDependencyTree.java | 2 +-
.../ivy/ant/IvyDependencyUpdateChecker.java | 5 +-
.../apache/ivy/ant/IvyExtractFromSources.java | 4 +-
src/java/org/apache/ivy/ant/IvyInstall.java | 6 +-
.../org/apache/ivy/ant/IvyPostResolveTask.java | 14 +-
src/java/org/apache/ivy/ant/IvyPublish.java | 6 +-
src/java/org/apache/ivy/ant/IvyReport.java | 6 +-
.../org/apache/ivy/ant/IvyRepositoryReport.java | 2 +-
src/java/org/apache/ivy/ant/IvyResolve.java | 6 +-
src/java/org/apache/ivy/ant/IvyRetrieve.java | 2 +-
src/java/org/apache/ivy/ant/IvyTask.java | 10 +-
src/java/org/apache/ivy/ant/PackageMapping.java | 2 +-
src/java/org/apache/ivy/core/IvyContext.java | 1 +
.../org/apache/ivy/core/IvyPatternHelper.java | 21 +--
src/java/org/apache/ivy/core/IvyThread.java | 2 +-
.../apache/ivy/core/RelativeUrlResolver.java | 8 +-
.../apache/ivy/core/cache/ArtifactOrigin.java | 14 +-
.../cache/DefaultRepositoryCacheManager.java | 39 ++--
.../cache/DefaultResolutionCacheManager.java | 2 +-
.../core/cache/ModuleDescriptorMemoryCache.java | 4 +-
.../ivy/core/cache/ParserSettingsMonitor.java | 6 +-
.../ivy/core/cache/RepositoryCacheManager.java | 187 ++++++++-----------
.../apache/ivy/core/deliver/DeliverOptions.java | 4 +-
.../PublishingDependencyRevisionResolver.java | 8 +-
.../org/apache/ivy/core/event/IvyEvent.java | 4 +-
.../apache/ivy/core/event/IvyEventFilter.java | 5 +-
.../event/publish/EndArtifactPublishEvent.java | 1 +
.../publish/StartArtifactPublishEvent.java | 1 +
.../apache/ivy/core/install/InstallEngine.java | 4 +-
.../descriptor/AbstractIncludeExcludeRule.java | 2 +-
.../core/module/descriptor/Configuration.java | 7 +-
.../module/descriptor/ConfigurationGroup.java | 2 +-
.../DefaultDependencyArtifactDescriptor.java | 12 +-
.../descriptor/DefaultDependencyDescriptor.java | 15 +-
.../descriptor/DefaultExtendsDescriptor.java | 5 +-
.../descriptor/DefaultModuleDescriptor.java | 16 +-
.../module/descriptor/DependencyDescriptor.java | 6 +-
.../ivy/core/module/descriptor/ExcludeRule.java | 4 +-
.../ivy/core/module/descriptor/IncludeRule.java | 6 +-
.../module/descriptor/ModuleDescriptor.java | 47 ++---
.../ivy/core/module/id/MatcherLookup.java | 2 +-
.../org/apache/ivy/core/module/id/ModuleId.java | 2 +-
.../ivy/core/module/id/ModuleRevisionId.java | 18 +-
.../ivy/core/module/status/StatusManager.java | 2 +-
.../apache/ivy/core/pack/OsgiBundlePacking.java | 3 +-
.../apache/ivy/core/pack/PackagingManager.java | 4 +-
.../org/apache/ivy/core/pack/ZipPacking.java | 3 +-
.../apache/ivy/core/publish/PublishEngine.java | 10 +-
.../core/report/ConfigurationResolveReport.java | 10 +-
.../apache/ivy/core/report/ResolveReport.java | 7 +-
.../repository/RepositoryManagementEngine.java | 2 +-
.../org/apache/ivy/core/resolve/IvyNode.java | 21 ++-
.../apache/ivy/core/resolve/IvyNodeCallers.java | 20 +-
.../ivy/core/resolve/IvyNodeEviction.java | 14 +-
.../apache/ivy/core/resolve/IvyNodeUsage.java | 12 +-
.../apache/ivy/core/resolve/ResolveData.java | 6 +-
.../apache/ivy/core/resolve/ResolveEngine.java | 21 +--
.../apache/ivy/core/resolve/ResolveOptions.java | 4 +-
.../core/resolve/ResolveProcessException.java | 1 +
.../core/resolve/ResolvedModuleRevision.java | 5 +-
.../ivy/core/resolve/RestartResolveProcess.java | 1 +
.../org/apache/ivy/core/resolve/VisitNode.java | 33 ++--
.../ivy/core/retrieve/RetrieveEngine.java | 8 +-
.../ivy/core/retrieve/RetrieveOptions.java | 2 +-
.../apache/ivy/core/search/SearchEngine.java | 13 +-
.../apache/ivy/core/settings/IvySettings.java | 32 ++--
.../ivy/core/settings/XmlSettingsParser.java | 19 +-
.../core/sort/CollectionOfModulesToSort.java | 6 +-
.../org/apache/ivy/core/sort/ModuleInSort.java | 9 +-
.../core/sort/NonMatchingVersionReporter.java | 2 +-
.../apache/ivy/osgi/core/BundleInfoAdapter.java | 8 +-
.../apache/ivy/osgi/core/ManifestParser.java | 15 +-
.../ivy/osgi/core/OSGiManifestParser.java | 7 +-
.../ivy/osgi/core/OsgiLatestStrategy.java | 11 +-
.../ivy/osgi/core/jvm-packages.properties | 2 +-
.../ivy/osgi/filter/OSGiFilterParser.java | 4 +-
.../org/apache/ivy/osgi/obr/OBRResolver.java | 2 +-
.../ivy/osgi/obr/xml/CapabilityAdapter.java | 3 +-
.../apache/ivy/osgi/obr/xml/OBRXMLParser.java | 39 ++--
.../ivy/osgi/obr/xml/RequirementAdapter.java | 11 +-
.../obr/xml/UnsupportedFilterException.java | 1 +
.../apache/ivy/osgi/p2/P2ArtifactParser.java | 20 +-
.../apache/ivy/osgi/p2/P2CompositeParser.java | 4 +-
.../org/apache/ivy/osgi/p2/P2Descriptor.java | 4 +-
.../apache/ivy/osgi/p2/P2MetadataParser.java | 103 +++++-----
.../apache/ivy/osgi/p2/PropertiesParser.java | 2 +-
.../osgi/repo/AbstractFSManifestIterable.java | 2 +-
.../ivy/osgi/repo/AbstractOSGiResolver.java | 18 +-
.../repo/ArtifactReportManifestIterable.java | 5 +-
.../ivy/osgi/repo/FSManifestIterable.java | 14 +-
.../ivy/osgi/repo/ModuleDescriptorWrapper.java | 6 +-
.../ivy/osgi/repo/RelativeURLRepository.java | 2 +-
.../osgi/repo/RepositoryManifestIterable.java | 4 +-
.../ivy/osgi/updatesite/UpdateSiteResolver.java | 6 +-
.../updatesite/xml/EclipseUpdateSiteParser.java | 28 ++-
.../ivy/osgi/updatesite/xml/FeatureParser.java | 56 ++----
.../ivy/osgi/updatesite/xml/UpdateSite.java | 2 +
.../updatesite/xml/UpdateSiteDigestParser.java | 2 +-
.../apache/ivy/osgi/util/DelegatingHandler.java | 11 +-
src/java/org/apache/ivy/osgi/util/Version.java | 50 ++---
.../org/apache/ivy/osgi/util/VersionRange.java | 26 +--
.../circular/CircularDependencyException.java | 3 +-
.../circular/CircularDependencyHelper.java | 2 +-
.../circular/CircularDependencyStrategy.java | 2 +-
.../LatestCompatibleConflictManager.java | 6 +-
.../plugins/conflict/LatestConflictManager.java | 7 +-
.../plugins/conflict/RegexpConflictManager.java | 2 +-
.../conflict/StrictConflictException.java | 1 +
.../ivy/plugins/latest/LatestStrategy.java | 8 +-
.../ivy/plugins/lock/FileBasedLockStrategy.java | 1 +
.../ivy/plugins/matcher/GlobPatternMatcher.java | 5 +-
.../plugins/matcher/RegexpPatternMatcher.java | 2 +-
.../parser/AbstractModuleDescriptorParser.java | 36 ++--
.../parser/m2/PomModuleDescriptorBuilder.java | 12 +-
.../parser/m2/PomModuleDescriptorParser.java | 7 +-
.../parser/m2/PomModuleDescriptorWriter.java | 1 +
.../apache/ivy/plugins/parser/m2/PomReader.java | 10 +-
.../parser/xml/XmlModuleDescriptorParser.java | 50 +++--
.../parser/xml/XmlModuleDescriptorUpdater.java | 10 +-
.../parser/xml/XmlModuleDescriptorWriter.java | 1 +
.../ivy/plugins/report/XmlReportParser.java | 6 +-
.../apache/ivy/plugins/repository/Resource.java | 2 +-
.../ivy/plugins/repository/TransferEvent.java | 4 +-
.../plugins/repository/sftp/SFTPRepository.java | 11 +-
.../ssh/AbstractSshBasedRepository.java | 6 +-
.../repository/ssh/RemoteScpException.java | 10 +-
.../apache/ivy/plugins/repository/ssh/Scp.java | 7 +-
.../ivy/plugins/repository/ssh/SshCache.java | 16 +-
.../plugins/repository/ssh/SshRepository.java | 11 +-
.../ivy/plugins/repository/ssh/SshResource.java | 8 +-
.../plugins/repository/url/URLRepository.java | 2 +-
.../plugins/repository/vfs/VfsRepository.java | 4 +-
.../ivy/plugins/repository/vfs/VfsResource.java | 10 +-
.../repository/vsftp/VsftpRepository.java | 13 +-
.../resolver/AbstractPatternsBasedResolver.java | 2 +-
.../ivy/plugins/resolver/AbstractResolver.java | 15 +-
.../resolver/AbstractSshBasedResolver.java | 6 +-
.../ivy/plugins/resolver/BasicResolver.java | 28 ++-
.../ivy/plugins/resolver/ChainResolver.java | 2 +-
.../plugins/resolver/DependencyResolver.java | 2 +-
.../plugins/resolver/FileSystemResolver.java | 2 +-
.../plugins/resolver/RepositoryResolver.java | 4 +-
.../ivy/plugins/resolver/SshResolver.java | 6 +-
.../resolver/packager/BuiltFileResource.java | 2 +-
.../plugins/resolver/util/ResolverHelper.java | 2 +-
.../ivy/plugins/resolver/util/URLLister.java | 4 +-
.../plugins/version/AbstractVersionMatcher.java | 4 +-
.../plugins/version/ChainVersionMatcher.java | 4 +-
.../plugins/version/LatestVersionMatcher.java | 2 +-
.../ivy/plugins/version/VersionMatcher.java | 16 +-
.../plugins/version/VersionRangeMatcher.java | 2 +-
.../org/apache/ivy/util/ChecksumHelper.java | 2 +-
.../org/apache/ivy/util/ConfigurationUtils.java | 2 +-
.../org/apache/ivy/util/CredentialsUtil.java | 5 +-
.../apache/ivy/util/DefaultMessageLogger.java | 2 +-
.../apache/ivy/util/EncryptedProperties.java | 65 +++++++
.../org/apache/ivy/util/EncrytedProperties.java | 65 -------
src/java/org/apache/ivy/util/FileResolver.java | 2 +-
src/java/org/apache/ivy/util/FileUtil.java | 9 +-
src/java/org/apache/ivy/util/MemoryUtil.java | 3 +-
src/java/org/apache/ivy/util/MessageLogger.java | 2 +-
.../org/apache/ivy/util/PropertiesFile.java | 1 +
src/java/org/apache/ivy/util/StringUtils.java | 4 +-
src/java/org/apache/ivy/util/XMLHelper.java | 2 +-
.../apache/ivy/util/cli/CommandLineParser.java | 1 +
.../org/apache/ivy/util/cli/ParseException.java | 1 +
.../util/extendable/ExtendableItemHelper.java | 6 +-
.../apache/ivy/util/filter/FilterHelper.java | 8 +-
.../apache/ivy/util/url/ApacheURLLister.java | 8 +-
.../apache/ivy/util/url/BasicURLHandler.java | 1 -
.../apache/ivy/util/url/HttpClientHandler.java | 4 +-
.../apache/ivy/util/url/IvyAuthenticator.java | 3 +-
.../apache/ivy/util/url/URLHandlerRegistry.java | 2 +-
test/java/org/apache/ivy/TestHelper.java | 3 +-
.../apache/ivy/ant/IvyArtifactPropertyTest.java | 9 +-
.../org/apache/ivy/ant/IvyCleanCacheTest.java | 10 +-
.../apache/ivy/ant/IvyDependencyTreeTest.java | 4 -
.../org/apache/ivy/ant/IvyResourcesTest.java | 9 +-
.../DefaultRepositoryCacheManagerTest.java | 14 +-
.../core/module/id/ModuleRevisionIdTest.java | 10 +-
.../ivy/osgi/core/OSGiManifestParserTest.java | 9 +-
.../apache/ivy/osgi/filter/OSGiFilterTest.java | 5 +-
.../apache/ivy/osgi/obr/OBRResolverTest.java | 15 +-
.../apache/ivy/osgi/obr/OBRXMLWriterTest.java | 2 -
.../IgnoreCircularDependencyStrategyTest.java | 7 +-
.../WarnCircularDependencyStrategyTest.java | 1 -
.../LatestCompatibleConflictManagerTest.java | 7 +-
.../conflict/RegexpConflictManagerTest.java | 5 +-
.../conflict/StrictConflictManagerTest.java | 5 +-
.../matcher/AbstractPatternMatcherTest.java | 7 +-
.../ExactOrRegexpPatternMatcherTest.java | 9 +-
.../plugins/matcher/GlobPatternMatcherTest.java | 9 +-
.../matcher/RegexpPatternMatcherTest.java | 7 +-
.../m2/PomModuleDescriptorParserTest.java | 8 +-
.../parser/xml/XmlModuleUpdaterTest.java | 13 +-
.../plugins/repository/vfs/VfsResourceTest.java | 26 +--
.../apache/ivy/util/IvyPatternHelperTest.java | 5 +-
213 files changed, 962 insertions(+), 1161 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/ivy.xml
----------------------------------------------------------------------
diff --git a/ivy.xml b/ivy.xml
index eef5feb..f2f7e86 100644
--- a/ivy.xml
+++ b/ivy.xml
@@ -57,7 +57,6 @@
<!-- Test dependencies -->
<dependency org="junit" name="junit" rev="4.12" conf="test->default"/>
<dependency org="org.hamcrest" name="hamcrest-core" rev="1.3" conf="test->default"/>
- <dependency org="commons-lang" name="commons-lang" rev="2.6" conf="test->default"/>
<dependency org="org.apache.ant" name="ant-testutil" rev="1.9.9" conf="test->default" transitive="false"/>
<dependency org="org.apache.ant" name="ant-launcher" rev="1.9.9" conf="test->default" transitive="false"/>
<dependency org="ant-contrib" name="ant-contrib" rev="1.0b3" conf="test->default" transitive="false"/>
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/Ivy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/Ivy.java b/src/java/org/apache/ivy/Ivy.java
index fc190ed..1a57ce9 100644
--- a/src/java/org/apache/ivy/Ivy.java
+++ b/src/java/org/apache/ivy/Ivy.java
@@ -219,7 +219,7 @@ public class Ivy {
/**
* True if this instance of Ivy has already been bound to its dependencies, false otherwise.
*
- * @see bind()
+ * @see #bind()
*/
private boolean bound;
@@ -358,8 +358,8 @@ public class Ivy {
*
* </p>
*
- * @param callback
- * @return
+ * @param callback IvyCallback
+ * @return Object
*/
public Object execute(IvyCallback callback) {
pushContext();
@@ -545,6 +545,7 @@ public class Ivy {
// RETRIEVE
// ///////////////////////////////////////////////////////////////////////
+ @SuppressWarnings("deprecation")
public int retrieve(ModuleRevisionId mrid, String destFilePattern, RetrieveOptions options)
throws IOException {
pushContext();
@@ -594,10 +595,10 @@ public class Ivy {
* Example of use: deliver(mrid, "1.5", "target/ivy/ivy-[revision].xml",
* DeliverOptions.newInstance(settings).setStatus("release").setValidate(false));
*
- * @param mrid
- * @param revision
- * @param destIvyPattern
- * @param options
+ * @param mrid ModuleRevisionId
+ * @param revision String
+ * @param destIvyPattern String
+ * @param options DeliverOptions
* @throws IOException
* @throws ParseException
*/
@@ -779,6 +780,7 @@ public class Ivy {
* Interrupts the current running operation in the given operating thread, no later than
* interruptTimeout milliseconds after the call
*/
+ @SuppressWarnings("deprecation")
public void interrupt(Thread operatingThread) {
if (operatingThread != null && operatingThread.isAlive()) {
if (operatingThread == Thread.currentThread()) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/Main.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/Main.java b/src/java/org/apache/ivy/Main.java
index a274e64..18d6a5d 100644
--- a/src/java/org/apache/ivy/Main.java
+++ b/src/java/org/apache/ivy/Main.java
@@ -240,7 +240,7 @@ public final class Main {
return;
}
- boolean validate = line.hasOption("novalidate") ? false : true;
+ boolean validate = !line.hasOption("novalidate");
Ivy ivy = Ivy.newInstance();
initMessage(line, ivy);
@@ -395,7 +395,7 @@ public final class Main {
* </p>
*
* @param line
- * the command line in which the cp option shold be parsed
+ * the command line in which the cp option should be parsed
* @return a List of files to include as extra classpath entries, or <code>null</code> if no cp
* option was provided.
*/
@@ -503,6 +503,7 @@ public final class Main {
}
}
+ @SuppressWarnings("resource")
private static void invoke(Ivy ivy, File cache, ModuleDescriptor md, String[] confs,
List fileList, String mainclass, String[] args) {
List urls = new ArrayList();
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/AntBuildTrigger.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/AntBuildTrigger.java b/src/java/org/apache/ivy/ant/AntBuildTrigger.java
index 6b0dd3f..96f3813 100644
--- a/src/java/org/apache/ivy/ant/AntBuildTrigger.java
+++ b/src/java/org/apache/ivy/ant/AntBuildTrigger.java
@@ -35,7 +35,7 @@ import org.apache.tools.ant.taskdefs.Ant;
import org.apache.tools.ant.taskdefs.Property;
/**
- * Triggers an ant build on an event occurence.
+ * Triggers an ant build on an event occurrence.
* <p>
* Example of use:
*
@@ -128,11 +128,8 @@ public class AntBuildTrigger extends AbstractTrigger implements Trigger {
}
private File getBuildFile(IvyEvent event) {
- return IvyContext
- .getContext()
- .getSettings()
- .resolveFile(
- IvyPatternHelper.substituteTokens(getBuildFilePattern(), event.getAttributes()));
+ return IvyContext.getContext().getSettings().resolveFile(
+ IvyPatternHelper.substituteTokens(getBuildFilePattern(), event.getAttributes()));
}
public String getBuildFilePattern() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/AntCallTrigger.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/AntCallTrigger.java b/src/java/org/apache/ivy/ant/AntCallTrigger.java
index 005eea1..0d287c4 100644
--- a/src/java/org/apache/ivy/ant/AntCallTrigger.java
+++ b/src/java/org/apache/ivy/ant/AntCallTrigger.java
@@ -33,7 +33,7 @@ import org.apache.tools.ant.taskdefs.CallTarget;
import org.apache.tools.ant.taskdefs.Property;
/**
- * Triggers an call to an ant target on an event occurence.
+ * Triggers an call to an ant target on an event occurrence.
* <p>
* This trigger only works when ivy is called from an ant build file, otherwise the trigger only log
* a failure.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/AntMessageLogger.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/AntMessageLogger.java b/src/java/org/apache/ivy/ant/AntMessageLogger.java
index 85547f9..285e453 100644
--- a/src/java/org/apache/ivy/ant/AntMessageLogger.java
+++ b/src/java/org/apache/ivy/ant/AntMessageLogger.java
@@ -81,10 +81,10 @@ public class AntMessageLogger extends AbstractMessageLogger {
}
public void taskFinished(BuildEvent event) {
- // NB: There is somtimes task created by an other task
+ // NB: There is sometimes task created by an other task
// in that case, we should not uninit Message. The log should stay associated
// with the initial task, except if it was an antcall, ant or subant target
- // NB2 : Testing the identity of the task is not enought, event.getTask() return
+ // NB2 : Testing the identity of the task is not enough, event.getTask() return
// an instance of UnknownElement is wrapping the concrete instance
stackDepth--;
if (stackDepth == -1) {
@@ -106,9 +106,9 @@ public class AntMessageLogger extends AbstractMessageLogger {
private StringBuffer buf = new StringBuffer();
/**
- * Constructs a new AntMEssageImpl instance.
+ * Constructs a new AntMessageImpl instance.
*
- * @param antProjectComponent
+ * @param task
* the ant project component this message implementation should use for logging. Must
* not be <code>null</code>.
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyAntSettings.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyAntSettings.java b/src/java/org/apache/ivy/ant/IvyAntSettings.java
index bb67ba7..64efc9e 100644
--- a/src/java/org/apache/ivy/ant/IvyAntSettings.java
+++ b/src/java/org/apache/ivy/ant/IvyAntSettings.java
@@ -108,7 +108,7 @@ public class IvyAntSettings extends DataType {
* Returns the default ivy settings of this classloader. If it doesn't exist yet, a new one is
* created using the given project to back the VariableContainer.
*
- * @param project
+ * @param task
* TODO add text.
* @return An IvySetting instance.
*/
@@ -192,7 +192,7 @@ public class IvyAntSettings extends DataType {
super.setProject(p);
if ("ivy.instance".equals(id) && !getProject().getReferences().containsKey(id)) {
- // register ourselfs as default settings, just in case the id attribute is not set
+ // register ourselves as default settings, just in case the id attribute is not set
getProject().addReference("ivy.instance", this);
autoRegistered = true;
}
@@ -337,7 +337,7 @@ public class IvyAntSettings extends DataType {
/**
* Set file or url to its default value
*
- * @param variableContainer
+ * @param variableContainer IvyVariableContainer
*/
private void defineDefaultSettingFile(IvyVariableContainer variableContainer,
ProjectComponent task) {
@@ -362,7 +362,7 @@ public class IvyAntSettings extends DataType {
}
if (!file.exists()) {
file = null;
- if (Boolean.valueOf(getProject().getProperty("ivy.14.compatible")).booleanValue()) {
+ if (Boolean.valueOf(getProject().getProperty("ivy.14.compatible"))) {
task.log("no settings file found, using Ivy 1.4 default...", Project.MSG_VERBOSE);
url = IvySettings.getDefault14SettingsURL();
} else {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyAntVariableContainer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyAntVariableContainer.java b/src/java/org/apache/ivy/ant/IvyAntVariableContainer.java
index fa25a8d..e3a3d09 100644
--- a/src/java/org/apache/ivy/ant/IvyAntVariableContainer.java
+++ b/src/java/org/apache/ivy/ant/IvyAntVariableContainer.java
@@ -64,7 +64,8 @@ class IvyAntVariableContainer extends IvyVariableContainerImpl implements IvyVar
* All variables defined in Ivy will be set in the Ant project under two names:
* <ul>
* <li>the name of the variable</li>
- * <li>the name of the variable suffxied with a dot + the given id, if the given id is not null</li>
+ * <li>the name of the variable suffixed with a dot + the given id, if the given id is not null
+ * </li>
* </ul>
*
* @param id
@@ -98,6 +99,7 @@ class IvyAntVariableContainer extends IvyVariableContainerImpl implements IvyVar
}
}
+ @SuppressWarnings("unchecked")
public Object clone() {
IvyAntVariableContainer result = (IvyAntVariableContainer) super.clone();
result.overwrittenProperties = (HashMap) ((HashMap) this.overwrittenProperties).clone();
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyArtifactReport.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyArtifactReport.java b/src/java/org/apache/ivy/ant/IvyArtifactReport.java
index 88520f1..cc55d43 100644
--- a/src/java/org/apache/ivy/ant/IvyArtifactReport.java
+++ b/src/java/org/apache/ivy/ant/IvyArtifactReport.java
@@ -126,9 +126,9 @@ public class IvyArtifactReport extends IvyPostResolveTask {
private void generateXml(IvyNode[] dependencies, Map moduleRevToArtifactsMap,
Map artifactsToCopy) {
try {
- FileOutputStream fileOuputStream = new FileOutputStream(tofile);
+ FileOutputStream fileOutputStream = new FileOutputStream(tofile);
try {
- TransformerHandler saxHandler = createTransformerHandler(fileOuputStream);
+ TransformerHandler saxHandler = createTransformerHandler(fileOutputStream);
saxHandler.startDocument();
saxHandler.startElement(null, "modules", "modules", new AttributesImpl());
@@ -169,7 +169,7 @@ public class IvyArtifactReport extends IvyPostResolveTask {
saxHandler.endElement(null, "modules", "modules");
saxHandler.endDocument();
} finally {
- fileOuputStream.close();
+ fileOutputStream.close();
}
} catch (SAXException e) {
throw new BuildException("impossible to generate report", e);
@@ -180,7 +180,7 @@ public class IvyArtifactReport extends IvyPostResolveTask {
}
}
- private TransformerHandler createTransformerHandler(FileOutputStream fileOuputStream)
+ private TransformerHandler createTransformerHandler(FileOutputStream fileOutputStream)
throws TransformerFactoryConfigurationError, TransformerConfigurationException,
SAXException {
SAXTransformerFactory transformerFact = (SAXTransformerFactory) SAXTransformerFactory
@@ -188,7 +188,7 @@ public class IvyArtifactReport extends IvyPostResolveTask {
TransformerHandler saxHandler = transformerFact.newTransformerHandler();
saxHandler.getTransformer().setOutputProperty(OutputKeys.ENCODING, "UTF-8");
saxHandler.getTransformer().setOutputProperty(OutputKeys.INDENT, "yes");
- saxHandler.setResult(new StreamResult(fileOuputStream));
+ saxHandler.setResult(new StreamResult(fileOutputStream));
return saxHandler;
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyBuildList.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyBuildList.java b/src/java/org/apache/ivy/ant/IvyBuildList.java
index ba4b1a3..55cbe74 100644
--- a/src/java/org/apache/ivy/ant/IvyBuildList.java
+++ b/src/java/org/apache/ivy/ant/IvyBuildList.java
@@ -350,12 +350,12 @@ public class IvyBuildList extends IvyTask {
}
/**
- * Returns a collection of ModuleDescriptors that are conatined in the input collection of
+ * Returns a collection of ModuleDescriptors that are contained in the input collection of
* ModuleDescriptors and upon which the root module depends
*
* @param mds
* input collection of ModuleDescriptors
- * @param rootmd
+ * @param rootmds
* root module
* @return filtered list of modules
*/
@@ -421,12 +421,12 @@ public class IvyBuildList extends IvyTask {
}
/**
- * Returns a collection of ModuleDescriptors that are conatined in the input collection of
+ * Returns a collection of ModuleDescriptors that are contained in the input collection of
* ModuleDescriptors which depends on the leaf module
*
* @param mds
* input collection of ModuleDescriptors
- * @param leafmd
+ * @param leafmds
* leaf module
* @return filtered list of modules
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyCacheFileset.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyCacheFileset.java b/src/java/org/apache/ivy/ant/IvyCacheFileset.java
index 891a336..fbcf043 100644
--- a/src/java/org/apache/ivy/ant/IvyCacheFileset.java
+++ b/src/java/org/apache/ivy/ant/IvyCacheFileset.java
@@ -108,7 +108,7 @@ public class IvyCacheFileset extends IvyCacheTask {
// checks if the basePath ends with the file separator (which can for instance
// happen if the basePath is the root on unix)
if (!absoluteBasePath.endsWith(File.separator)) {
- beginIndex++; // skip the seperator char as well
+ beginIndex++; // skip the separator char as well
}
return file.getAbsolutePath().substring(beginIndex);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyCachePath.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyCachePath.java b/src/java/org/apache/ivy/ant/IvyCachePath.java
index 3fe7645..d4b7843 100644
--- a/src/java/org/apache/ivy/ant/IvyCachePath.java
+++ b/src/java/org/apache/ivy/ant/IvyCachePath.java
@@ -53,7 +53,7 @@ public class IvyCachePath extends IvyCacheTask {
/**
* @deprecated use setPathid instead
- * @param id
+ * @param id String
*/
@Deprecated
public void setId(String id) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyCacheTask.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyCacheTask.java b/src/java/org/apache/ivy/ant/IvyCacheTask.java
index 2360860..e8de729 100644
--- a/src/java/org/apache/ivy/ant/IvyCacheTask.java
+++ b/src/java/org/apache/ivy/ant/IvyCacheTask.java
@@ -38,7 +38,7 @@ import org.apache.ivy.util.Message;
import org.apache.tools.ant.BuildException;
/**
- * Base class for the cache path related classes: cachepath and cachefileset. Most of the behviour
+ * Base class for the cache path related classes: cachepath and cachefileset. Most of the behaviour
* is common to the two, since only the produced element differs.
*/
public abstract class IvyCacheTask extends IvyPostResolveTask {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyCleanCache.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyCleanCache.java b/src/java/org/apache/ivy/ant/IvyCleanCache.java
index 251f3e2..e22e40a 100644
--- a/src/java/org/apache/ivy/ant/IvyCleanCache.java
+++ b/src/java/org/apache/ivy/ant/IvyCleanCache.java
@@ -53,7 +53,7 @@ public class IvyCleanCache extends IvyTask {
}
/**
- * Sets weither the resolution cache should be cleaned or not.
+ * Sets whether the resolution cache should be cleaned or not.
*
* @param resolution
* <code>true</code> if the resolution cache should be cleaned, <code>false</code>
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyConflict.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyConflict.java b/src/java/org/apache/ivy/ant/IvyConflict.java
index a4a2a1d..c6b159a 100644
--- a/src/java/org/apache/ivy/ant/IvyConflict.java
+++ b/src/java/org/apache/ivy/ant/IvyConflict.java
@@ -57,9 +57,9 @@ public class IvyConflict {
}
void addConflict(DefaultModuleDescriptor md, IvySettings settings) {
- String matcherName = matcher == null ? PatternMatcher.EXACT : matcher;
- String orgPattern = org == null ? PatternMatcher.ANY_EXPRESSION : org;
- String modulePattern = module == null ? PatternMatcher.ANY_EXPRESSION : module;
+ String matcherName = (matcher == null) ? PatternMatcher.EXACT : matcher;
+ String orgPattern = (org == null) ? PatternMatcher.ANY_EXPRESSION : org;
+ String modulePattern = (module == null) ? PatternMatcher.ANY_EXPRESSION : module;
ConflictManager cm = null;
if (rev != null) {
String[] revs = rev.split(",");
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyDeliver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyDeliver.java b/src/java/org/apache/ivy/ant/IvyDeliver.java
index 06473c9..80b775e 100644
--- a/src/java/org/apache/ivy/ant/IvyDeliver.java
+++ b/src/java/org/apache/ivy/ant/IvyDeliver.java
@@ -359,12 +359,12 @@ public class IvyDeliver extends IvyTask {
if (resolveId == null) {
if (organisation == null) {
throw new BuildException("no organisation provided for ivy deliver task: "
- + "It can either be set explicitely via the attribute 'organisation' "
+ + "It can either be set explicitly via the attribute 'organisation' "
+ "or via 'ivy.organisation' property or a prior call to <resolve/>");
}
if (module == null) {
throw new BuildException("no module name provided for ivy deliver task: "
- + "It can either be set explicitely via the attribute 'module' "
+ + "It can either be set explicitly via the attribute 'module' "
+ "or via 'ivy.module' property or a prior call to <resolve/>");
}
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyDependencyTree.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyDependencyTree.java b/src/java/org/apache/ivy/ant/IvyDependencyTree.java
index bb7c279..b95aa91 100644
--- a/src/java/org/apache/ivy/ant/IvyDependencyTree.java
+++ b/src/java/org/apache/ivy/ant/IvyDependencyTree.java
@@ -44,7 +44,7 @@ public class IvyDependencyTree extends IvyPostResolveTask {
ResolveReport report = getResolvedReport();
log("Dependency tree for " + report.getResolveId());
ModuleRevisionId mrid = report.getModuleDescriptor().getModuleRevisionId();
- // make dependency tree easier to fetch informations
+ // make dependency tree easier to fetch information
for (Iterator iterator = report.getDependencies().iterator(); iterator.hasNext();) {
IvyNode dependency = (IvyNode) iterator.next();
populateDependencyTree(dependency, mrid, report);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyDependencyUpdateChecker.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyDependencyUpdateChecker.java b/src/java/org/apache/ivy/ant/IvyDependencyUpdateChecker.java
index 4a71664..83dd5ef 100644
--- a/src/java/org/apache/ivy/ant/IvyDependencyUpdateChecker.java
+++ b/src/java/org/apache/ivy/ant/IvyDependencyUpdateChecker.java
@@ -101,9 +101,8 @@ public class IvyDependencyUpdateChecker extends IvyPostResolveTask {
if (originalDependency.getModuleId().equals(latest.getModuleId())) {
if (!originalDependency.getResolvedId().getRevision()
.equals(latest.getResolvedId().getRevision())) {
- // is this dependency a transitive dependency ? or direct dependency
- // (unfortunatly
- // .isTranstive() methods doesn't have the same meaning)
+ // is this dependency a transitive or a direct dependency?
+ // (unfortunately .isTransitive() methods do not have the same meaning)
boolean isTransitiveDependency = latest.getDependencyDescriptor(latest
.getRoot()) == null;
if ((!isTransitiveDependency) || (isTransitiveDependency && showTransitive)) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyExtractFromSources.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyExtractFromSources.java b/src/java/org/apache/ivy/ant/IvyExtractFromSources.java
index a7e6cd5..62e4228 100644
--- a/src/java/org/apache/ivy/ant/IvyExtractFromSources.java
+++ b/src/java/org/apache/ivy/ant/IvyExtractFromSources.java
@@ -173,8 +173,8 @@ public class IvyExtractFromSources extends Task {
}
/**
- * @param pack
- * @return
+ * @param pack String
+ * @return ModuleRevisionId
*/
private ModuleRevisionId getMapping(String pack) {
String askedPack = pack;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyInstall.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyInstall.java b/src/java/org/apache/ivy/ant/IvyInstall.java
index 1982e19..2104ad7 100644
--- a/src/java/org/apache/ivy/ant/IvyInstall.java
+++ b/src/java/org/apache/ivy/ant/IvyInstall.java
@@ -64,19 +64,19 @@ public class IvyInstall extends IvyTask {
IvySettings settings = ivy.getSettings();
if (organisation == null) {
throw new BuildException("no organisation provided for ivy publish task: "
- + "It can either be set explicitely via the attribute 'organisation' "
+ + "It can either be set explicitly via the attribute 'organisation' "
+ "or via 'ivy.organisation' property or a prior call to <resolve/>");
}
if (module == null && PatternMatcher.EXACT.equals(matcher)) {
throw new BuildException("no module name provided for ivy publish task: "
- + "It can either be set explicitely via the attribute 'module' "
+ + "It can either be set explicitly via the attribute 'module' "
+ "or via 'ivy.module' property or a prior call to <resolve/>");
} else if (module == null && !PatternMatcher.EXACT.equals(matcher)) {
module = PatternMatcher.ANY_EXPRESSION;
}
if (revision == null && PatternMatcher.EXACT.equals(matcher)) {
throw new BuildException("no module revision provided for ivy publish task: "
- + "It can either be set explicitely via the attribute 'revision' "
+ + "It can either be set explicitly via the attribute 'revision' "
+ "or via 'ivy.revision' property or a prior call to <resolve/>");
} else if (revision == null && !PatternMatcher.EXACT.equals(matcher)) {
revision = PatternMatcher.ANY_EXPRESSION;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyPostResolveTask.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyPostResolveTask.java b/src/java/org/apache/ivy/ant/IvyPostResolveTask.java
index 0e0e6fe..757b724 100644
--- a/src/java/org/apache/ivy/ant/IvyPostResolveTask.java
+++ b/src/java/org/apache/ivy/ant/IvyPostResolveTask.java
@@ -127,13 +127,13 @@ public abstract class IvyPostResolveTask extends IvyTask {
if (organisation == null) {
throw new BuildException(
"no organisation provided for ivy cache task in inline mode: "
- + "It can either be set explicitely via the attribute 'organisation' "
+ + "It can either be set explicitly via the attribute 'organisation' "
+ "or via 'ivy.organisation' property");
}
if (module == null) {
throw new BuildException(
"no module name provided for ivy cache task in inline mode: "
- + "It can either be set explicitely via the attribute 'module' "
+ + "It can either be set explicitly via the attribute 'module' "
+ "or via 'ivy.module' property");
}
String[] toResolve = getConfsToResolve(getOrganisation(), getModule() + "-caller",
@@ -192,17 +192,17 @@ public abstract class IvyPostResolveTask extends IvyTask {
module = getProperty(module, settings, "ivy.module");
if (organisation == null) {
throw new BuildException("no organisation provided for ivy cache task: "
- + "It can either be set explicitely via the attribute 'organisation' "
+ + "It can either be set explicitly via the attribute 'organisation' "
+ "or via 'ivy.organisation' property or a prior call to <resolve/>");
}
if (module == null) {
throw new BuildException("no module name provided for ivy cache task: "
- + "It can either be set explicitely via the attribute 'module' "
+ + "It can either be set explicitly via the attribute 'module' "
+ "or via 'ivy.module' property or a prior call to <resolve/>");
}
if (conf == null) {
throw new BuildException("no conf provided for ivy cache task: "
- + "It can either be set explicitely via the attribute 'conf' or "
+ + "It can either be set explicitly via the attribute 'conf' or "
+ "via 'ivy.resolved.configurations' property or a prior call to <resolve/>");
}
@@ -427,11 +427,11 @@ public abstract class IvyPostResolveTask extends IvyTask {
}
public void setKeep(boolean keep) {
- this.keep = Boolean.valueOf(keep);
+ this.keep = keep;
}
public boolean isKeep() {
- return this.keep == null ? !isInline() : this.keep.booleanValue();
+ return this.keep == null ? !isInline() : this.keep;
}
public void setChanging(boolean changing) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyPublish.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyPublish.java b/src/java/org/apache/ivy/ant/IvyPublish.java
index 04df76e..1c2921b 100644
--- a/src/java/org/apache/ivy/ant/IvyPublish.java
+++ b/src/java/org/apache/ivy/ant/IvyPublish.java
@@ -244,17 +244,17 @@ public class IvyPublish extends IvyTask {
status = getProperty(status, settings, "ivy.status");
if (organisation == null) {
throw new BuildException("no organisation provided for ivy publish task: "
- + "It can either be set explicitely via the attribute 'organisation' "
+ + "It can either be set explicitly via the attribute 'organisation' "
+ "or via 'ivy.organisation' property or a prior call to <resolve/>");
}
if (module == null) {
throw new BuildException("no module name provided for ivy publish task: "
- + "It can either be set explicitely via the attribute 'module' "
+ + "It can either be set explicitly via the attribute 'module' "
+ "or via 'ivy.module' property or a prior call to <resolve/>");
}
if (revision == null) {
throw new BuildException("no module revision provided for ivy publish task: "
- + "It can either be set explicitely via the attribute 'revision' "
+ + "It can either be set explicitly via the attribute 'revision' "
+ "or via 'ivy.revision' property or a prior call to <resolve/>");
}
if (artifactspattern.isEmpty()) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyReport.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyReport.java b/src/java/org/apache/ivy/ant/IvyReport.java
index e4f024e..6ac9d09 100644
--- a/src/java/org/apache/ivy/ant/IvyReport.java
+++ b/src/java/org/apache/ivy/ant/IvyReport.java
@@ -163,7 +163,7 @@ public class IvyReport extends IvyTask {
}
if (conf == null) {
throw new BuildException("no conf provided for ivy report task: "
- + "It can either be set explicitely via the attribute 'conf' or "
+ + "It can either be set explicitly via the attribute 'conf' or "
+ "via 'ivy.resolved.configurations' property or a prior call to <resolve/>");
}
if (todir == null) {
@@ -190,12 +190,12 @@ public class IvyReport extends IvyTask {
if (organisation == null) {
throw new BuildException("no organisation provided for ivy report task: "
- + "It can either be set explicitely via the attribute 'organisation' or "
+ + "It can either be set explicitly via the attribute 'organisation' or "
+ "via 'ivy.organisation' property or a prior call to <resolve/>");
}
if (module == null) {
throw new BuildException("no module name provided for ivy report task: "
- + "It can either be set explicitely via the attribute 'module' or "
+ + "It can either be set explicitly via the attribute 'module' or "
+ "via 'ivy.module' property or a prior call to <resolve/>");
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyRepositoryReport.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyRepositoryReport.java b/src/java/org/apache/ivy/ant/IvyRepositoryReport.java
index 0b725fc..86efbf8 100644
--- a/src/java/org/apache/ivy/ant/IvyRepositoryReport.java
+++ b/src/java/org/apache/ivy/ant/IvyRepositoryReport.java
@@ -81,7 +81,7 @@ public class IvyRepositoryReport extends IvyTask {
}
if (module == null && PatternMatcher.EXACT.equals(matcher)) {
throw new BuildException("no module name provided for ivy repository graph task: "
- + "It can either be set explicitely via the attribute 'module' or "
+ + "It can either be set explicitly via the attribute 'module' or "
+ "via 'ivy.module' property or a prior call to <resolve/>");
} else if (module == null && !PatternMatcher.EXACT.equals(matcher)) {
module = PatternMatcher.ANY_EXPRESSION;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyResolve.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyResolve.java b/src/java/org/apache/ivy/ant/IvyResolve.java
index c700421..5a30ab5 100644
--- a/src/java/org/apache/ivy/ant/IvyResolve.java
+++ b/src/java/org/apache/ivy/ant/IvyResolve.java
@@ -373,7 +373,7 @@ public class IvyResolve extends IvyTask {
Boolean hasChanged = null;
if (getCheckIfChanged()) {
- hasChanged = Boolean.valueOf(report.hasChanged());
+ hasChanged = report.hasChanged();
getProject().setProperty("ivy.deps.changed", hasChanged.toString());
settings.setVariable("ivy.deps.changed", hasChanged.toString());
}
@@ -471,11 +471,11 @@ public class IvyResolve extends IvyTask {
}
public boolean isKeep() {
- return keep == null ? organisation == null : keep.booleanValue();
+ return (keep == null) ? organisation == null : keep;
}
public void setKeep(boolean keep) {
- this.keep = Boolean.valueOf(keep);
+ this.keep = keep;
}
public boolean isInline() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyRetrieve.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyRetrieve.java b/src/java/org/apache/ivy/ant/IvyRetrieve.java
index e19232b..20695d9 100644
--- a/src/java/org/apache/ivy/ant/IvyRetrieve.java
+++ b/src/java/org/apache/ivy/ant/IvyRetrieve.java
@@ -225,7 +225,7 @@ public class IvyRetrieve extends IvyPostResolveTask {
// checks if the basePath ends with the file separator (which can for instance
// happen if the basePath is the root on unix)
if (!absoluteBasePath.endsWith(File.separator)) {
- beginIndex++; // skip the seperator char as well
+ beginIndex++; // skip the separator char as well
}
return file.getAbsolutePath().substring(beginIndex);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/IvyTask.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/IvyTask.java b/src/java/org/apache/ivy/ant/IvyTask.java
index 6d65c34..42997d9 100644
--- a/src/java/org/apache/ivy/ant/IvyTask.java
+++ b/src/java/org/apache/ivy/ant/IvyTask.java
@@ -44,17 +44,17 @@ public abstract class IvyTask extends Task {
protected boolean doValidate(IvySettings ivy) {
if (validate != null) {
- return validate.booleanValue();
+ return validate;
}
return ivy.doValidate();
}
public boolean isValidate() {
- return validate == null ? true : validate.booleanValue();
+ return validate == null || validate;
}
public void setValidate(boolean validate) {
- this.validate = Boolean.valueOf(validate);
+ this.validate = validate;
}
public void setSettingsRef(Reference ref) {
@@ -257,13 +257,13 @@ public abstract class IvyTask extends Task {
*/
protected void finalizeTask() {
if (!IvyContext.getContext().pop(ANT_PROJECT_CONTEXT_KEY, getProject())) {
- Message.error("ANT project poped from stack not equals current !. Ignoring");
+ Message.error("ANT project popped from stack not equals current! Ignoring");
}
IvyContext.popContext();
}
/**
- * Ant task execute. Calls prepareTask, doExecute, finalzeTask
+ * Ant task execute. Calls prepareTask, doExecute, finalizeTask
*/
@Override
public final void execute() throws BuildException {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/ant/PackageMapping.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/PackageMapping.java b/src/java/org/apache/ivy/ant/PackageMapping.java
index c848057..65950f6 100644
--- a/src/java/org/apache/ivy/ant/PackageMapping.java
+++ b/src/java/org/apache/ivy/ant/PackageMapping.java
@@ -20,7 +20,7 @@ package org.apache.ivy.ant;
import org.apache.ivy.core.module.id.ModuleRevisionId;
/**
- * Describes a mapping between a package name and an org name revision uple
+ * Describes a mapping between a package name and an org name revision tuple
*/
public class PackageMapping {
private String pkg;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/IvyContext.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/IvyContext.java b/src/java/org/apache/ivy/core/IvyContext.java
index 1e28a4b..4ff0f3b 100644
--- a/src/java/org/apache/ivy/core/IvyContext.java
+++ b/src/java/org/apache/ivy/core/IvyContext.java
@@ -324,6 +324,7 @@ public class IvyContext {
* @param value
* value to be saved under the key
*/
+ @SuppressWarnings("unchecked")
public void push(String key, Object value) {
synchronized (contextMap) {
if (!contextMap.containsKey(key)) {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/IvyPatternHelper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/IvyPatternHelper.java b/src/java/org/apache/ivy/core/IvyPatternHelper.java
index 3300b36..e8fb47e 100644
--- a/src/java/org/apache/ivy/core/IvyPatternHelper.java
+++ b/src/java/org/apache/ivy/core/IvyPatternHelper.java
@@ -86,16 +86,15 @@ public final class IvyPatternHelper {
}
public static String substitute(String pattern, Artifact artifact, ArtifactOrigin origin) {
- return substitute(pattern, artifact.getModuleRevisionId(), artifact, (String) null, origin);
+ return substitute(pattern, artifact.getModuleRevisionId(), artifact, null, origin);
}
public static String substitute(String pattern, Artifact artifact, String conf) {
- return substitute(pattern, artifact.getModuleRevisionId(), artifact, conf,
- (ArtifactOrigin) null);
+ return substitute(pattern, artifact.getModuleRevisionId(), artifact, conf, null);
}
public static String substitute(String pattern, ModuleRevisionId mrid, Artifact artifact) {
- return substitute(pattern, mrid, artifact, (String) null, (ArtifactOrigin) null);
+ return substitute(pattern, mrid, artifact, null, null);
}
public static String substitute(String pattern, ModuleRevisionId mrid, Artifact artifact,
@@ -107,22 +106,22 @@ public final class IvyPatternHelper {
public static String substitute(String pattern, String org, String module, String revision,
String artifact, String type, String ext) {
- return substitute(pattern, org, module, (String) null, revision, artifact, type, ext,
- (String) null, (ArtifactOrigin) null, (Map) null, (Map) null);
+ return substitute(pattern, org, module, null, revision, artifact, type, ext,
+ null, null, null, null);
}
// CheckStyle:ParameterNumber OFF
public static String substitute(String pattern, String org, String module, String revision,
String artifact, String type, String ext, String conf) {
- return substitute(pattern, org, module, (String) null, revision, artifact, type, ext, conf,
- (ArtifactOrigin) null, (Map) null, (Map) null);
+ return substitute(pattern, org, module, null, revision, artifact, type, ext, conf,
+ null, null, null);
}
public static String substitute(String pattern, String org, String module, String revision,
String artifact, String type, String ext, String conf, Map extraModuleAttributes,
Map extraArtifactAttributes) {
- return substitute(pattern, org, module, (String) null, revision, artifact, type, ext, conf,
- (ArtifactOrigin) null, extraModuleAttributes, extraArtifactAttributes);
+ return substitute(pattern, org, module, null, revision, artifact, type, ext, conf,
+ null, extraModuleAttributes, extraArtifactAttributes);
}
public static String substitute(String pattern, String org, String module, String branch,
@@ -450,7 +449,7 @@ public final class IvyPatternHelper {
}
/**
- * @param origin
+ * @param origin ArtifactOrigin
*/
public OriginalArtifactNameValue(ArtifactOrigin origin) {
this.origin = origin;
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/IvyThread.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/IvyThread.java b/src/java/org/apache/ivy/core/IvyThread.java
index b0d2a51..5675160 100644
--- a/src/java/org/apache/ivy/core/IvyThread.java
+++ b/src/java/org/apache/ivy/core/IvyThread.java
@@ -19,7 +19,7 @@ package org.apache.ivy.core;
/**
* A simple thread subclass associated the same IvyContext as the thread in which it is
- * instanciated. If you override the run target, then you will have to call initContext() to do the
+ * instantiated. If you override the run target, then you will have to call initContext() to do the
* association with the original IvyContext.
*
* @see IvyContext
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/RelativeUrlResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/RelativeUrlResolver.java b/src/java/org/apache/ivy/core/RelativeUrlResolver.java
index 2fac8cb..abf6f01 100644
--- a/src/java/org/apache/ivy/core/RelativeUrlResolver.java
+++ b/src/java/org/apache/ivy/core/RelativeUrlResolver.java
@@ -30,7 +30,7 @@ public abstract class RelativeUrlResolver {
* Resolve the url in the context of context.
*
* @param context
- * The URL of the ressource containing the reference url
+ * The URL of the resource containing the reference url
* @param url
* a relative or absolution url string
* @throws MalformedURLException
@@ -38,16 +38,16 @@ public abstract class RelativeUrlResolver {
public abstract URL getURL(URL context, String url) throws MalformedURLException;
/**
- * Relsovle file or url path relatively to a context. file is considered first. If file is not
+ * Resolve file or url path relatively to a context. file is considered first. If file is not
* defined, url will be considered.
*
* @param context
- * The URL of the ressource containing the reference file or url
+ * The URL of the resource containing the reference file or url
* @param file
* a relative or absolute path
* @param url
* a relative or absolution url string
- * @return the resulting url or null if faile and url are null.
+ * @return the resulting url or null if failed and url are null.
* @throws MalformedURLException
*/
public URL getURL(URL context, String file, String url) throws MalformedURLException {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java b/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java
index e132b2e..66dc5f5 100644
--- a/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java
+++ b/src/java/org/apache/ivy/core/cache/ArtifactOrigin.java
@@ -32,7 +32,7 @@ public class ArtifactOrigin {
/**
* ArtifactOrigin instance used when the origin is unknown.
*/
- public static final ArtifactOrigin unkwnown(Artifact artifact) {
+ public static final ArtifactOrigin unknown(Artifact artifact) {
return new ArtifactOrigin(artifact, false, UNKNOWN);
}
@@ -110,7 +110,7 @@ public class ArtifactOrigin {
* The last time the resource was checked to be up to date. Maybe <code>null</code> if this
* information is not actually used by in some case.
*
- * @return
+ * @return Long timestamp
*/
public Long getLastChecked() {
return lastChecked;
@@ -143,10 +143,7 @@ public class ArtifactOrigin {
ArtifactOrigin that = (ArtifactOrigin) o;
- if (isLocal != that.isLocal) {
- return false;
- }
- if (!location.equals(that.location)) {
+ if (isLocal != that.isLocal || !location.equals(that.location)) {
return false;
}
if (lastChecked == null) {
@@ -156,11 +153,8 @@ public class ArtifactOrigin {
} else if (!lastChecked.equals(that.lastChecked)) {
return false;
}
- if (exists != that.exists) {
- return false;
- }
- return true;
+ return exists == that.exists;
}
public int hashCode() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java b/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
index 86b4a8b..f659d87 100644
--- a/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
+++ b/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
@@ -318,7 +318,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
}
public void setCheckmodified(boolean check) {
- checkmodified = Boolean.valueOf(check);
+ checkmodified = check;
}
/**
@@ -329,11 +329,11 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
if (useOrigin == null) {
return getSettings() != null && getSettings().isDefaultUseOrigin();
}
- return useOrigin.booleanValue();
+ return useOrigin;
}
public void setUseOrigin(boolean b) {
- useOrigin = Boolean.valueOf(b);
+ useOrigin = b;
}
/**
@@ -409,6 +409,8 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
*
* @param md
* the module descriptor resolved
+ * @param metadataResolverName
+ * metadata resolver name
* @param artifactResolverName
* artifact resolver name
*/
@@ -471,7 +473,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
ModuleRevisionId mrid = artifact.getModuleRevisionId();
if (!lockMetadataArtifact(mrid)) {
Message.error("impossible to acquire lock for " + mrid);
- return ArtifactOrigin.unkwnown(artifact);
+ return ArtifactOrigin.unknown(artifact);
}
try {
PropertiesFile cdf = getCachedDataFile(artifact.getModuleRevisionId());
@@ -481,11 +483,11 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
String exists = cdf.getProperty(getExistsKey(artifact));
String original = cdf.getProperty(getOriginalKey(artifact));
- boolean isLocal = Boolean.valueOf(local).booleanValue();
+ boolean isLocal = Boolean.valueOf(local);
if (location == null) {
// origin has not been specified, return null
- return ArtifactOrigin.unkwnown(artifact);
+ return ArtifactOrigin.unknown(artifact);
}
if (original != null) {
@@ -560,7 +562,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
origin.setLastChecked(Long.valueOf(lastChecked));
}
if (exists != null) {
- origin.setExist(Boolean.parseBoolean(exists));
+ origin.setExist(Boolean.valueOf(exists));
}
return origin;
@@ -667,16 +669,15 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
public ResolvedModuleRevision findModuleInCache(DependencyDescriptor dd,
ModuleRevisionId requestedRevisionId, CacheMetadataOptions options,
String expectedResolver) {
- ModuleRevisionId mrid = requestedRevisionId;
if (isCheckmodified(dd, requestedRevisionId, options)) {
- Message.verbose("don't use cache for " + mrid + ": checkModified=true");
+ Message.verbose("don't use cache for " + requestedRevisionId + ": checkModified=true");
return null;
}
if (!options.isUseCacheOnly() && isChanging(dd, requestedRevisionId, options)) {
- Message.verbose("don't use cache for " + mrid + ": changing=true");
+ Message.verbose("don't use cache for " + requestedRevisionId + ": changing=true");
return null;
}
- return doFindModuleInCache(mrid, options, expectedResolver);
+ return doFindModuleInCache(requestedRevisionId, options, expectedResolver);
}
private ResolvedModuleRevision doFindModuleInCache(ModuleRevisionId mrid,
@@ -788,7 +789,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
*
* @param moduleDescriptorFile
* a given module descriptor
- * @return
+ * @return ModuleDescriptorParser
*/
protected ModuleDescriptorParser getModuleDescriptorParser(File moduleDescriptorFile) {
return XmlModuleDescriptorParser.getInstance();
@@ -1199,8 +1200,8 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
}
public void originalToCachedModuleDescriptor(DependencyResolver resolver,
- ResolvedResource orginalMetadataRef, Artifact requestedMetadataArtifact,
- ResolvedModuleRevision rmr, ModuleDescriptorWriter writer) {
+ ResolvedResource originalMetadataRef, Artifact requestedMetadataArtifact,
+ ResolvedModuleRevision rmr, ModuleDescriptorWriter writer) {
ModuleDescriptor md = rmr.getDescriptor();
Artifact originalMetadataArtifact = getOriginalMetadataArtifact(requestedMetadataArtifact);
File mdFileInCache = getIvyFileInCache(md.getResolvedModuleRevisionId());
@@ -1212,7 +1213,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
}
try {
File originalFileInCache = getArchiveFileInCache(originalMetadataArtifact);
- writer.write(orginalMetadataRef, md, originalFileInCache, mdFileInCache);
+ writer.write(originalMetadataRef, md, originalFileInCache, mdFileInCache);
getMemoryCache().putInCache(mdFileInCache, new ParserSettingsMonitor(settings), true,
md);
@@ -1226,10 +1227,10 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
throw e;
} catch (Exception e) {
String metadataRef;
- if (orginalMetadataRef == null) {
+ if (originalMetadataRef == null) {
metadataRef = String.valueOf(md.getResolvedModuleRevisionId());
} else {
- metadataRef = String.valueOf(orginalMetadataRef);
+ metadataRef = String.valueOf(originalMetadataRef);
}
Message.warn("impossible to put metadata file in cache: " + metadataRef, e);
} finally {
@@ -1486,7 +1487,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
private boolean isCheckmodified(DependencyDescriptor dd, ModuleRevisionId requestedRevisionId,
CacheMetadataOptions options) {
if (options.isCheckmodified() != null) {
- return options.isCheckmodified().booleanValue();
+ return options.isCheckmodified();
}
return isCheckmodified();
}
@@ -1507,7 +1508,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
/**
* Resource downloader which makes a copy of the previously existing file before overriding it.
* <p>
- * The backup file can be restored or cleanuped later
+ * The backup file can be restored or cleaned up later
*/
private final class BackupResourceDownloader implements ResourceDownloader {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java b/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java
index 9c42144..2ae9b71 100644
--- a/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java
+++ b/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java
@@ -169,7 +169,7 @@ public class DefaultResolutionCacheManager implements ResolutionCacheManager, Iv
*
* @param moduleDescriptorFile
* a given module descriptor
- * @return
+ * @return ModuleDescriptorParser
*/
protected ModuleDescriptorParser getModuleDescriptorParser(File moduleDescriptorFile) {
return XmlModuleDescriptorParser.getInstance();
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCache.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCache.java b/src/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCache.java
index c4207a9..97ef10e 100644
--- a/src/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCache.java
+++ b/src/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCache.java
@@ -42,7 +42,7 @@ class ModuleDescriptorMemoryCache {
/**
* Create a cache of the given size
*
- * @param size
+ * @param size int
*/
public ModuleDescriptorMemoryCache(int size) {
this.maxSize = size;
@@ -73,7 +73,7 @@ class ModuleDescriptorMemoryCache {
ModuleDescriptor getFromCache(File ivyFile, ParserSettings ivySettings, boolean validated) {
if (maxSize <= 0) {
- // cache is disbaled
+ // cache is disabled
return null;
}
CacheEntry entry = (CacheEntry) valueMap.get(ivyFile);
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/cache/ParserSettingsMonitor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/cache/ParserSettingsMonitor.java b/src/java/org/apache/ivy/core/cache/ParserSettingsMonitor.java
index 35da0bd..8061ec8 100644
--- a/src/java/org/apache/ivy/core/cache/ParserSettingsMonitor.java
+++ b/src/java/org/apache/ivy/core/cache/ParserSettingsMonitor.java
@@ -39,7 +39,7 @@ import org.apache.ivy.util.Message;
* Keep traces of the usage of a ParserSettings in order to check afterwards that the relevant
* settings didn't changed.
* <p>
- * A ParserSettingsMonitor provide a ParserSettings that must be used in place of the orignal one.
+ * A ParserSettingsMonitor provide a ParserSettings that must be used in place of the original one.
* </p>
* <p>
* The current implementation consider that a settings changed iff one of the used variable has
@@ -58,7 +58,7 @@ class ParserSettingsMonitor {
}
/**
- * @return The parser settings that must be used in place of the orignal settings The returned
+ * @return The parser settings that must be used in place of the original settings The returned
* object delegates all the call to the original settings.
*/
public ParserSettings getMonitoredSettings() {
@@ -66,7 +66,7 @@ class ParserSettingsMonitor {
}
/**
- * Free the ressource used during the monitoring, keeping only the info required to evaluate
+ * Free the resource used during the monitoring, keeping only the info required to evaluate
* hasChanged.
*/
public void endMonitoring() {
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/cache/RepositoryCacheManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/cache/RepositoryCacheManager.java b/src/java/org/apache/ivy/core/cache/RepositoryCacheManager.java
index a5effa1..6027452 100644
--- a/src/java/org/apache/ivy/core/cache/RepositoryCacheManager.java
+++ b/src/java/org/apache/ivy/core/cache/RepositoryCacheManager.java
@@ -36,97 +36,79 @@ public interface RepositoryCacheManager {
/**
* Returns the name of the repository cache manager.
- *
+ *
* @return the name of the repository cache manager.
*/
- public abstract String getName();
+ String getName();
/**
* Saves the information of which resolvers were used to resolve a module (both for metadata and
* artifact), so that this info can be loaded later (even after a jvm restart) for the use of
- * {@link #findModuleInCache(DependencyDescriptor, CacheMetadataOptions, String)}.
- *
- * @param md
- * the module descriptor resolved
- * @param metadataResolverName
- * metadata resolver name
- * @param artifactResolverName
- * artifact resolver name
+ * {@link #findModuleInCache(DependencyDescriptor, ModuleRevisionId, CacheMetadataOptions, String)}.
+ *
+ * @param descriptor the module descriptor resolved
+ * @param metadataResolverName metadata resolver name
+ * @param artifactResolverName artifact resolver name
*/
- public abstract void saveResolvers(ModuleDescriptor descriptor, String metadataResolverName,
- String artifactResolverName);
+ void saveResolvers(ModuleDescriptor descriptor, String metadataResolverName,
+ String artifactResolverName);
/**
* Returns the artifact origin of the given artifact as saved in this cache.
* <p>
* If the origin is unknown, the returned ArtifactOrigin instance will return true when
* {@link ArtifactOrigin#isUnknown(ArtifactOrigin)} is called.
- *
- * @param artifact
- * the artifact for which the saved artifact origin should be returned.
+ *
+ * @param artifact the artifact for which the saved artifact origin should be returned.
* @return the artifact origin of the given artifact as saved in this cache
*/
- public abstract ArtifactOrigin getSavedArtifactOrigin(Artifact artifact);
+ ArtifactOrigin getSavedArtifactOrigin(Artifact artifact);
/**
* Search a module descriptor in cache for a mrid
- *
- * @param dd
- * the dependency descriptor identifying the module to search
- * @param requestedRevisionId
- * the requested dependency module revision id identifying the module to search
- * @param options
- * options on how caching should be handled
- * @param expectedResolver
- * the resolver with which the md in cache must have been resolved to be returned,
- * null if this doesn't matter
+ *
+ * @param dd the dependency descriptor identifying the module to search
+ * @param requestedRevisionId the requested dependency module revision id identifying the module to search
+ * @param options options on how caching should be handled
+ * @param expectedResolver the resolver with which the md in cache must have been resolved to be returned,
+ * null if this doesn't matter
* @return the ResolvedModuleRevision corresponding to the module found, null if none correct
- * has been found in cache
+ * has been found in cache
*/
- public abstract ResolvedModuleRevision findModuleInCache(DependencyDescriptor dd,
- ModuleRevisionId requestedRevisionId, CacheMetadataOptions options,
- String expectedResolver);
+ ResolvedModuleRevision findModuleInCache(DependencyDescriptor dd,
+ ModuleRevisionId requestedRevisionId, CacheMetadataOptions options,
+ String expectedResolver);
/**
* Downloads an artifact to this cache.
- *
- * @param artifact
- * the artifact to download
- * @param resourceResolver
- * a resource resolver to use if the artifact needs to be resolved to a Resource for
- * downloading
- * @param resourceDownloader
- * a resource downloader to use if actual download of the resource is needed
- * @param options
- * a set of options to adjust the download
+ *
+ * @param artifact the artifact to download
+ * @param resourceResolver a resource resolver to use if the artifact needs to be resolved to a Resource for
+ * downloading
+ * @param resourceDownloader a resource downloader to use if actual download of the resource is needed
+ * @param options a set of options to adjust the download
* @return a report indicating how the download was performed
*/
- public abstract ArtifactDownloadReport download(Artifact artifact,
- ArtifactResourceResolver resourceResolver, ResourceDownloader resourceDownloader,
- CacheDownloadOptions options);
+ ArtifactDownloadReport download(Artifact artifact,
+ ArtifactResourceResolver resourceResolver, ResourceDownloader resourceDownloader,
+ CacheDownloadOptions options);
/**
* Download some repository resource and put it in the cache.
* <p>
* If the cached version is considered enough up to date, no downloading is done.
- *
- * @param resource
- * the resource of the file to put in cache
- * @param name
- * the descriptive name of the resource (helps while manually looking into the cache
- * files)
- * @param type
- * the type of the resource (helps while manually looking into the cache files)
- * @param extension
- * the extension of the resource (helps while manually looking into the cache files)
- * @param options
- * a set of options to adjust the download
- * @param repository
- * the repository which resolve the content of the resource
+ *
+ * @param resource the resource of the file to put in cache
+ * @param name the descriptive name of the resource (helps while manually looking into the cache
+ * files)
+ * @param type the type of the resource (helps while manually looking into the cache files)
+ * @param extension the extension of the resource (helps while manually looking into the cache files)
+ * @param options a set of options to adjust the download
+ * @param repository the repository which resolve the content of the resource
* @return a report indicating how the download was performed
*/
- public ArtifactDownloadReport downloadRepositoryResource(Resource resource, String name,
- String type, String extension, CacheResourceOptions options, Repository repository);
+ ArtifactDownloadReport downloadRepositoryResource(Resource resource, String name,
+ String type, String extension, CacheResourceOptions options, Repository repository);
/**
* Caches an original module descriptor.
@@ -134,76 +116,59 @@ public interface RepositoryCacheManager {
* After this call, the original module descriptor file (with no modification nor conversion)
* should be available as a local file.
* </p>
- *
- * @param resolver
- * the dependency resolver from which the cache request comes from
- * @param orginalMetadataRef
- * a resolved resource pointing to the remote original module descriptor
- * @param dd
- * the dependency descriptor for which the module descriptor should be cached
- * @param requestedMetadataArtifact
- * the module descriptor artifact as requested originally
- * @param downloader
- * a ResourceDownloader able to download the original module descriptor resource if
- * required by this cache implementation
- * @param options
- * options to apply to cache this module descriptor
+ *
+ * @param resolver the dependency resolver from which the cache request comes from
+ * @param originalMetadataRef a resolved resource pointing to the remote original module descriptor
+ * @param dd the dependency descriptor for which the module descriptor should be cached
+ * @param requestedMetadataArtifact the module descriptor artifact as requested originally
+ * @param downloader a ResourceDownloader able to download the original module descriptor resource if
+ * required by this cache implementation
+ * @param options options to apply to cache this module descriptor
* @return a {@link ResolvedModuleRevision} representing the local cached module descriptor, or
- * null if it failed
- * @throws ParseException
- * if an exception occurred while parsing the module descriptor
+ * null if it failed
+ * @throws ParseException if an exception occurred while parsing the module descriptor
*/
- public ResolvedModuleRevision cacheModuleDescriptor(DependencyResolver resolver,
- ResolvedResource orginalMetadataRef, DependencyDescriptor dd,
- Artifact requestedMetadataArtifact, ResourceDownloader downloader,
- CacheMetadataOptions options) throws ParseException;
+ ResolvedModuleRevision cacheModuleDescriptor(DependencyResolver resolver,
+ ResolvedResource originalMetadataRef, DependencyDescriptor dd,
+ Artifact requestedMetadataArtifact, ResourceDownloader downloader,
+ CacheMetadataOptions options) throws ParseException;
/**
* Stores a standardized version of an original module descriptor in the cache for later use.
- *
- * @param resolver
- * the dependency resolver from which the cache request comes from
- * @param orginalMetadataRef
- * a resolved resource pointing to the remote original module descriptor
- * @param requestedMetadataArtifact
- * the module descriptor artifact as requested originally
- * @param rmr
- * the {@link ResolvedModuleRevision} representing the local cached module descriptor
- * @param writer
- * a {@link ModuleDescriptorWriter} able to write the module descriptor to a stream.
+ *
+ * @param resolver the dependency resolver from which the cache request comes from
+ * @param originalMetadataRef a resolved resource pointing to the remote original module descriptor
+ * @param requestedMetadataArtifact the module descriptor artifact as requested originally
+ * @param rmr the {@link ResolvedModuleRevision} representing the local cached module descriptor
+ * @param writer a {@link ModuleDescriptorWriter} able to write the module descriptor to a stream.
*/
- public void originalToCachedModuleDescriptor(DependencyResolver resolver,
- ResolvedResource orginalMetadataRef, Artifact requestedMetadataArtifact,
- ResolvedModuleRevision rmr, ModuleDescriptorWriter writer);
+ void originalToCachedModuleDescriptor(DependencyResolver resolver,
+ ResolvedResource originalMetadataRef, Artifact requestedMetadataArtifact,
+ ResolvedModuleRevision rmr, ModuleDescriptorWriter writer);
/**
* Cleans the whole cache.
*/
- public void clean();
+ void clean();
/**
* Caches a dynamic revision constraint resolution.
- *
- * @param dynamicMrid
- * the dynamic module revision id
- * @param revision
- * the resolved revision
+ *
+ * @param dynamicMrid the dynamic module revision id
+ * @param revision the resolved revision
* @deprecated See {@link #saveResolvedRevision(String, ModuleRevisionId, String)} which
- * prevents cache + * thrashing when multiple resolvers store the same dynamicMrid
+ * prevents cache + * thrashing when multiple resolvers store the same dynamicMrid
*/
- public void saveResolvedRevision(ModuleRevisionId dynamicMrid, String revision);
+ void saveResolvedRevision(ModuleRevisionId dynamicMrid, String revision);
/**
* Caches a dynamic revision constraint resolution for a specific resolver.
- *
- * @param resolverName
- * the resolver in which this dynamic revision was resolved
- * @param dynamicMrid
- * the dynamic module revision id
- * @param revision
- * the resolved revision
+ *
+ * @param resolverName the resolver in which this dynamic revision was resolved
+ * @param dynamicMrid the dynamic module revision id
+ * @param revision the resolved revision
*/
- public void saveResolvedRevision(String resolverName, ModuleRevisionId dynamicMrid,
- String revision);
+ void saveResolvedRevision(String resolverName, ModuleRevisionId dynamicMrid,
+ String revision);
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/deliver/DeliverOptions.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/deliver/DeliverOptions.java b/src/java/org/apache/ivy/core/deliver/DeliverOptions.java
index 577e3dc..6577b7a 100644
--- a/src/java/org/apache/ivy/core/deliver/DeliverOptions.java
+++ b/src/java/org/apache/ivy/core/deliver/DeliverOptions.java
@@ -197,8 +197,8 @@ public class DeliverOptions {
}
/**
- * Return the configurations which must be deliverd. Returns <tt>null</tt> if all configurations
- * has to be deliverd. Attention: the returned array can contain wildcards!
+ * Return the configurations which must be delivered. Returns <tt>null</tt> if all configurations
+ * has to be delivered. Attention: the returned array can contain wildcards!
*
* @return the configurations to deliver
*/
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/deliver/PublishingDependencyRevisionResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/deliver/PublishingDependencyRevisionResolver.java b/src/java/org/apache/ivy/core/deliver/PublishingDependencyRevisionResolver.java
index aa632e3..567de12 100644
--- a/src/java/org/apache/ivy/core/deliver/PublishingDependencyRevisionResolver.java
+++ b/src/java/org/apache/ivy/core/deliver/PublishingDependencyRevisionResolver.java
@@ -29,10 +29,10 @@ public interface PublishingDependencyRevisionResolver {
* Returns the revision of the dependency for the publishing of the 'published' module in
* 'publishedStatus' status.
*
- * @param published
- * @param publishedStatus
- * @param depMrid
- * @param status
+ * @param published ModuleDescriptor
+ * @param publishedStatus ditto
+ * @param depMrid ModuleRevisionId
+ * @param status ditto
* @return the revision of the dependency
*/
String resolve(ModuleDescriptor published, String publishedStatus, ModuleRevisionId depMrid,
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6c92f32e/src/java/org/apache/ivy/core/event/IvyEvent.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/event/IvyEvent.java b/src/java/org/apache/ivy/core/event/IvyEvent.java
index b6b938f..18697a0 100644
--- a/src/java/org/apache/ivy/core/event/IvyEvent.java
+++ b/src/java/org/apache/ivy/core/event/IvyEvent.java
@@ -52,8 +52,8 @@ public class IvyEvent {
/**
* Should only be called during event object construction, since events should be immutable
*
- * @param key
- * @param value
+ * @param key ditto
+ * @param value ditto
*/
protected void addAttribute(String key, String value) {
attributes.put(key, value);