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&lt;String,String&gt;
      */
     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() {

Reply via email to