ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaiki...@apache.org
Subject [1/7] ant-ivy git commit: Add generics and Java 7 syntax to core
Date Tue, 18 Jul 2017 05:02:18 GMT
Repository: ant-ivy
Updated Branches:
  refs/heads/master 844100aed -> 692071797


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/test/java/org/apache/ivy/core/module/descriptor/IvyMakePomTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/core/module/descriptor/IvyMakePomTest.java b/test/java/org/apache/ivy/core/module/descriptor/IvyMakePomTest.java
index b372479..04c06e4 100644
--- a/test/java/org/apache/ivy/core/module/descriptor/IvyMakePomTest.java
+++ b/test/java/org/apache/ivy/core/module/descriptor/IvyMakePomTest.java
@@ -17,6 +17,17 @@
 
 package org.apache.ivy.core.module.descriptor;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.xml.xpath.XPathConstants;
+
 import org.apache.ivy.TestHelper;
 import org.apache.ivy.ant.IvyMakePom;
 import org.apache.ivy.util.TestXmlHelper;
@@ -28,16 +39,6 @@ import org.junit.rules.TemporaryFolder;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
-import javax.xml.xpath.XPathConstants;
-import java.io.File;
-import java.util.HashSet;
-import java.util.Set;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
 /**
  * Tests {@link IvyMakePom}
  */
@@ -106,6 +107,7 @@ public class IvyMakePomTest {
         private final String version;
         private final String scope;
         private final String classifier;
+        @SuppressWarnings("unused")
         private final boolean optional;
 
         private PomDependency(final String groupId, final String artifactId, final String version,
@@ -123,7 +125,6 @@ public class IvyMakePomTest {
             this.optional = optional;
         }
 
-
         static PomDependency parse(final Node dependencyNode) {
             if (dependencyNode == null) {
                 return null;

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/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 ca257c5..7d0b8b3 100644
--- a/test/java/org/apache/ivy/core/module/id/ModuleRevisionIdTest.java
+++ b/test/java/org/apache/ivy/core/module/id/ModuleRevisionIdTest.java
@@ -78,18 +78,18 @@ public class ModuleRevisionIdTest {
         testEncodeDecodeToString(ModuleRevisionId.newInstance("org", "name", "revision"));
         testEncodeDecodeToString(ModuleRevisionId.newInstance("org", "name", ""));
         testEncodeDecodeToString(ModuleRevisionId.newInstance("org.apache", "name-post", "1.0"));
-        testEncodeDecodeToString(ModuleRevisionId.newInstance("org/apache", "pre/name",
-            "1.0-dev8/2"));
-        Map extraAttributes = new HashMap();
+        testEncodeDecodeToString(
+            ModuleRevisionId.newInstance("org/apache", "pre/name", "1.0-dev8/2"));
+        Map<String, String> extraAttributes = new HashMap<>();
         extraAttributes.put("extra", "extravalue");
         extraAttributes.put("att/name", "att/value");
         extraAttributes.put("att.name", "att.value");
         extraAttributes.put("att<name", "att<value");
-        testEncodeDecodeToString(ModuleRevisionId.newInstance("org/apache", "pre/name",
-            "1.0-dev8/2", extraAttributes));
+        testEncodeDecodeToString(
+            ModuleRevisionId.newInstance("org/apache", "pre/name", "1.0-dev8/2", extraAttributes));
         extraAttributes.put("nullatt", null);
-        testEncodeDecodeToString(ModuleRevisionId.newInstance("org/apache", "pre/name",
-            "1.0-dev8/2", extraAttributes));
+        testEncodeDecodeToString(
+            ModuleRevisionId.newInstance("org/apache", "pre/name", "1.0-dev8/2", extraAttributes));
 
     }
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/test/java/org/apache/ivy/core/module/id/ModuleRulesTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/core/module/id/ModuleRulesTest.java b/test/java/org/apache/ivy/core/module/id/ModuleRulesTest.java
index 0968438..68be4d3 100644
--- a/test/java/org/apache/ivy/core/module/id/ModuleRulesTest.java
+++ b/test/java/org/apache/ivy/core/module/id/ModuleRulesTest.java
@@ -32,14 +32,14 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class ModuleRulesTest {
-    private ModuleRules rules;
+    private ModuleRules<String> rules;
 
-    private Object[] rule;
+    private String[] rule;
 
     @Before
     public void setUp() {
-        rules = new ModuleRules();
-        rule = new Object[10];
+        rules = new ModuleRules<String>();
+        rule = new String[10];
         for (int i = 0; i < rule.length; i++) {
             rule[i] = "RULE_" + i;
         }
@@ -76,9 +76,9 @@ public class ModuleRulesTest {
 
     // test helpers
 
-    private Filter acceptNone() {
-        return new Filter() {
-            public boolean accept(Object o) {
+    private Filter<String> acceptNone() {
+        return new Filter<String>() {
+            public boolean accept(String o) {
                 return false;
             }
 
@@ -88,11 +88,11 @@ public class ModuleRulesTest {
         };
     }
 
-    private Filter acceptSecond() {
-        return new Filter() {
+    private Filter<String> acceptSecond() {
+        return new Filter<String>() {
             private int cpt;
 
-            public boolean accept(Object o) {
+            public boolean accept(String o) {
                 return ++cpt == 2;
             }
 
@@ -102,22 +102,22 @@ public class ModuleRulesTest {
         };
     }
 
-    private Filter acceptAll() {
-        return NoFilter.INSTANCE;
+    private Filter<String> acceptAll() {
+        return NoFilter.instance();
     }
 
-    private void assertRule(Object rule, String mrid) {
-        Object ruleFound = rules.getRule(ModuleRevisionId.parse(mrid));
+    private void assertRule(String rule, String mrid) {
+        String ruleFound = rules.getRule(ModuleRevisionId.parse(mrid));
         assertEquals("unexcepted rule for " + mrid, rule, ruleFound);
     }
 
-    private void assertRule(Object rule, String mrid, Filter filter) {
-        Object ruleFound = rules.getRule(ModuleRevisionId.parse(mrid), filter);
+    private void assertRule(String rule, String mrid, Filter<String> filter) {
+        String ruleFound = rules.getRule(ModuleRevisionId.parse(mrid), filter);
         assertEquals("unexcepted rule for " + mrid + " filtered by " + filter, rule, ruleFound);
     }
 
-    private void assertModuleIdRule(Object rule, String mid, Filter filter) {
-        Object ruleFound = rules.getRule(ModuleId.parse(mid), filter);
+    private void assertModuleIdRule(String rule, String mid, Filter<String> filter) {
+        String ruleFound = rules.getRule(ModuleId.parse(mid), filter);
         assertEquals("unexcepted rule for " + mid + " filtered by " + filter, rule, ruleFound);
     }
 
@@ -126,7 +126,7 @@ public class ModuleRulesTest {
     }
 
     public class MridMatcherBuilder {
-        private Map attributes = new HashMap();
+        private Map<String, String> attributes = new HashMap<>();
 
         private PatternMatcher matcher = ExactPatternMatcher.INSTANCE;
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/test/java/org/apache/ivy/core/publish/PublishEventsTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/core/publish/PublishEventsTest.java b/test/java/org/apache/ivy/core/publish/PublishEventsTest.java
index 71b5ed2..cdc5d91 100644
--- a/test/java/org/apache/ivy/core/publish/PublishEventsTest.java
+++ b/test/java/org/apache/ivy/core/publish/PublishEventsTest.java
@@ -17,6 +17,13 @@
  */
 package org.apache.ivy.core.publish;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
@@ -37,13 +44,10 @@ import org.apache.ivy.core.module.id.ArtifactRevisionId;
 import org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser;
 import org.apache.ivy.plugins.resolver.MockResolver;
 import org.apache.ivy.plugins.trigger.AbstractTrigger;
-
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
-
 public class PublishEventsTest {
 
     // maps ArtifactRevisionId to PublishTestCase instance.
@@ -270,6 +274,13 @@ public class PublishEventsTest {
 
     /**
      * Assert that two Artifact instances refer to the same artifact and contain the same metadata.
+     *
+     * @param message
+     *            String
+     * @param expected
+     *            Artifact
+     * @param actual
+     *            Artifact
      */
     public static void assertSameArtifact(String message, Artifact expected, Artifact actual) {
         assertEquals(message + ": name", expected.getName(), actual.getName());

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java b/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java
index 12b92be..f51c06e 100644
--- a/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java
+++ b/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java
@@ -17,6 +17,12 @@
  */
 package org.apache.ivy.core.retrieve;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.io.File;
 import java.io.IOException;
 import java.net.URL;
@@ -24,6 +30,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.ivy.Ivy;
 import org.apache.ivy.TestHelper;
@@ -36,6 +43,7 @@ import org.apache.ivy.core.event.retrieve.StartRetrieveArtifactEvent;
 import org.apache.ivy.core.event.retrieve.StartRetrieveEvent;
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
 import org.apache.ivy.core.module.id.ModuleRevisionId;
+import org.apache.ivy.core.report.ArtifactDownloadReport;
 import org.apache.ivy.core.report.ResolveReport;
 import org.apache.ivy.core.resolve.ResolveOptions;
 import org.apache.ivy.util.DefaultMessageLogger;
@@ -47,8 +55,6 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
-
 public class RetrieveTest {
 
     private Ivy ivy;
@@ -295,8 +301,9 @@ public class RetrieveTest {
         ModuleRevisionId mrid = md.getModuleRevisionId();
         RetrieveOptions options = getRetrieveOptions();
         options.setConfs(new String[] {"A"});
-        Map artifactsToCopy = ivy.getRetrieveEngine().determineArtifactsToCopy(mrid,
-            "build/test/retrieve/[module]/[conf]/[artifact]-[revision].[ext]", options);
+        Map<ArtifactDownloadReport, Set<String>> artifactsToCopy = ivy.getRetrieveEngine()
+                .determineArtifactsToCopy(mrid,
+                    "build/test/retrieve/[module]/[conf]/[artifact]-[revision].[ext]", options);
         assertEquals(2, artifactsToCopy.size());
 
         options.setConfs(new String[] {"B"});

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/test/java/org/apache/ivy/core/settings/XmlSettingsParserTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/core/settings/XmlSettingsParserTest.java b/test/java/org/apache/ivy/core/settings/XmlSettingsParserTest.java
index e3db042..2cf7a4f 100644
--- a/test/java/org/apache/ivy/core/settings/XmlSettingsParserTest.java
+++ b/test/java/org/apache/ivy/core/settings/XmlSettingsParserTest.java
@@ -91,7 +91,7 @@ public class XmlSettingsParserTest {
         assertEquals("libraries", defaultResolver.getName());
         assertTrue(defaultResolver instanceof FileSystemResolver);
         FileSystemResolver fsres = (FileSystemResolver) defaultResolver;
-        List ivyPatterns = fsres.getIvyPatterns();
+        List<String> ivyPatterns = fsres.getIvyPatterns();
         assertNotNull(ivyPatterns);
         assertEquals(1, ivyPatterns.size());
         assertLocationEquals("lib/[organisation]/[module]/ivys/ivy-[revision].xml",
@@ -105,7 +105,7 @@ public class XmlSettingsParserTest {
         assertNotNull(internal);
         assertTrue(internal instanceof ChainResolver);
         ChainResolver chain = (ChainResolver) internal;
-        List subresolvers = chain.getResolvers();
+        List<DependencyResolver> subresolvers = chain.getResolvers();
         assertNotNull(subresolvers);
         assertEquals(2, subresolvers.size());
         FileSystemResolver fsInt1 = (FileSystemResolver) subresolvers.get(0);
@@ -113,7 +113,7 @@ public class XmlSettingsParserTest {
         assertEquals(1, fsInt1.getIvyPatterns().size());
         assertLocationEquals("sharedrep/[organisation]/[module]/ivys/ivy-[revision].xml", fsInt1
                 .getIvyPatterns().get(0));
-        assertEquals("int2", ((DependencyResolver) subresolvers.get(1)).getName());
+        assertEquals("int2", subresolvers.get(1).getName());
 
         strategy = fsInt1.getLatestStrategy();
         assertNotNull(strategy);
@@ -145,12 +145,12 @@ public class XmlSettingsParserTest {
         assertNotNull(internal);
         assertTrue(internal instanceof ChainResolver);
         ChainResolver chain = (ChainResolver) internal;
-        List subresolvers = chain.getResolvers();
+        List<DependencyResolver> subresolvers = chain.getResolvers();
         assertNotNull(subresolvers);
         assertEquals(2, subresolvers.size());
 
-        assertEquals("mock1", ((DependencyResolver) subresolvers.get(0)).getName());
-        assertEquals("mock2", ((DependencyResolver) subresolvers.get(1)).getName());
+        assertEquals("mock1", subresolvers.get(0).getName());
+        assertEquals("mock2", subresolvers.get(1).getName());
         assertTrue(subresolvers.get(0) instanceof MockResolver);
         assertTrue(subresolvers.get(1) instanceof MockResolver);
     }
@@ -318,13 +318,13 @@ public class XmlSettingsParserTest {
         assertNotNull(internal);
         assertTrue(internal instanceof ChainResolver);
         ChainResolver chain = (ChainResolver) internal;
-        List subresolvers = chain.getResolvers();
+        List<DependencyResolver> subresolvers = chain.getResolvers();
         assertNotNull(subresolvers);
         assertEquals(2, subresolvers.size());
         FileSystemResolver fsInt1 = (FileSystemResolver) subresolvers.get(0);
         assertEquals("fs", fsInt1.getName());
 
-        List ivyPatterns = fsInt1.getIvyPatterns();
+        List<String> ivyPatterns = fsInt1.getIvyPatterns();
         assertNotNull(ivyPatterns);
         assertEquals(1, ivyPatterns.size());
         assertLocationEquals("sharedrep/[organisation]/[module]/ivys/ivy-[revision].xml",
@@ -357,13 +357,13 @@ public class XmlSettingsParserTest {
         assertNotNull(def);
         assertTrue(def instanceof ChainResolver);
         ChainResolver chain = (ChainResolver) def;
-        List subresolvers = chain.getResolvers();
+        List<DependencyResolver> subresolvers = chain.getResolvers();
         assertNotNull(subresolvers);
         assertEquals(2, subresolvers.size());
         FileSystemResolver fsInt1 = (FileSystemResolver) subresolvers.get(0);
         assertEquals("default-fs1", fsInt1.getName());
 
-        List ivyPatterns = fsInt1.getIvyPatterns();
+        List<String> ivyPatterns = fsInt1.getIvyPatterns();
         assertNotNull(ivyPatterns);
         assertEquals(1, ivyPatterns.size());
         assertLocationEquals(
@@ -413,10 +413,10 @@ public class XmlSettingsParserTest {
         assertNotNull(mychain);
         assertTrue(mychain instanceof ChainResolver);
         ChainResolver chain = (ChainResolver) mychain;
-        List subresolvers = chain.getResolvers();
+        List<DependencyResolver> subresolvers = chain.getResolvers();
         assertNotNull(subresolvers);
         assertEquals(1, subresolvers.size());
-        shared = (DependencyResolver) subresolvers.get(0);
+        shared = subresolvers.get(0);
         assertEquals("shared", shared.getName());
         assertTrue(shared instanceof FileSystemResolver);
     }
@@ -437,7 +437,7 @@ public class XmlSettingsParserTest {
         assertTrue(testResolver instanceof IBiblioResolver);
 
         ChainResolver chain = (ChainResolver) macrores;
-        List subresolvers = chain.getResolvers();
+        List<DependencyResolver> subresolvers = chain.getResolvers();
         assertNotNull(subresolvers);
         assertEquals(1, subresolvers.size());
         assertEquals(testResolver, subresolvers.get(0));
@@ -466,13 +466,13 @@ public class XmlSettingsParserTest {
         assertNotNull(def);
         assertTrue(def instanceof ChainResolver);
         ChainResolver chain = (ChainResolver) def;
-        List subresolvers = chain.getResolvers();
+        List<DependencyResolver> subresolvers = chain.getResolvers();
         assertNotNull(subresolvers);
         assertEquals(2, subresolvers.size());
         FileSystemResolver fsInt1 = (FileSystemResolver) subresolvers.get(0);
         assertEquals("default-fs1", fsInt1.getName());
 
-        List ivyPatterns = fsInt1.getIvyPatterns();
+        List<String> ivyPatterns = fsInt1.getIvyPatterns();
         assertNotNull(ivyPatterns);
         assertEquals(1, ivyPatterns.size());
         assertLocationEquals(
@@ -523,7 +523,7 @@ public class XmlSettingsParserTest {
                 .getResource("ivysettings-include-missing-file.xml"));
     }
 
-   @Test
+    @Test
     public void testIncludeSpecialCharInName() throws Exception {
         IvySettings settings = new IvySettings();
         XmlSettingsParser parser = new XmlSettingsParser(settings);
@@ -533,13 +533,13 @@ public class XmlSettingsParserTest {
         assertNotNull(def);
         assertTrue(def instanceof ChainResolver);
         ChainResolver chain = (ChainResolver) def;
-        List subresolvers = chain.getResolvers();
+        List<DependencyResolver> subresolvers = chain.getResolvers();
         assertNotNull(subresolvers);
         assertEquals(2, subresolvers.size());
         FileSystemResolver fsInt1 = (FileSystemResolver) subresolvers.get(0);
         assertEquals("default-fs1", fsInt1.getName());
 
-        List ivyPatterns = fsInt1.getIvyPatterns();
+        List<String> ivyPatterns = fsInt1.getIvyPatterns();
         assertNotNull(ivyPatterns);
         assertEquals(1, ivyPatterns.size());
         assertLocationEquals(

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/test/java/org/apache/ivy/osgi/core/OsgiLatestStrategyTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/osgi/core/OsgiLatestStrategyTest.java b/test/java/org/apache/ivy/osgi/core/OsgiLatestStrategyTest.java
index c0f0a8e..e385f5d 100644
--- a/test/java/org/apache/ivy/osgi/core/OsgiLatestStrategyTest.java
+++ b/test/java/org/apache/ivy/osgi/core/OsgiLatestStrategyTest.java
@@ -17,6 +17,9 @@
  */
 package org.apache.ivy.osgi.core;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -26,9 +29,6 @@ import java.util.List;
 import org.apache.ivy.plugins.latest.ArtifactInfo;
 import org.junit.Test;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
 public class OsgiLatestStrategyTest {
 
     @Test
@@ -53,7 +53,7 @@ public class OsgiLatestStrategyTest {
         ArtifactInfo[] shuffledRevs = shuffled.toArray(new ArtifactInfo[revs.length]);
 
         OsgiLatestStrategy latestRevisionStrategy = new OsgiLatestStrategy();
-        List sorted = latestRevisionStrategy.sort(shuffledRevs);
+        List<ArtifactInfo> sorted = latestRevisionStrategy.sort(shuffledRevs);
         assertEquals(Arrays.asList(revs), sorted);
     }
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/test/java/org/apache/ivy/osgi/updatesite/UpdateSiteLoaderTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/osgi/updatesite/UpdateSiteLoaderTest.java b/test/java/org/apache/ivy/osgi/updatesite/UpdateSiteLoaderTest.java
index 6f2403e..c41c80a 100644
--- a/test/java/org/apache/ivy/osgi/updatesite/UpdateSiteLoaderTest.java
+++ b/test/java/org/apache/ivy/osgi/updatesite/UpdateSiteLoaderTest.java
@@ -34,12 +34,10 @@ import org.apache.ivy.osgi.repo.ModuleDescriptorWrapper;
 import org.apache.ivy.osgi.repo.RepoDescriptor;
 import org.apache.ivy.util.CacheCleaner;
 import org.apache.ivy.util.CollectionUtils;
-
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
-
 import org.xml.sax.SAXException;
 
 public class UpdateSiteLoaderTest {
@@ -68,9 +66,9 @@ public class UpdateSiteLoaderTest {
         RepoDescriptor site = loader.load(new URI(
                 "http://www.apache.org/dist/ant/ivyde/updatesite/"));
         assertTrue(site.getModules().hasNext());
-        for (Iterator it = site.getModules(); it.hasNext();) {
-            ModuleDescriptor md = ((ModuleDescriptorWrapper) it.next()).getModuleDescriptor();
-            String name = md.getModuleRevisionId().getName();
+        Iterator<ModuleDescriptorWrapper> it = site.getModules();
+        while (it.hasNext()) {
+            String name = it.next().getModuleDescriptor().getModuleRevisionId().getName();
             assertTrue(name, name.startsWith("org.apache.ivy"));
         }
     }

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java b/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java
index 3a9e113..9324461 100644
--- a/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java
+++ b/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java
@@ -17,6 +17,9 @@
  */
 package org.apache.ivy.plugins.conflict;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
 import java.io.File;
 import java.util.Iterator;
 import java.util.List;
@@ -32,9 +35,6 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
 public class LatestConflictManagerTest {
 
     private Ivy ivy;
@@ -60,11 +60,11 @@ public class LatestConflictManagerTest {
         ResolveReport report = ivy.resolve(
             LatestConflictManagerTest.class.getResource("ivy-388.xml"), getResolveOptions());
 
-        List deps = report.getDependencies();
-        Iterator dependencies = deps.iterator();
+        List<IvyNode> deps = report.getDependencies();
+        Iterator<IvyNode> dependencies = deps.iterator();
         String[] confs = report.getConfigurations();
         while (dependencies.hasNext()) {
-            IvyNode node = (IvyNode) dependencies.next();
+            IvyNode node = dependencies.next();
             for (String conf : confs) {
                 if (!node.isEvicted(conf)) {
                     boolean flag1 = report.getConfigurationReport(conf).getDependency(

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/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 44c77e8..3ed867b 100644
--- a/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
+++ b/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
@@ -318,7 +318,7 @@ public class PomModuleDescriptorParserTest extends AbstractModuleDescriptorParse
         assertEquals(1, dds.length);
         assertEquals(ModuleRevisionId.newInstance("commons-logging", "commons-logging", "1.0.4"),
             dds[0].getDependencyRevisionId());
-        Map extraAtt = Collections.singletonMap("classifier", "asl");
+        Map<String, String> extraAtt = Collections.singletonMap("classifier", "asl");
         assertEquals(1, dds[0].getAllDependencyArtifacts().length);
         assertEquals(extraAtt, dds[0].getAllDependencyArtifacts()[0].getExtraAttributes());
 
@@ -508,8 +508,8 @@ public class PomModuleDescriptorParserTest extends AbstractModuleDescriptorParse
         assertEquals(3, dds.length);
         assertEquals(ModuleRevisionId.newInstance("commons-logging", "commons-logging", "1.0.4"),
             dds[0].getDependencyRevisionId());
-        assertEquals(new HashSet(Arrays.asList(new String[] {"optional"})),
-            new HashSet(Arrays.asList(dds[0].getModuleConfigurations())));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"optional"})),
+            new HashSet<>(Arrays.asList(dds[0].getModuleConfigurations())));
         // I don't know what it should be. Ivy has no notion of optional dependencies
         // assertEquals(new HashSet(Arrays.asList(new String[] {"compile(*)", "runtime(*)",
         // "master(*)"})), new HashSet(Arrays.asList(dds[0]
@@ -517,21 +517,21 @@ public class PomModuleDescriptorParserTest extends AbstractModuleDescriptorParse
 
         assertEquals(ModuleRevisionId.newInstance("cglib", "cglib", "2.0.2"),
             dds[1].getDependencyRevisionId());
-        assertEquals(new HashSet(Arrays.asList(new String[] {"compile", "runtime"})), new HashSet(
-                Arrays.asList(dds[1].getModuleConfigurations())));
-        assertEquals(new HashSet(Arrays.asList(new String[] {"master(*)", "compile(*)"})),
-            new HashSet(Arrays.asList(dds[1].getDependencyConfigurations("compile"))));
-        assertEquals(new HashSet(Arrays.asList(new String[] {"runtime(*)"})),
-            new HashSet(Arrays.asList(dds[1].getDependencyConfigurations("runtime"))));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"compile", "runtime"})),
+            new HashSet<>(Arrays.asList(dds[1].getModuleConfigurations())));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"master(*)", "compile(*)"})),
+            new HashSet<>(Arrays.asList(dds[1].getDependencyConfigurations("compile"))));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"runtime(*)"})),
+            new HashSet<>(Arrays.asList(dds[1].getDependencyConfigurations("runtime"))));
 
         assertEquals(ModuleRevisionId.newInstance("cglib", "cglib-extra", "2.0.2"),
             dds[2].getDependencyRevisionId());
-        assertEquals(new HashSet(Arrays.asList(new String[] {"compile", "runtime"})), new HashSet(
-                Arrays.asList(dds[2].getModuleConfigurations())));
-        assertEquals(new HashSet(Arrays.asList(new String[] {"master(*)", "compile(*)"})),
-            new HashSet(Arrays.asList(dds[2].getDependencyConfigurations("compile"))));
-        assertEquals(new HashSet(Arrays.asList(new String[] {"runtime(*)"})),
-            new HashSet(Arrays.asList(dds[2].getDependencyConfigurations("runtime"))));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"compile", "runtime"})),
+            new HashSet<>(Arrays.asList(dds[2].getModuleConfigurations())));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"master(*)", "compile(*)"})),
+            new HashSet<>(Arrays.asList(dds[2].getDependencyConfigurations("compile"))));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"runtime(*)"})),
+            new HashSet<>(Arrays.asList(dds[2].getDependencyConfigurations("runtime"))));
     }
 
     @Test
@@ -548,29 +548,29 @@ public class PomModuleDescriptorParserTest extends AbstractModuleDescriptorParse
         assertEquals(3, dds.length);
         assertEquals(ModuleRevisionId.newInstance("odmg", "odmg", "3.0"),
             dds[0].getDependencyRevisionId());
-        assertEquals(new HashSet(Arrays.asList(new String[] {"runtime"})),
-            new HashSet(Arrays.asList(dds[0].getModuleConfigurations())));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"runtime"})),
+            new HashSet<>(Arrays.asList(dds[0].getModuleConfigurations())));
         assertEquals(
-            new HashSet(Arrays.asList(new String[] {"compile(*)", "runtime(*)", "master(*)"})),
-            new HashSet(Arrays.asList(dds[0].getDependencyConfigurations("runtime"))));
+            new HashSet<>(Arrays.asList(new String[] {"compile(*)", "runtime(*)", "master(*)"})),
+            new HashSet<>(Arrays.asList(dds[0].getDependencyConfigurations("runtime"))));
 
         assertEquals(ModuleRevisionId.newInstance("commons-logging", "commons-logging", "1.0.4"),
             dds[1].getDependencyRevisionId());
-        assertEquals(new HashSet(Arrays.asList(new String[] {"compile", "runtime"})), new HashSet(
-                Arrays.asList(dds[1].getModuleConfigurations())));
-        assertEquals(new HashSet(Arrays.asList(new String[] {"master(*)", "compile(*)"})),
-            new HashSet(Arrays.asList(dds[1].getDependencyConfigurations("compile"))));
-        assertEquals(new HashSet(Arrays.asList(new String[] {"runtime(*)"})),
-            new HashSet(Arrays.asList(dds[1].getDependencyConfigurations("runtime"))));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"compile", "runtime"})),
+            new HashSet<>(Arrays.asList(dds[1].getModuleConfigurations())));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"master(*)", "compile(*)"})),
+            new HashSet<>(Arrays.asList(dds[1].getDependencyConfigurations("compile"))));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"runtime(*)"})),
+            new HashSet<>(Arrays.asList(dds[1].getDependencyConfigurations("runtime"))));
 
         assertEquals(ModuleRevisionId.newInstance("cglib", "cglib", "2.0.2"),
             dds[2].getDependencyRevisionId());
-        assertEquals(new HashSet(Arrays.asList(new String[] {"compile", "runtime"})), new HashSet(
-                Arrays.asList(dds[2].getModuleConfigurations())));
-        assertEquals(new HashSet(Arrays.asList(new String[] {"master(*)", "compile(*)"})),
-            new HashSet(Arrays.asList(dds[2].getDependencyConfigurations("compile"))));
-        assertEquals(new HashSet(Arrays.asList(new String[] {"runtime(*)"})),
-            new HashSet(Arrays.asList(dds[2].getDependencyConfigurations("runtime"))));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"compile", "runtime"})),
+            new HashSet<>(Arrays.asList(dds[2].getModuleConfigurations())));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"master(*)", "compile(*)"})),
+            new HashSet<>(Arrays.asList(dds[2].getDependencyConfigurations("compile"))));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"runtime(*)"})),
+            new HashSet<>(Arrays.asList(dds[2].getDependencyConfigurations("runtime"))));
     }
 
     @Test
@@ -587,47 +587,51 @@ public class PomModuleDescriptorParserTest extends AbstractModuleDescriptorParse
         assertEquals(4, dds.length);
         assertEquals(ModuleRevisionId.newInstance("commons-logging", "commons-logging", "1.0.4"),
             dds[0].getDependencyRevisionId());
-        assertEquals(new HashSet(Arrays.asList(new String[] {"compile", "runtime"})), new HashSet(
-                Arrays.asList(dds[0].getModuleConfigurations())));
-        assertEquals(new HashSet(Arrays.asList(new String[] {"master(*)", "compile(*)"})),
-            new HashSet(Arrays.asList(dds[0].getDependencyConfigurations("compile"))));
-        assertEquals(new HashSet(Arrays.asList(new String[] {"runtime(*)"})),
-            new HashSet(Arrays.asList(dds[0].getDependencyConfigurations("runtime"))));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"compile", "runtime"})),
+            new HashSet<>(Arrays.asList(dds[0].getModuleConfigurations())));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"master(*)", "compile(*)"})),
+            new HashSet<>(Arrays.asList(dds[0].getDependencyConfigurations("compile"))));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"runtime(*)"})),
+            new HashSet<>(Arrays.asList(dds[0].getDependencyConfigurations("runtime"))));
         assertEquals(0, dds[0].getAllExcludeRules().length);
 
         assertEquals(ModuleRevisionId.newInstance("dom4j", "dom4j", "1.6"),
             dds[1].getDependencyRevisionId());
-        assertEquals(new HashSet(Arrays.asList(new String[] {"compile", "runtime"})), new HashSet(
-                Arrays.asList(dds[1].getModuleConfigurations())));
-        assertEquals(new HashSet(Arrays.asList(new String[] {"master(*)", "compile(*)"})),
-            new HashSet(Arrays.asList(dds[1].getDependencyConfigurations("compile"))));
-        assertEquals(new HashSet(Arrays.asList(new String[] {"runtime(*)"})),
-            new HashSet(Arrays.asList(dds[1].getDependencyConfigurations("runtime"))));
-        assertDependencyModulesExcludes(dds[1], new String[] {"compile"}, new String[] {
-                "jaxme-api", "jaxen"});
-        assertDependencyModulesExcludes(dds[1], new String[] {"runtime"}, new String[] {
-                "jaxme-api", "jaxen"});
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"compile", "runtime"})),
+            new HashSet<>(Arrays.asList(dds[1].getModuleConfigurations())));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"master(*)", "compile(*)"})),
+            new HashSet<>(Arrays.asList(dds[1].getDependencyConfigurations("compile"))));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"runtime(*)"})),
+            new HashSet<>(Arrays.asList(dds[1].getDependencyConfigurations("runtime"))));
+        assertDependencyModulesExcludes(dds[1], new String[] {"compile"},
+            new String[] {"jaxme-api", "jaxen"});
+        assertDependencyModulesExcludes(dds[1], new String[] {"runtime"},
+            new String[] {"jaxme-api", "jaxen"});
 
         assertEquals(ModuleRevisionId.newInstance("cglib", "cglib", "2.0.2"),
             dds[2].getDependencyRevisionId());
-        assertEquals(new HashSet(Arrays.asList(new String[] {"compile", "runtime"})), new HashSet(
-                Arrays.asList(dds[2].getModuleConfigurations())));
-        assertEquals(new HashSet(Arrays.asList(new String[] {"master(*)", "compile(*)"})),
-            new HashSet(Arrays.asList(dds[2].getDependencyConfigurations("compile"))));
-        assertEquals(new HashSet(Arrays.asList(new String[] {"runtime(*)"})),
-            new HashSet(Arrays.asList(dds[2].getDependencyConfigurations("runtime"))));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"compile", "runtime"})),
+            new HashSet<>(Arrays.asList(dds[2].getModuleConfigurations())));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"master(*)", "compile(*)"})),
+            new HashSet<>(Arrays.asList(dds[2].getDependencyConfigurations("compile"))));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"runtime(*)"})),
+            new HashSet<>(Arrays.asList(dds[2].getDependencyConfigurations("runtime"))));
         assertEquals(0, dds[2].getAllExcludeRules().length);
 
         // test for IVY-1531 (where the pom.xml can have a exclusion for groupid=* and artifactid=*, implying transitive=false, in ivy land)
         final DependencyDescriptor excludeAllTransitiveDepsDescriptor = dds[3];
-        assertEquals(ModuleRevisionId.newInstance("org.owasp.esapi", "esapi", "2.1.0"), excludeAllTransitiveDepsDescriptor.getDependencyRevisionId());
-        assertEquals(new HashSet(Arrays.asList(new String[] {"compile", "runtime"})), new HashSet(Arrays.asList(excludeAllTransitiveDepsDescriptor.getModuleConfigurations())));
-        assertEquals(new HashSet(Arrays.asList(new String[] {"master(*)", "compile(*)"})),
-                new HashSet(Arrays.asList(excludeAllTransitiveDepsDescriptor.getDependencyConfigurations("compile"))));
-        assertEquals(new HashSet(Arrays.asList(new String[] {"runtime(*)"})),
-                new HashSet(Arrays.asList(excludeAllTransitiveDepsDescriptor.getDependencyConfigurations("runtime"))));
-        assertEquals("No exclusion elements were expected to be present for " + excludeAllTransitiveDepsDescriptor, 0, excludeAllTransitiveDepsDescriptor.getAllExcludeRules().length);
-        assertFalse("Dependency  " + excludeAllTransitiveDepsDescriptor + " was expected to have transitive=false", excludeAllTransitiveDepsDescriptor.isTransitive());
+        assertEquals(ModuleRevisionId.newInstance("org.owasp.esapi", "esapi", "2.1.0"),
+            excludeAllTransitiveDepsDescriptor.getDependencyRevisionId());
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"compile", "runtime"})),
+            new HashSet<>(Arrays.asList(excludeAllTransitiveDepsDescriptor.getModuleConfigurations())));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"master(*)", "compile(*)"})),
+            new HashSet<>(Arrays.asList(excludeAllTransitiveDepsDescriptor.getDependencyConfigurations("compile"))));
+        assertEquals(new HashSet<>(Arrays.asList(new String[] {"runtime(*)"})),
+            new HashSet<>(Arrays.asList(excludeAllTransitiveDepsDescriptor.getDependencyConfigurations("runtime"))));
+        assertEquals("No exclusion elements were expected to be present for " + excludeAllTransitiveDepsDescriptor,
+            0, excludeAllTransitiveDepsDescriptor.getAllExcludeRules().length);
+        assertFalse("Dependency  " + excludeAllTransitiveDepsDescriptor + " was expected to have transitive=false",
+            excludeAllTransitiveDepsDescriptor.isTransitive());
     }
 
     @Test
@@ -864,8 +868,8 @@ public class PomModuleDescriptorParserTest extends AbstractModuleDescriptorParse
         // 2 are inherited from parent. Only the first one is important for this test
 
         assertEquals(ModuleRevisionId.newInstance("org.apache", "test-version-other", "5.76"),
-            dds[0].getDependencyRevisionId());// present in the pom using a property defined in the
-                                              // parent
+            dds[0].getDependencyRevisionId());
+        // present in the pom using a property defined in the parent
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java b/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
index 8a55149..2291722 100644
--- a/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
+++ b/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
@@ -210,7 +210,6 @@ public class XmlModuleDescriptorParserTest extends AbstractModuleDescriptorParse
                 getClass().getResource("test-bad-version.xml"), true);
     }
 
-    @SuppressWarnings("deprecation")
     @Test
     public void testFull() throws Exception {
         ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(settings,
@@ -234,8 +233,11 @@ public class XmlModuleDescriptorParserTest extends AbstractModuleDescriptorParse
                 + "and myconf4 is not too bad too.", md.getDescription().replaceAll("\r\n", "\n")
                 .replace('\r', '\n'));
 
-        assertEquals(1, md.getExtraInfo().size());
-        assertEquals("56576", md.getExtraInfo().get("e:someExtra"));
+        assertEquals(1, md.getExtraInfos().size());
+        ExtraInfoHolder someExtraElement = md.getExtraInfos().get(0);
+        assertEquals("e:someExtra", someExtraElement.getName());
+        assertEquals("56576", someExtraElement.getContent());
+        assertEquals(0, someExtraElement.getAttributes().size());
 
         Configuration[] confs = md.getConfigurations();
         assertNotNull(confs);
@@ -505,24 +507,24 @@ public class XmlModuleDescriptorParserTest extends AbstractModuleDescriptorParse
             Arrays.asList(rules[1].getConfigurations()));
     }
 
-    @SuppressWarnings("deprecation")
     @Test
     public void testFullNoValidation() throws Exception {
         ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(settings,
             getClass().getResource("test.xml"), false);
         assertNotNull(md);
-        assertEquals(1, md.getExtraInfo().size());
-        assertEquals("56576", md.getExtraInfo().get("e:someExtra"));
+        assertEquals(1, md.getExtraInfos().size());
+        ExtraInfoHolder someExtraElement = md.getExtraInfos().get(0);
+        assertEquals("e:someExtra", someExtraElement.getName());
+        assertEquals("56576", someExtraElement.getContent());
+        assertEquals(0, someExtraElement.getAttributes().size());
+        assertEquals(0, someExtraElement.getNestedExtraInfoHolder().size());
     }
 
-    @SuppressWarnings("deprecation")
     @Test
     public void testExtraInfos() throws Exception {
         ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(settings,
             getClass().getResource("test-extrainfo.xml"), true);
         assertNotNull(md);
-        assertEquals(2, md.getExtraInfo().size());
-        assertEquals("56576", md.getExtraInfo().get("e:someExtra"));
         assertEquals(2, md.getExtraInfos().size());
         ExtraInfoHolder firstExtraInfoElement = md.getExtraInfos().get(0);
         assertEquals("e:someExtra", firstExtraInfoElement.getName());
@@ -538,14 +540,11 @@ public class XmlModuleDescriptorParserTest extends AbstractModuleDescriptorParse
         assertEquals(0, secondExtraInfoElement.getNestedExtraInfoHolder().size());
     }
 
-    @SuppressWarnings("deprecation")
     @Test
     public void testExtraInfosNested() throws Exception {
         ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(settings,
             getClass().getResource("test-extrainfo-nested.xml"), true);
         assertNotNull(md);
-        assertEquals(4, md.getExtraInfo().size());
-        assertEquals("56576", md.getExtraInfo().get("e:someExtra"));
         assertEquals(2, md.getExtraInfos().size());
         ExtraInfoHolder someExtraElement = md.getExtraInfos().get(0);
         assertEquals("e:someExtra", someExtraElement.getName());

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/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 5e687b9..ad3de6a 100644
--- a/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleUpdaterTest.java
+++ b/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleUpdaterTest.java
@@ -67,14 +67,14 @@ public class XmlModuleUpdaterTest {
         XmlModuleDescriptorUpdater.LINE_SEPARATOR = "\n";
         File dest = new File("build/updated-test.xml");
         dest.deleteOnExit();
-        Map resolvedRevisions = new HashMap();
+        Map<ModuleRevisionId, String> resolvedRevisions = new HashMap<>();
         resolvedRevisions.put(
             ModuleRevisionId.newInstance("yourorg", "yourmodule2", "branch1", "2+"), "2.5");
         resolvedRevisions.put(
             ModuleRevisionId.newInstance("yourorg", "yourmodule6", "trunk", "latest.integration"),
             "6.3");
 
-        Map resolvedBranches = new HashMap();
+        Map<ModuleRevisionId, String> resolvedBranches = new HashMap<>();
         resolvedBranches.put(ModuleRevisionId.newInstance("yourorg", "yourmodule3", "3.1"),
             "branch1");
         resolvedBranches.put(
@@ -126,14 +126,14 @@ public class XmlModuleUpdaterTest {
         XmlModuleDescriptorUpdater.LINE_SEPARATOR = "\n";
         File dest = new File("build/updated-test2.xml");
         dest.deleteOnExit();
-        Map resolvedRevisions = new HashMap();
+        Map<ModuleRevisionId, String> resolvedRevisions = new HashMap<>();
         resolvedRevisions.put(
             ModuleRevisionId.newInstance("yourorg", "yourmodule2", "branch1", "2+"), "2.5");
         resolvedRevisions.put(
             ModuleRevisionId.newInstance("yourorg", "yourmodule6", "trunk", "latest.integration"),
             "6.3");
 
-        Map resolvedBranches = new HashMap();
+        Map<ModuleRevisionId, String> resolvedBranches = new HashMap<>();
         resolvedBranches.put(ModuleRevisionId.newInstance("yourorg", "yourmodule3", "3.1"),
             "branch1");
         resolvedBranches.put(
@@ -366,11 +366,13 @@ public class XmlModuleUpdaterTest {
     }
 
     private UpdateOptions getUpdateOptions(String status, String revision) {
-        return getUpdateOptions(new IvySettings(), new HashMap(), status, revision, new Date());
+        return getUpdateOptions(new IvySettings(), new HashMap<ModuleRevisionId, String>(), status,
+            revision, new Date());
     }
 
-    private UpdateOptions getUpdateOptions(IvySettings settings, Map resolvedRevisions,
-            String status, String revision, Date pubdate) {
+    private UpdateOptions getUpdateOptions(IvySettings settings,
+            Map<ModuleRevisionId, String> resolvedRevisions, String status, String revision,
+            Date pubdate) {
         return new UpdateOptions().setSettings(settings).setResolvedRevisions(resolvedRevisions)
                 .setStatus(status).setRevision(revision).setPubdate(pubdate);
     }

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/test/java/org/apache/ivy/plugins/resolver/ChainResolverTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/resolver/ChainResolverTest.java b/test/java/org/apache/ivy/plugins/resolver/ChainResolverTest.java
index 27e9415..c04894c 100644
--- a/test/java/org/apache/ivy/plugins/resolver/ChainResolverTest.java
+++ b/test/java/org/apache/ivy/plugins/resolver/ChainResolverTest.java
@@ -17,6 +17,10 @@
  */
 package org.apache.ivy.plugins.resolver;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.Date;
@@ -48,10 +52,6 @@ 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.assertTrue;
-
 /**
  * Tests ChainResolver
  */
@@ -89,10 +89,10 @@ public class ChainResolverTest extends AbstractDependencyResolverTest {
     }
 
     private void assertResolversSizeAndNames(ChainResolver chain, int size) {
-        List resolvers = chain.getResolvers();
+        List<DependencyResolver> resolvers = chain.getResolvers();
         assertEquals(size, resolvers.size());
         for (int i = 0; i < resolvers.size(); i++) {
-            DependencyResolver r = (DependencyResolver) resolvers.get(i);
+            DependencyResolver r = resolvers.get(i);
             assertEquals(String.valueOf(i + 1), r.getName());
         }
     }
@@ -214,13 +214,13 @@ public class ChainResolverTest extends AbstractDependencyResolverTest {
                 MockResolver.buildMockResolver(settings, "2", true,
                     ModuleRevisionId.newInstance("org", "mod", "4"),
                     new GregorianCalendar(2005, 1, 22).getTime(), true),
-                    // latest -> but default
+                // latest -> but default
                 MockResolver.buildMockResolver(settings, "3", false, null),
                 MockResolver.buildMockResolver(settings, "4", false, null),
                 MockResolver.buildMockResolver(settings, "5", true,
                     ModuleRevisionId.newInstance("org", "mod", "4"),
                     new GregorianCalendar(2005, 1, 22).getTime()),
-                    // latest -> should be the one kept
+                // latest -> should be the one kept
                 MockResolver.buildMockResolver(settings, "6", false, null),
                 MockResolver.buildMockResolver(settings, "7", false, null)};
         for (MockResolver resolver : resolvers) {
@@ -298,12 +298,12 @@ public class ChainResolverTest extends AbstractDependencyResolverTest {
                 MockResolver.buildMockResolver(settings, "2", true,
                     ModuleRevisionId.newInstance("org", "mod", "4"),
                     new GregorianCalendar(2005, 1, 22).getTime(), true),
-                    // default
+                // default
                 MockResolver.buildMockResolver(settings, "3", false, null),
                 MockResolver.buildMockResolver(settings, "4", true,
                     ModuleRevisionId.newInstance("org", "mod", "4"),
                     new GregorianCalendar(2005, 1, 22).getTime()),
-                    // not default -> should be the one kept
+                // not default -> should be the one kept
                 MockResolver.buildMockResolver(settings, "5", false, null)};
         for (MockResolver resolver : resolvers) {
             chain.add(resolver);

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/test/java/org/apache/ivy/plugins/resolver/IBiblioResolverTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/resolver/IBiblioResolverTest.java b/test/java/org/apache/ivy/plugins/resolver/IBiblioResolverTest.java
index 743ff02..edf77a6 100644
--- a/test/java/org/apache/ivy/plugins/resolver/IBiblioResolverTest.java
+++ b/test/java/org/apache/ivy/plugins/resolver/IBiblioResolverTest.java
@@ -17,6 +17,12 @@
  */
 package org.apache.ivy.plugins.resolver;
 
+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.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -51,8 +57,6 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
-
 /**
  *
  */
@@ -87,7 +91,7 @@ public class IBiblioResolverTest extends AbstractDependencyResolverTest {
         _settings.setVariable("ivy.ibiblio.default.artifact.pattern",
             "[module]/jars/[artifact]-[revision].jar");
         resolver.setSettings(_settings);
-        List l = resolver.getArtifactPatterns();
+        List<String> l = resolver.getArtifactPatterns();
         assertNotNull(l);
         assertEquals(1, l.size());
         assertEquals("http://www.ibiblio.org/mymaven/[module]/jars/[artifact]-[revision].jar",
@@ -104,7 +108,7 @@ public class IBiblioResolverTest extends AbstractDependencyResolverTest {
         _settings.load(IBiblioResolverTest.class.getResource("ibiblioresolverconf.xml"));
         IBiblioResolver resolver = (IBiblioResolver) _settings.getResolver("ibiblioA");
         assertNotNull(resolver);
-        List l = resolver.getArtifactPatterns();
+        List<String> l = resolver.getArtifactPatterns();
         assertNotNull(l);
         assertEquals(1, l.size());
         assertEquals("http://www.ibiblio.org/mymaven/[module]/[artifact]-[revision].jar", l.get(0));
@@ -114,8 +118,7 @@ public class IBiblioResolverTest extends AbstractDependencyResolverTest {
         l = resolver.getArtifactPatterns();
         assertNotNull(l);
         assertEquals(1, l.size());
-        assertEquals(
-            "http://www.ibiblio.org/mymaven/[organisation]/jars/[artifact]-[revision].jar",
+        assertEquals("http://www.ibiblio.org/mymaven/[organisation]/jars/[artifact]-[revision].jar",
             l.get(0));
 
         resolver = (IBiblioResolver) _settings.getResolver("ibiblioC");
@@ -203,6 +206,7 @@ public class IBiblioResolverTest extends AbstractDependencyResolverTest {
         assertEquals(DownloadStatus.NO, ar.getDownloadStatus());
     }
 
+    @SuppressWarnings({"rawtypes", "unchecked"})
     @Test
     public void testMaven2Listing() throws Exception {
         IBiblioResolver resolver = new IBiblioResolver();

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/test/java/org/apache/ivy/plugins/resolver/IvyRepResolverTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/resolver/IvyRepResolverTest.java b/test/java/org/apache/ivy/plugins/resolver/IvyRepResolverTest.java
index aba3930..6091f5e 100644
--- a/test/java/org/apache/ivy/plugins/resolver/IvyRepResolverTest.java
+++ b/test/java/org/apache/ivy/plugins/resolver/IvyRepResolverTest.java
@@ -17,6 +17,9 @@
  */
 package org.apache.ivy.plugins.resolver;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
 import java.io.File;
 import java.util.List;
 
@@ -41,10 +44,8 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
 
-import static org.junit.Assert.*;
-
 /**
- * 
+ *
  */
 public class IvyRepResolverTest extends AbstractDependencyResolverTest {
     private IvySettings _settings;
@@ -76,16 +77,15 @@ public class IvyRepResolverTest extends AbstractDependencyResolverTest {
         _settings.setVariable("ivy.ivyrep.default.ivy.root", "http://www.jayasoft.fr/myivyrep/");
         _settings.setVariable("ivy.ivyrep.default.ivy.pattern",
             "[organisation]/[module]/ivy-[revision].[ext]");
-        _settings
-                .setVariable("ivy.ivyrep.default.artifact.root", "http://www.ibiblio.org/mymaven/");
+        _settings.setVariable("ivy.ivyrep.default.artifact.root",
+            "http://www.ibiblio.org/mymaven/");
         _settings.setVariable("ivy.ivyrep.default.artifact.pattern",
             "[module]/jars/[artifact]-[revision].jar");
         resolver.setSettings(_settings);
-        List l = resolver.getIvyPatterns();
+        List<String> l = resolver.getIvyPatterns();
         assertNotNull(l);
         assertEquals(1, l.size());
-        assertEquals(
-            "http://www.jayasoft.fr/myivyrep/[organisation]/[module]/ivy-[revision].[ext]",
+        assertEquals("http://www.jayasoft.fr/myivyrep/[organisation]/[module]/ivy-[revision].[ext]",
             l.get(0));
         l = resolver.getArtifactPatterns();
         assertNotNull(l);

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/test/java/org/apache/ivy/util/CacheCleaner.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/util/CacheCleaner.java b/test/java/org/apache/ivy/util/CacheCleaner.java
index 00e4acc..6c7c916 100644
--- a/test/java/org/apache/ivy/util/CacheCleaner.java
+++ b/test/java/org/apache/ivy/util/CacheCleaner.java
@@ -24,7 +24,10 @@ public class CacheCleaner {
     /**
      * Delete the directory and all it contains. Previously, we used the ant delete task, but it
      * occasionally failed (access denied) on my machine for unknown reason.
-     **/
+     *
+     * @param toDelete
+     *            File
+     */
     public static void deleteDir(File toDelete) {
         FileUtil.forceDelete(toDelete);
     }

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/test/java/org/apache/ivy/util/ConfiguratorTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/util/ConfiguratorTest.java b/test/java/org/apache/ivy/util/ConfiguratorTest.java
index 9a2af55..5329985 100644
--- a/test/java/org/apache/ivy/util/ConfiguratorTest.java
+++ b/test/java/org/apache/ivy/util/ConfiguratorTest.java
@@ -17,16 +17,16 @@
  */
 package org.apache.ivy.util;
 
-import org.junit.Before;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import org.junit.Before;
+import org.junit.Test;
 
 /**
  *
@@ -109,7 +109,7 @@ public class ConfiguratorTest {
         }
     }
 
-    public static abstract class Housing {
+    public abstract static class Housing {
         private final List<Room> _rooms = new ArrayList<>();
 
         private boolean _isEmpty;

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/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 4593953..3efbde6 100644
--- a/test/java/org/apache/ivy/util/IvyPatternHelperTest.java
+++ b/test/java/org/apache/ivy/util/IvyPatternHelperTest.java
@@ -36,7 +36,7 @@ public class IvyPatternHelperTest {
     @Test(expected = Exception.class)
     public void testCyclicSubstitute() {
         String pattern = "${var}";
-        Map variables = new HashMap();
+        Map<String, String> variables = new HashMap<>();
         variables.put("var", "${othervar}");
         variables.put("othervar", "${var}");
 
@@ -45,7 +45,7 @@ public class IvyPatternHelperTest {
 
     @Test
     public void testOptionalSubstitute() {
-        Map tokens = new HashMap();
+        Map<String, String> tokens = new HashMap<>();
         tokens.put("token", "");
         tokens.put("othertoken", "myval");
         assertEquals("test-myval",

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/test/java/org/apache/ivy/util/TestXmlHelper.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/util/TestXmlHelper.java b/test/java/org/apache/ivy/util/TestXmlHelper.java
index e0c191e..cea9e0b 100644
--- a/test/java/org/apache/ivy/util/TestXmlHelper.java
+++ b/test/java/org/apache/ivy/util/TestXmlHelper.java
@@ -17,14 +17,15 @@
 
 package org.apache.ivy.util;
 
-import org.w3c.dom.Document;
+import java.io.File;
 
 import javax.xml.namespace.QName;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.xpath.XPathExpression;
 import javax.xml.xpath.XPathFactory;
-import java.io.File;
+
+import org.w3c.dom.Document;
 
 /**
  * An utility class to help with XML file parsing and XML content handling
@@ -38,7 +39,7 @@ public class TestXmlHelper {
      * @param xmlFile         The XML file to parse
      * @param xPathExpression The XPath expression to evaluate
      * @param returnType      The expected return type of the {@link XPathExpression#evaluate(Object, QName) evaluation}
-     * @return
+     * @return                The result
      * @throws Exception
      */
     public static Object evaluateXPathExpr(final File xmlFile, final XPathExpression xPathExpression, final QName returnType)
@@ -65,7 +66,7 @@ public class TestXmlHelper {
      * @param xmlFile         The XML file to parse
      * @param xpathExpression The XPath expression to evaluate
      * @param returnType      The expected return type of the {@link XPathExpression#evaluate(Object, QName) evaluation}
-     * @return
+     * @return                The result
      * @throws Exception
      */
     public static Object evaluateXPathExpr(final File xmlFile, final String xpathExpression, final QName returnType) throws Exception {

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/69207179/test/java/org/apache/ivy/util/url/ArtifactoryListingTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/util/url/ArtifactoryListingTest.java b/test/java/org/apache/ivy/util/url/ArtifactoryListingTest.java
index 5cee76c..dec8746 100644
--- a/test/java/org/apache/ivy/util/url/ArtifactoryListingTest.java
+++ b/test/java/org/apache/ivy/util/url/ArtifactoryListingTest.java
@@ -17,13 +17,13 @@
  */
 package org.apache.ivy.util.url;
 
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 import java.net.URL;
 import java.util.List;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import org.junit.Test;
 
 public class ArtifactoryListingTest {
     // remote.test
@@ -32,7 +32,7 @@ public class ArtifactoryListingTest {
     public void testWicketListing() throws Exception {
         ApacheURLLister lister = new ApacheURLLister();
 
-        List content = lister.listAll(new URL(
+        List<URL> content = lister.listAll(new URL(
                 "http://repo.jfrog.org/artifactory/libs-releases-local/org/apache/wicket/wicket/"));
         assertNotNull(content);
         assertEquals(5, content.size());


Mime
View raw message