You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by jl...@apache.org on 2014/01/14 09:27:43 UTC

svn commit: r1557968 [18/26] - in /ant/ivy/core/trunk: src/java/org/apache/ivy/ src/java/org/apache/ivy/ant/ src/java/org/apache/ivy/core/ src/java/org/apache/ivy/core/cache/ src/java/org/apache/ivy/core/check/ src/java/org/apache/ivy/core/deliver/ src...

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java?rev=1557968&r1=1557967&r2=1557968&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java Tue Jan 14 08:27:37 2014
@@ -38,9 +38,9 @@ public class IvyInstallTest extends Test
     protected void setUp() throws Exception {
         createCache();
         cleanInstall();
-        
+
         project = AntTestHelper.newProject();
-        
+
         install = new IvyInstall();
         install.setProject(project);
         System.setProperty("ivy.cache.dir", cache.getAbsolutePath());
@@ -66,7 +66,8 @@ public class IvyInstallTest extends Test
     }
 
     public void testInstallDummyDefault() {
-        project.setProperty("ivy.settings.file", "test/repositories/ivysettings-dummydefaultresolver.xml");
+        project.setProperty("ivy.settings.file",
+            "test/repositories/ivysettings-dummydefaultresolver.xml");
         install.setOrganisation("org1");
         install.setModule("mod1.4");
         install.setRevision("1.0.1");
@@ -86,7 +87,8 @@ public class IvyInstallTest extends Test
     }
 
     public void testInstallWithAnyType() {
-        project.setProperty("ivy.settings.file", "test/repositories/ivysettings-dummydefaultresolver.xml");
+        project.setProperty("ivy.settings.file",
+            "test/repositories/ivysettings-dummydefaultresolver.xml");
         install.setOrganisation("org8");
         install.setModule("mod8.1");
         install.setRevision("1.1");
@@ -96,11 +98,12 @@ public class IvyInstallTest extends Test
 
         install.execute();
 
-        assertTrue(new File("build/test/install/org8/mod8.1/a-1.1.txt").exists());        
+        assertTrue(new File("build/test/install/org8/mod8.1/a-1.1.txt").exists());
     }
-    
+
     public void testInstallWithMultipleType() {
-        project.setProperty("ivy.settings.file", "test/repositories/ivysettings-dummydefaultresolver.xml");
+        project.setProperty("ivy.settings.file",
+            "test/repositories/ivysettings-dummydefaultresolver.xml");
         install.setOrganisation("org8");
         install.setModule("mod8.1");
         install.setRevision("1.1");
@@ -110,7 +113,7 @@ public class IvyInstallTest extends Test
 
         install.execute();
 
-        assertTrue(new File("build/test/install/org8/mod8.1/a-1.1.txt").exists());        
+        assertTrue(new File("build/test/install/org8/mod8.1/a-1.1.txt").exists());
     }
 
     /**
@@ -126,12 +129,12 @@ public class IvyInstallTest extends Test
         install.setTransitive(true);
 
         install.execute();
-        
+
         assertTrue(new File("build/test/install/org1/mod1/jars/mod1-1.0.jar").exists());
         assertTrue(new File("build/test/install/org1/mod2/jars/mod2-1.0.jar").exists());
         assertTrue(new File("build/test/install/org1/mod3/jars/mod3-1.0.jar").exists());
     }
-    
+
     /**
      * Test retrieving artifacts under only the master and runtime configuration.
      */
@@ -151,7 +154,7 @@ public class IvyInstallTest extends Test
         assertTrue(new File("build/test/install/org1/mod2/jars/mod2-1.0.jar").exists());
         assertFalse(new File("build/test/install/org1/mod3/jars/mod3-1.0.jar").exists());
     }
-    
+
     public void testInstallWithClassifiers() throws Exception {
         // IVY-1324
         project.setProperty("ivy.settings.url", new File("test/repositories/m2/ivysettings.xml")
@@ -164,15 +167,19 @@ public class IvyInstallTest extends Test
         install.setTo("IVY-1324");
 
         install.execute();
-        
-        assertTrue(new File("build/test/install/org.apache/test-sources/test-sources-1.0-javadoc.jar").exists());        
-        assertTrue(new File("build/test/install/org.apache/test-sources/test-sources-1.0-sources.jar").exists());        
-        assertTrue(new File("build/test/install/org.apache/test-sources/test-sources-1.0.jar").exists());        
-        assertTrue(new File("build/test/install/org.apache/test-sources/ivy-1.0.xml").exists());        
+
+        assertTrue(new File(
+                "build/test/install/org.apache/test-sources/test-sources-1.0-javadoc.jar").exists());
+        assertTrue(new File(
+                "build/test/install/org.apache/test-sources/test-sources-1.0-sources.jar").exists());
+        assertTrue(new File("build/test/install/org.apache/test-sources/test-sources-1.0.jar")
+                .exists());
+        assertTrue(new File("build/test/install/org.apache/test-sources/ivy-1.0.xml").exists());
     }
 
     public void testInstallWithUnusedType() {
-        project.setProperty("ivy.settings.file", "test/repositories/ivysettings-dummydefaultresolver.xml");
+        project.setProperty("ivy.settings.file",
+            "test/repositories/ivysettings-dummydefaultresolver.xml");
         install.setOrganisation("org8");
         install.setModule("mod8.1");
         install.setRevision("1.1");
@@ -182,7 +189,7 @@ public class IvyInstallTest extends Test
 
         install.execute();
 
-        assertFalse(new File("build/test/install/org8/mod8.1/a-1.1.txt").exists());        
+        assertFalse(new File("build/test/install/org8/mod8.1/a-1.1.txt").exists());
     }
 
     public void testInstallWithOriginalMetadata() {
@@ -193,27 +200,27 @@ public class IvyInstallTest extends Test
         install.setFrom("test");
         install.setTo("install");
         install.setHaltonfailure(false);
-        
+
         try {
             install.execute();
         } catch (BuildException be) {
             fail("unknown dependency, failure unexpected (haltonfailure=false). Failure: " + be);
         }
-        
+
         assertFalse(new File("build/test/install/org.apache/test/test-1.0.pom").exists());
-        
+
         install.setInstallOriginalMetadata(true);
-        
+
         try {
             install.setOverwrite(true);
             install.execute();
         } catch (BuildException be) {
             fail("unknown dependency, failure unexpected (haltonfailure=false). Failure: " + be);
         }
-        
+
         assertTrue(new File("build/test/install/org.apache/test/test-1.0.pom").exists());
     }
-    
+
     public void testIVY843() {
         project.setProperty("ivy.settings.file", "test/repositories/ivysettings-IVY843.xml");
         install.setOrganisation("org1");
@@ -223,9 +230,9 @@ public class IvyInstallTest extends Test
         install.setTo("install");
 
         install.execute();
-        
+
         cleanCache();
-        
+
         install.setFrom("install");
         install.setTo("install2");
         install.execute();

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyPostResolveTaskTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyPostResolveTaskTest.java?rev=1557968&r1=1557967&r2=1557968&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyPostResolveTaskTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyPostResolveTaskTest.java Tue Jan 14 08:27:37 2014
@@ -140,10 +140,8 @@ public class IvyPostResolveTaskTest exte
         resolve.execute();
 
         ResolveReport reportBefore = (ResolveReport) project.getReference("ivy.resolved.report");
-        assertTrue(getArchiveFileInCache("org1", "mod1.1", "2.0", "mod1.1", "jar", "jar")
-                .exists());
-        assertFalse(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar")
-                .exists());
+        assertTrue(getArchiveFileInCache("org1", "mod1.1", "2.0", "mod1.1", "jar", "jar").exists());
+        assertFalse(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar").exists());
 
         task.setConf("*");
         task.execute();
@@ -163,10 +161,8 @@ public class IvyPostResolveTaskTest exte
         resolve.execute();
 
         ResolveReport reportBefore = (ResolveReport) project.getReference("ivy.resolved.report");
-        assertTrue(getArchiveFileInCache("org1", "mod1.1", "2.0", "mod1.1", "jar", "jar")
-                .exists());
-        assertFalse(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar")
-                .exists());
+        assertTrue(getArchiveFileInCache("org1", "mod1.1", "2.0", "mod1.1", "jar", "jar").exists());
+        assertFalse(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar").exists());
 
         task.setConf("*"); // will trigger a resolve
         task.setKeep(false); // don't keep the resolve results
@@ -356,10 +352,8 @@ public class IvyPostResolveTaskTest exte
 
         ResolveReport report1 = (ResolveReport) project
                 .getReference("ivy.resolved.report.testResolveId");
-        assertTrue(getArchiveFileInCache("org1", "mod1.1", "2.0", "mod1.1", "jar", "jar")
-                .exists());
-        assertFalse(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar")
-                .exists());
+        assertTrue(getArchiveFileInCache("org1", "mod1.1", "2.0", "mod1.1", "jar", "jar").exists());
+        assertFalse(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar").exists());
 
         // perform another resolve
         resolve = new IvyResolve();
@@ -387,7 +381,7 @@ public class IvyPostResolveTaskTest exte
 
     private File getArchiveFileInCache(String organisation, String module, String revision,
             String artifact, String type, String ext) {
-        return TestHelper.getArchiveFileInCache(task.getIvyInstance(), organisation,
-            module, revision, artifact, type, ext);
+        return TestHelper.getArchiveFileInCache(task.getIvyInstance(), organisation, module,
+            revision, artifact, type, ext);
     }
 }

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyPublishTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyPublishTest.java?rev=1557968&r1=1557967&r2=1557968&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyPublishTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyPublishTest.java Tue Jan 14 08:27:37 2014
@@ -88,8 +88,8 @@ public class IvyPublishTest extends Test
     }
 
     public void testMergeParent() throws IOException, ParseException {
-        //publish the parent descriptor first, so that it can be found while
-        //we are reading the child descriptor.
+        // publish the parent descriptor first, so that it can be found while
+        // we are reading the child descriptor.
         project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-multiconf.xml");
         IvyResolve res = new IvyResolve();
         res.setProject(project);
@@ -102,9 +102,10 @@ public class IvyPublishTest extends Test
         File art = new File("build/test/publish/resolve-simple-1.0.jar");
         FileUtil.copy(new File("test/repositories/1/org1/mod1.1/jars/mod1.1-1.0.jar"), art, null);
         pubParent.execute();
-        
-        //update=true implies merge=true
-        project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-extends-multiconf.xml");
+
+        // update=true implies merge=true
+        project.setProperty("ivy.dep.file",
+            "test/java/org/apache/ivy/ant/ivy-extends-multiconf.xml");
         publish.setResolver("1");
         publish.setUpdate(true);
         publish.setOrganisation("apache");
@@ -126,33 +127,33 @@ public class IvyPublishTest extends Test
 
         BufferedReader merged = new BufferedReader(new FileReader(published));
         BufferedReader expected = new BufferedReader(new InputStreamReader(getClass()
-            .getResourceAsStream("ivy-extends-merged.xml")));
-        for (String mergeLine = merged.readLine(),
-                    expectedLine = expected.readLine(); 
-            mergeLine != null && expectedLine != null; 
-            mergeLine = merged.readLine(),
-            expectedLine = expected.readLine()) {
+                .getResourceAsStream("ivy-extends-merged.xml")));
+        for (String mergeLine = merged.readLine(), expectedLine = expected.readLine(); mergeLine != null
+                && expectedLine != null; mergeLine = merged.readLine(), expectedLine = expected
+                .readLine()) {
 
-            //strip timestamps for the comparison
+            // strip timestamps for the comparison
             if (mergeLine.indexOf("<info") >= 0) {
                 mergeLine = mergeLine.replaceFirst("\\s?publication=\"\\d+\"", "");
             }
-            //discard whitespace-only lines
+            // discard whitespace-only lines
             if (!(mergeLine.trim().equals("") && expectedLine.trim().equals(""))) {
-                assertEquals("published descriptor matches at line[" + lineNo + "]", expectedLine, mergeLine);
+                assertEquals("published descriptor matches at line[" + lineNo + "]", expectedLine,
+                    mergeLine);
             }
 
             ++lineNo;
         }
     }
-    
+
     public void testMergeParentWithoutPublishingParent() throws IOException, ParseException {
-        //here we directly publish a module extending ivy-multiconf.xml, 
-        //the module parent is not published not yet in cache
-        //See : IVY-1248
-       
-        //update=true implies merge=true
-        //project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-extends-multiconf.xml");
+        // here we directly publish a module extending ivy-multiconf.xml,
+        // the module parent is not published not yet in cache
+        // See : IVY-1248
+
+        // update=true implies merge=true
+        // project.setProperty("ivy.dep.file",
+        // "test/java/org/apache/ivy/ant/ivy-extends-multiconf.xml");
         publish.setResolver("1");
         publish.setUpdate(true);
         publish.setOrganisation("apache");
@@ -174,37 +175,37 @@ public class IvyPublishTest extends Test
 
         BufferedReader merged = new BufferedReader(new FileReader(published));
         BufferedReader expected = new BufferedReader(new InputStreamReader(getClass()
-            .getResourceAsStream("ivy-extends-merged.xml")));
-        for (String mergeLine = merged.readLine(),
-                    expectedLine = expected.readLine(); 
-            mergeLine != null && expectedLine != null; 
-            mergeLine = merged.readLine(),
-            expectedLine = expected.readLine()) {
+                .getResourceAsStream("ivy-extends-merged.xml")));
+        for (String mergeLine = merged.readLine(), expectedLine = expected.readLine(); mergeLine != null
+                && expectedLine != null; mergeLine = merged.readLine(), expectedLine = expected
+                .readLine()) {
 
-            //strip timestamps for the comparison
+            // strip timestamps for the comparison
             if (mergeLine.indexOf("<info") >= 0) {
                 mergeLine = mergeLine.replaceFirst("\\s?publication=\"\\d+\"", "");
             }
-            //discard whitespace-only lines
+            // discard whitespace-only lines
             if (!(mergeLine.trim().equals("") && expectedLine.trim().equals(""))) {
-                assertEquals("published descriptor matches at line[" + lineNo + "]", expectedLine, mergeLine);
+                assertEquals("published descriptor matches at line[" + lineNo + "]", expectedLine,
+                    mergeLine);
             }
 
             ++lineNo;
         }
     }
-    
-    public void testMergeParentWithoutPublishingParentForceDeliver() throws IOException, ParseException {
-        //here we directly publish a module extending ivy-multiconf.xml, 
-        //the module parent is not published not yet in cache
-        //See : IVY-1248
-        
+
+    public void testMergeParentWithoutPublishingParentForceDeliver() throws IOException,
+            ParseException {
+        // here we directly publish a module extending ivy-multiconf.xml,
+        // the module parent is not published not yet in cache
+        // See : IVY-1248
+
         IvyResolve resolve = new IvyResolve();
         resolve.setProject(project);
         resolve.setFile(new File("test/java/org/apache/ivy/ant/ivy-extends-multiconf.xml"));
         resolve.execute();
-        
-        //update=true implies merge=true
+
+        // update=true implies merge=true
         publish.setResolver("1");
         publish.setUpdate(true);
         publish.setOrganisation("apache");
@@ -228,37 +229,36 @@ public class IvyPublishTest extends Test
 
         BufferedReader merged = new BufferedReader(new FileReader(published));
         BufferedReader expected = new BufferedReader(new InputStreamReader(getClass()
-            .getResourceAsStream("ivy-extends-merged.xml")));
-        for (String mergeLine = merged.readLine(),
-                    expectedLine = expected.readLine(); 
-            mergeLine != null && expectedLine != null; 
-            mergeLine = merged.readLine(),
-            expectedLine = expected.readLine()) {
+                .getResourceAsStream("ivy-extends-merged.xml")));
+        for (String mergeLine = merged.readLine(), expectedLine = expected.readLine(); mergeLine != null
+                && expectedLine != null; mergeLine = merged.readLine(), expectedLine = expected
+                .readLine()) {
 
-            //strip timestamps for the comparison
+            // strip timestamps for the comparison
             if (mergeLine.indexOf("<info") >= 0) {
                 mergeLine = mergeLine.replaceFirst("\\s?publication=\"\\d+\"", "");
             }
-            //discard whitespace-only lines
+            // discard whitespace-only lines
             if (!(mergeLine.trim().equals("") && expectedLine.trim().equals(""))) {
-                assertEquals("published descriptor matches at line[" + lineNo + "]", expectedLine, mergeLine);
+                assertEquals("published descriptor matches at line[" + lineNo + "]", expectedLine,
+                    mergeLine);
             }
 
             ++lineNo;
         }
     }
-    
+
     public void testMergeParentWithoutLocationAttribute() throws IOException, ParseException {
-        //See : IVY-XXX
-        
-        
+        // See : IVY-XXX
+
         IvyResolve resolve = new IvyResolve();
         resolve.setProject(project);
         resolve.setFile(new File("test/java/org/apache/ivy/ant/extends/child1/ivy-child1.xml"));
         resolve.execute();
-       
-        //update=true implies merge=true
-        //project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-extends-multiconf.xml");
+
+        // update=true implies merge=true
+        // project.setProperty("ivy.dep.file",
+        // "test/java/org/apache/ivy/ant/ivy-extends-multiconf.xml");
         publish.setResolver("1");
         publish.setUpdate(true);
         publish.setPubrevision("1.2");
@@ -277,30 +277,28 @@ public class IvyPublishTest extends Test
 
         BufferedReader merged = new BufferedReader(new FileReader(published));
         BufferedReader expected = new BufferedReader(new InputStreamReader(getClass()
-            .getResourceAsStream("extends/child1/ivy-child1-merged.xml")));
-        for (String mergeLine = merged.readLine(),
-                    expectedLine = expected.readLine(); 
-            mergeLine != null && expectedLine != null; 
-            mergeLine = merged.readLine(),
-            expectedLine = expected.readLine()) {
+                .getResourceAsStream("extends/child1/ivy-child1-merged.xml")));
+        for (String mergeLine = merged.readLine(), expectedLine = expected.readLine(); mergeLine != null
+                && expectedLine != null; mergeLine = merged.readLine(), expectedLine = expected
+                .readLine()) {
 
-            //strip timestamps for the comparison
+            // strip timestamps for the comparison
             if (mergeLine.indexOf("<info") >= 0) {
                 mergeLine = mergeLine.replaceFirst("\\s?publication=\"\\d+\"", "");
             }
-            //discard whitespace-only lines
+            // discard whitespace-only lines
             if (!(mergeLine.trim().equals("") && expectedLine.trim().equals(""))) {
-                assertEquals("published descriptor matches at line[" + lineNo + "]", expectedLine, mergeLine);
+                assertEquals("published descriptor matches at line[" + lineNo + "]", expectedLine,
+                    mergeLine);
             }
 
             ++lineNo;
         }
     }
 
-    
     public void testMinimalMerge() throws IOException, ParseException {
-        //publish the parent descriptor first, so that it can be found while
-        //we are reading the child descriptor.
+        // publish the parent descriptor first, so that it can be found while
+        // we are reading the child descriptor.
         project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-multiconf.xml");
         IvyResolve res = new IvyResolve();
         res.setProject(project);
@@ -314,7 +312,7 @@ public class IvyPublishTest extends Test
         FileUtil.copy(new File("test/repositories/1/org1/mod1.1/jars/mod1.1-1.0.jar"), art, null);
         pubParent.execute();
 
-        //update=true implies merge=true
+        // update=true implies merge=true
         project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-extends-minimal.xml");
         publish.setResolver("1");
         publish.setUpdate(true);
@@ -337,20 +335,19 @@ public class IvyPublishTest extends Test
 
         BufferedReader merged = new BufferedReader(new FileReader(published));
         BufferedReader expected = new BufferedReader(new InputStreamReader(getClass()
-            .getResourceAsStream("ivy-extends-minimal-merged.xml")));
-        for (String mergeLine = merged.readLine(),
-                    expectedLine = expected.readLine();
-            mergeLine != null && expectedLine != null;
-            mergeLine = merged.readLine(),
-            expectedLine = expected.readLine()) {
+                .getResourceAsStream("ivy-extends-minimal-merged.xml")));
+        for (String mergeLine = merged.readLine(), expectedLine = expected.readLine(); mergeLine != null
+                && expectedLine != null; mergeLine = merged.readLine(), expectedLine = expected
+                .readLine()) {
 
-            //strip timestamps for the comparison
+            // strip timestamps for the comparison
             if (mergeLine.indexOf("<info") >= 0) {
                 mergeLine = mergeLine.replaceFirst("\\s?publication=\"\\d+\"", "");
             }
-            //discard whitespace-only lines
+            // discard whitespace-only lines
             if (!(mergeLine.trim().equals("") && expectedLine.trim().equals(""))) {
-                assertEquals("published descriptor matches at line[" + lineNo + "]", expectedLine, mergeLine);
+                assertEquals("published descriptor matches at line[" + lineNo + "]", expectedLine,
+                    mergeLine);
             }
 
             ++lineNo;
@@ -358,8 +355,8 @@ public class IvyPublishTest extends Test
     }
 
     public void testMergeExtraAttributes() throws IOException, ParseException {
-        //publish the parent descriptor first, so that it can be found while
-        //we are reading the child descriptor.
+        // publish the parent descriptor first, so that it can be found while
+        // we are reading the child descriptor.
         project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-multiconf.xml");
         IvyResolve res = new IvyResolve();
         res.setProject(project);
@@ -373,8 +370,9 @@ public class IvyPublishTest extends Test
         FileUtil.copy(new File("test/repositories/1/org1/mod1.1/jars/mod1.1-1.0.jar"), art, null);
         pubParent.execute();
 
-        //update=true implies merge=true
-        project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-extends-extra-attributes.xml");
+        // update=true implies merge=true
+        project.setProperty("ivy.dep.file",
+            "test/java/org/apache/ivy/ant/ivy-extends-extra-attributes.xml");
         res = new IvyResolve();
         res.setProject(project);
         res.execute();
@@ -401,20 +399,19 @@ public class IvyPublishTest extends Test
 
         BufferedReader merged = new BufferedReader(new FileReader(published));
         BufferedReader expected = new BufferedReader(new InputStreamReader(getClass()
-            .getResourceAsStream("ivy-extends-extra-attributes-merged.xml")));
-        for (String mergeLine = merged.readLine(),
-                    expectedLine = expected.readLine();
-            mergeLine != null && expectedLine != null;
-            mergeLine = merged.readLine(),
-            expectedLine = expected.readLine()) {
+                .getResourceAsStream("ivy-extends-extra-attributes-merged.xml")));
+        for (String mergeLine = merged.readLine(), expectedLine = expected.readLine(); mergeLine != null
+                && expectedLine != null; mergeLine = merged.readLine(), expectedLine = expected
+                .readLine()) {
 
-            //strip timestamps for the comparison
+            // strip timestamps for the comparison
             if (mergeLine.indexOf("<info") >= 0) {
                 mergeLine = mergeLine.replaceFirst("\\s?publication=\"\\d+\"", "");
             }
-            //discard whitespace-only lines
+            // discard whitespace-only lines
             if (!(mergeLine.trim().equals("") && expectedLine.trim().equals(""))) {
-                assertEquals("published descriptor matches at line[" + lineNo + "]", expectedLine, mergeLine);
+                assertEquals("published descriptor matches at line[" + lineNo + "]", expectedLine,
+                    mergeLine);
             }
 
             ++lineNo;
@@ -422,9 +419,10 @@ public class IvyPublishTest extends Test
     }
 
     public void testMergeExtraAttributesFromParent() throws IOException, ParseException {
-        //publish the parent descriptor first, so that it can be found while
-        //we are reading the child descriptor.
-        project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-multiconf-extra-attributes.xml");
+        // publish the parent descriptor first, so that it can be found while
+        // we are reading the child descriptor.
+        project.setProperty("ivy.dep.file",
+            "test/java/org/apache/ivy/ant/ivy-multiconf-extra-attributes.xml");
         IvyResolve res = new IvyResolve();
         res.setProject(project);
         res.execute();
@@ -437,8 +435,9 @@ public class IvyPublishTest extends Test
         FileUtil.copy(new File("test/repositories/1/org1/mod1.1/jars/mod1.1-1.0.jar"), art, null);
         pubParent.execute();
 
-        //update=true implies merge=true
-        project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-extends-extra-attributes-parent.xml");
+        // update=true implies merge=true
+        project.setProperty("ivy.dep.file",
+            "test/java/org/apache/ivy/ant/ivy-extends-extra-attributes-parent.xml");
         res = new IvyResolve();
         res.setProject(project);
         res.execute();
@@ -465,20 +464,19 @@ public class IvyPublishTest extends Test
 
         BufferedReader merged = new BufferedReader(new FileReader(published));
         BufferedReader expected = new BufferedReader(new InputStreamReader(getClass()
-            .getResourceAsStream("ivy-extends-extra-attributes-merged.xml")));
-        for (String mergeLine = merged.readLine(),
-                    expectedLine = expected.readLine();
-            mergeLine != null && expectedLine != null;
-            mergeLine = merged.readLine(),
-            expectedLine = expected.readLine()) {
+                .getResourceAsStream("ivy-extends-extra-attributes-merged.xml")));
+        for (String mergeLine = merged.readLine(), expectedLine = expected.readLine(); mergeLine != null
+                && expectedLine != null; mergeLine = merged.readLine(), expectedLine = expected
+                .readLine()) {
 
-            //strip timestamps for the comparison
+            // strip timestamps for the comparison
             if (mergeLine.indexOf("<info") >= 0) {
                 mergeLine = mergeLine.replaceFirst("\\s?publication=\"\\d+\"", "");
             }
-            //discard whitespace-only lines
+            // discard whitespace-only lines
             if (!(mergeLine.trim().equals("") && expectedLine.trim().equals(""))) {
-                assertEquals("published descriptor matches at line[" + lineNo + "]", expectedLine, mergeLine);
+                assertEquals("published descriptor matches at line[" + lineNo + "]", expectedLine,
+                    mergeLine);
             }
 
             ++lineNo;
@@ -530,10 +528,13 @@ public class IvyPublishTest extends Test
             assertTrue(ex.getMessage().indexOf("resolve-simple.jar") != -1);
             // should have do the ivy delivering
             assertTrue(new File("build/test/publish/ivy-1.2.xml").exists());
-            
+
             // should not have published the files with "1" resolver
-            assertFalse(new File("test/repositories/1/apache/resolve-simple/ivys/ivy-1.2.xml").exists());
-            assertFalse(new File("test/repositories/1/apache/resolve-simple/jars/resolve-simple-1.2.jar").exists());
+            assertFalse(new File("test/repositories/1/apache/resolve-simple/ivys/ivy-1.2.xml")
+                    .exists());
+            assertFalse(new File(
+                    "test/repositories/1/apache/resolve-simple/jars/resolve-simple-1.2.jar")
+                    .exists());
         }
     }
 
@@ -544,7 +545,7 @@ public class IvyPublishTest extends Test
         res.execute();
 
         // in this test case one artifact is available, and the other one is missing
-        // since we use a transactional resolver, no file should be published at all 
+        // since we use a transactional resolver, no file should be published at all
         File art = new File("build/test/publish/multi1-1.2.jar");
         FileUtil.copy(new File("test/repositories/1/org1/mod1.1/jars/mod1.1-1.0.jar"), art, null);
         publish.setPubrevision("1.2");
@@ -572,7 +573,7 @@ public class IvyPublishTest extends Test
         res.execute();
 
         // in this test case one artifact is available, and the other one is missing
-        // this should be detected early and no file should be published at all 
+        // this should be detected early and no file should be published at all
         File art = new File("build/test/publish/multi1-1.2.jar");
         FileUtil.copy(new File("test/repositories/1/org1/mod1.1/jars/mod1.1-1.0.jar"), art, null);
         publish.setPubrevision("1.2");
@@ -669,10 +670,11 @@ public class IvyPublishTest extends Test
 
         // should have do the ivy delivering
         assertTrue(new File("build/test/publish/ivy-1.2.xml").exists());
-        
+
         // should have published the files with "1" resolver
         assertTrue(new File("test/repositories/1/apache/publish-public/ivys/ivy-1.2.xml").exists());
-        assertTrue(new File("test/repositories/1/apache/publish-public/jars/publish-public-1.2.jar").exists());
+        assertTrue(new File("test/repositories/1/apache/publish-public/jars/publish-public-1.2.jar")
+                .exists());
     }
 
     public void testCustom() throws Exception {
@@ -838,7 +840,7 @@ public class IvyPublishTest extends Test
             publish.execute();
             fail("shouldn't publish ivy file with bad revision");
         } catch (BuildException ex) {
-            //normal
+            // normal
         }
     }
 

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyReportTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyReportTest.java?rev=1557968&r1=1557967&r2=1557968&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyReportTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyReportTest.java Tue Jan 14 08:27:37 2014
@@ -59,10 +59,10 @@ public class IvyReportTest extends TestC
         del.setDir(cache);
         del.execute();
     }
-    
+
     public void testSimple() throws Exception {
         Locale oldLocale = Locale.getDefault();
-        
+
         try {
             // set the locale to UK as workaround for SUN bug 6240963
             Locale.setDefault(Locale.UK);
@@ -71,10 +71,10 @@ public class IvyReportTest extends TestC
             res.setProject(project);
             res.setFile(new File("test/java/org/apache/ivy/ant/ivy-simple.xml"));
             res.execute();
-    
+
             report.setTodir(new File(cache, "report"));
             report.execute();
-            
+
             assertTrue(new File(cache, "report/apache-resolve-simple-default.html").exists());
             assertTrue(new File(cache, "report/ivy-report.css").exists()); // IVY-826
             assertTrue(new File(cache, "report/apache-resolve-simple-default.graphml").exists());
@@ -82,10 +82,10 @@ public class IvyReportTest extends TestC
             Locale.setDefault(oldLocale);
         }
     }
-    
+
     public void testWithLatest() throws Exception {
         Locale oldLocale = Locale.getDefault();
-        
+
         try {
             // set the locale to UK as workaround for SUN bug 6240963
             Locale.setDefault(Locale.UK);
@@ -94,11 +94,11 @@ public class IvyReportTest extends TestC
             res.setProject(project);
             res.setFile(new File("test/repositories/1/org6/mod6.2/ivys/ivy-0.7.xml"));
             res.execute();
-    
+
             report.setTodir(new File(cache, "report"));
             report.setXml(true);
             report.execute();
-            
+
             File xmlReport = new File(cache, "report/org6-mod6.2-default.xml");
             assertTrue(xmlReport.exists());
             // check that revision 2.2 of mod1.2 is only present once
@@ -111,10 +111,10 @@ public class IvyReportTest extends TestC
             Locale.setDefault(oldLocale);
         }
     }
-    
+
     public void testCopyCssIfTodirNotSet() {
         Locale oldLocale = Locale.getDefault();
-        
+
         try {
             // set the locale to UK as workaround for SUN bug 6240963
             Locale.setDefault(Locale.UK);
@@ -123,10 +123,10 @@ public class IvyReportTest extends TestC
             res.setProject(project);
             res.setFile(new File("test/java/org/apache/ivy/ant/ivy-simple.xml"));
             res.execute();
-    
+
             report.setGraph(false);
             report.execute();
-            
+
             assertTrue(new File("apache-resolve-simple-default.html").exists());
             assertTrue(new File("ivy-report.css").exists()); // IVY-826
         } finally {
@@ -138,7 +138,7 @@ public class IvyReportTest extends TestC
 
     public void testNoRevisionInOutputPattern() throws Exception {
         Locale oldLocale = Locale.getDefault();
-        
+
         try {
             // set the locale to UK as workaround for SUN bug 6240963
             Locale.setDefault(Locale.UK);
@@ -147,12 +147,12 @@ public class IvyReportTest extends TestC
             res.setProject(project);
             res.setFile(new File("test/java/org/apache/ivy/ant/ivy-simple.xml"));
             res.execute();
-    
+
             report.setTodir(new File(cache, "report"));
             report.setOutputpattern("[organisation]-[module]-[revision].[ext]");
             report.setConf("default");
             report.execute();
-            
+
             assertTrue(new File(cache, "report/apache-resolve-simple-1.0.html").exists());
             assertTrue(new File(cache, "report/apache-resolve-simple-1.0.graphml").exists());
         } finally {
@@ -162,7 +162,7 @@ public class IvyReportTest extends TestC
 
     public void testMultipleConfigurations() throws Exception {
         Locale oldLocale = Locale.getDefault();
-        
+
         try {
             // set the locale to UK as workaround for SUN bug 6240963
             Locale.setDefault(Locale.UK);
@@ -171,10 +171,10 @@ public class IvyReportTest extends TestC
             res.setProject(project);
             res.setFile(new File("test/java/org/apache/ivy/ant/ivy-multiconf.xml"));
             res.execute();
-    
+
             report.setTodir(new File(cache, "report"));
             report.execute();
-            
+
             assertTrue(new File(cache, "report/apache-resolve-simple-default.html").exists());
             assertTrue(new File(cache, "report/apache-resolve-simple-default.graphml").exists());
             assertTrue(new File(cache, "report/apache-resolve-simple-compile.html").exists());
@@ -186,7 +186,7 @@ public class IvyReportTest extends TestC
 
     public void testRegularCircular() throws Exception {
         Locale oldLocale = Locale.getDefault();
-        
+
         try {
             // set the locale to UK as workaround for SUN bug 6240963
             Locale.setDefault(Locale.UK);
@@ -195,12 +195,12 @@ public class IvyReportTest extends TestC
             IvyResolve res = new IvyResolve();
             res.setProject(project);
             res.execute();
-    
+
             report.setTodir(new File(cache, "report"));
             report.setXml(true);
-    
+
             report.execute();
-    
+
             assertTrue(new File(cache, "report/org11-mod11.1-compile.xml").exists());
             assertTrue(new File(cache, "report/org11-mod11.1-compile.html").exists());
         } finally {

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyRepositoryReportTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyRepositoryReportTest.java?rev=1557968&r1=1557967&r2=1557968&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyRepositoryReportTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyRepositoryReportTest.java Tue Jan 14 08:27:37 2014
@@ -67,7 +67,7 @@ public class IvyRepositoryReportTest ext
         File reportFile = new File(cache, "testsimple.xml");
         assertTrue(reportFile.exists());
         String g = FileUtil.readEntirely(new BufferedReader(new FileReader(reportFile)));
-        
+
         // check presence of the modules
         assertTrue(g.indexOf("<module organisation=\"org1\" name=\"mod1.1\"") != -1);
         assertTrue(g.indexOf("<module organisation=\"org1\" name=\"mod1.2\"") != -1);
@@ -76,9 +76,10 @@ public class IvyRepositoryReportTest ext
         assertTrue(g.indexOf("<module organisation=\"org1\" name=\"mod1.5\"") != -1);
         assertTrue(g.indexOf("<module organisation=\"org1\" name=\"mod1.6\"") != -1);
     }
-    
+
     public void testBranchBeforeModule() throws Exception {
-        report.getProject().setProperty("ivy.settings.file", "test/repositories/IVY-716/ivysettings.xml");
+        report.getProject().setProperty("ivy.settings.file",
+            "test/repositories/IVY-716/ivysettings.xml");
         report.setOutputname("testbranch");
         report.setTodir(cache);
         report.execute();
@@ -86,17 +87,18 @@ public class IvyRepositoryReportTest ext
         File reportFile = new File(cache, "testbranch.xml");
         assertTrue(reportFile.exists());
         String g = FileUtil.readEntirely(new BufferedReader(new FileReader(reportFile)));
-        
+
         // check presence of the modules
         assertTrue(g.indexOf("<module organisation=\"org1\" name=\"mod1.1\"") != -1);
-        
+
         // check presence of the branches
         assertTrue(g.indexOf("<revision name=\"1.0\" branch=\"branch1\"") != -1);
         assertTrue(g.indexOf("<revision name=\"1.0\" branch=\"branch2\"") != -1);
     }
-    
+
     public void testPatternWithoutOrganisation() throws Exception {
-        report.getProject().setProperty("ivy.settings.file", "test/repositories/IVY-729/ivysettings.xml");
+        report.getProject().setProperty("ivy.settings.file",
+            "test/repositories/IVY-729/ivysettings.xml");
         report.setOutputname("test-no-org");
         report.setTodir(cache);
         report.execute();
@@ -104,7 +106,7 @@ public class IvyRepositoryReportTest ext
         File reportFile = new File(cache, "test-no-org.xml");
         assertTrue(reportFile.exists());
         String g = FileUtil.readEntirely(new BufferedReader(new FileReader(reportFile)));
-        
+
         // check presence of the modules
         assertTrue(g.indexOf("<module organisation=\"null\" name=\"a\"") != -1);
         assertTrue(g.indexOf("<module organisation=\"null\" name=\"b\"") != -1);

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResolveTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResolveTest.java?rev=1557968&r1=1557967&r2=1557968&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResolveTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResolveTest.java Tue Jan 14 08:27:37 2014
@@ -36,6 +36,7 @@ public class IvyResolveTest extends Test
     private File cache;
 
     private Project project;
+
     private IvyResolve resolve;
 
     protected void setUp() throws Exception {
@@ -63,20 +64,20 @@ public class IvyResolveTest extends Test
         del.setDir(cache);
         del.execute();
     }
-    
+
     public void testIVY1455() throws Exception {
         project.setProperty("ivy.settings.file", "test/repositories/IVY-1455/ivysettings.xml");
         resolve.setFile(new File("test/repositories/IVY-1455/ivy.xml"));
         resolve.execute();
     }
-    
+
     /* disabled: Ivy is not thread-safe, and this usage is not supported at this time */
     public void disabledIVY1454() throws Exception {
         // run init in parent thread, then resolve in children
         project.setProperty("ivy.settings.file", "test/repositories/ivysettings-with-nio.xml");
         project.setProperty("ivy.log.locking", "true");
         resolve.setFile(new File("test/java/org/apache/ivy/ant/ivy-simple.xml"));
-        
+
         Parallel parallel = new Parallel();
         parallel.setThreadCount(4);
         parallel.addTask(resolve);
@@ -85,10 +86,11 @@ public class IvyResolveTest extends Test
         parallel.addTask(resolve);
         parallel.execute();
     }
-    
+
     public void testIVY779() throws Exception {
         Project project = new Project();
-        project.setProperty("ivy.local.default.root", new File("test/repositories/norev").getAbsolutePath());
+        project.setProperty("ivy.local.default.root",
+            new File("test/repositories/norev").getAbsolutePath());
         project.setProperty("ivy.local.default.ivy.pattern", "[module]/[artifact].[ext]");
         project.setProperty("ivy.local.default.artifact.pattern", "[module]/[artifact].[ext]");
 
@@ -97,7 +99,7 @@ public class IvyResolveTest extends Test
         resolve.setFile(new File("test/repositories/norev/ivy.xml"));
         resolve.setKeep(true);
         resolve.execute();
-        
+
         ResolveReport report = (ResolveReport) project.getReference("ivy.resolved.report");
         assertNotNull(report);
         assertFalse(report.hasError());
@@ -117,25 +119,26 @@ public class IvyResolveTest extends Test
                 .exists());
         assertTrue(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar").exists());
     }
-    
+
     public void testResolveWithoutIvyFile() throws Exception {
         // IVY-630
-        resolve.getProject().setProperty("ivy.settings.file", "test/repositories/IVY-630/ivysettings.xml");
-        
+        resolve.getProject().setProperty("ivy.settings.file",
+            "test/repositories/IVY-630/ivysettings.xml");
+
         resolve.setFile(new File("test/java/org/apache/ivy/ant/ivy-630.xml"));
         resolve.setConf("default");
         resolve.setHaltonfailure(false);
         resolve.execute();
-        
+
         assertTrue(getIvyFileInCache(ModuleRevisionId.newInstance("junit", "junit", "4.1"))
-            .exists());
+                .exists());
         assertTrue(getArchiveFileInCache("junit", "junit", "4.1", "junit", "jar", "jar").exists());
     }
 
     private File getArchiveFileInCache(String organisation, String module, String revision,
             String artifact, String type, String ext) {
-        return TestHelper.getArchiveFileInCache(getIvy(), organisation, module, revision,
-            artifact, type, ext);
+        return TestHelper.getArchiveFileInCache(getIvy(), organisation, module, revision, artifact,
+            type, ext);
     }
 
     private File getIvyFileInCache(ModuleRevisionId id) {
@@ -187,7 +190,8 @@ public class IvyResolveTest extends Test
 
         // the resolve must have failed -> the failure property must be set
         String failure = resolve.getProject().getProperty("failure.property");
-        assertTrue("Failure property must have been specified!", Boolean.valueOf(failure).booleanValue());
+        assertTrue("Failure property must have been specified!", Boolean.valueOf(failure)
+                .booleanValue());
     }
 
     public void testWithSlashes() throws Exception {
@@ -227,11 +231,10 @@ public class IvyResolveTest extends Test
         assertNull(getIvy().getVariable("ivy.deps.changed"));
         resolve.execute();
         assertNull(getIvy().getVariable("ivy.deps.changed"));
-        //To be complete, we should also check that the XmlReportParser is not invoked
-        //but this would require a too big refactoring to inject a mock object   
+        // To be complete, we should also check that the XmlReportParser is not invoked
+        // but this would require a too big refactoring to inject a mock object
     }
 
-    
     public void testConflictingDepsChanged() throws Exception {
         resolve.setFile(new File("test/repositories/2/mod4.1/ivy-4.1.xml"));
         resolve.execute();
@@ -272,11 +275,10 @@ public class IvyResolveTest extends Test
         resolve.setFile(new File("test/java/org/apache/ivy/ant/ivy-failure.xml"));
         resolve.setHaltonfailure(false);
         resolve.execute();
-        
+
         // we did manage to get here, so no NPE has been thrown (IVY-961)
     }
 
-    
     public void testFailureWithMissingConfigurations() throws Exception {
         try {
             resolve.setFile(new File("test/java/org/apache/ivy/ant/ivy-simple.xml"));
@@ -326,8 +328,8 @@ public class IvyResolveTest extends Test
 
         assertTrue(getResolvedIvyFileInCache(
             ModuleRevisionId.newInstance("apache", "resolve-simple", "1.0")).exists());
-        assertTrue(getIvy().getResolutionCacheManager().getConfigurationResolveReportInCache(
-            "testWithResolveId", "default").exists());
+        assertTrue(getIvy().getResolutionCacheManager()
+                .getConfigurationResolveReportInCache("testWithResolveId", "default").exists());
 
         // dependencies
         assertTrue(getIvyFileInCache(ModuleRevisionId.newInstance("org1", "mod1.2", "2.0"))
@@ -345,8 +347,8 @@ public class IvyResolveTest extends Test
         assertEquals("true", project.getProperty("ivy.deps.changed"));
         assertEquals("true", project.getProperty("ivy.deps.changed.testWithResolveId"));
         assertEquals("default", project.getProperty("ivy.resolved.configurations"));
-        assertEquals("default", project
-                .getProperty("ivy.resolved.configurations.testWithResolveId"));
+        assertEquals("default",
+            project.getProperty("ivy.resolved.configurations.testWithResolveId"));
 
         // test the references
         assertNotNull(project.getReference("ivy.resolved.report"));
@@ -378,8 +380,8 @@ public class IvyResolveTest extends Test
         assertEquals("true", project.getProperty("ivy.deps.changed"));
         assertEquals("true", project.getProperty("ivy.deps.changed.testWithResolveId"));
         assertEquals("default", project.getProperty("ivy.resolved.configurations"));
-        assertEquals("default", project
-                .getProperty("ivy.resolved.configurations.testWithResolveId"));
+        assertEquals("default",
+            project.getProperty("ivy.resolved.configurations.testWithResolveId"));
 
         // test the references
         assertNotNull(project.getReference("ivy.resolved.report"));
@@ -412,8 +414,8 @@ public class IvyResolveTest extends Test
         assertEquals("true", project.getProperty("ivy.deps.changed"));
         assertEquals("true", project.getProperty("ivy.deps.changed.testWithResolveId"));
         assertEquals("default", project.getProperty("ivy.resolved.configurations"));
-        assertEquals("default", project
-                .getProperty("ivy.resolved.configurations.testWithResolveId"));
+        assertEquals("default",
+            project.getProperty("ivy.resolved.configurations.testWithResolveId"));
 
         // test the references
         assertNotNull(project.getReference("ivy.resolved.report"));
@@ -429,10 +431,10 @@ public class IvyResolveTest extends Test
         resolve.setConf("*,!default");
         resolve.execute();
 
-        assertTrue(getIvyFileInCache(
-            ModuleRevisionId.newInstance("org1", "mod1.1", "2.0")).exists());
-        assertFalse(getIvyFileInCache(
-            ModuleRevisionId.newInstance("org1", "mod1.2", "2.0")).exists());
+        assertTrue(getIvyFileInCache(ModuleRevisionId.newInstance("org1", "mod1.1", "2.0"))
+                .exists());
+        assertFalse(getIvyFileInCache(ModuleRevisionId.newInstance("org1", "mod1.2", "2.0"))
+                .exists());
 
         // test the properties
         Project project = resolve.getProject();
@@ -611,7 +613,7 @@ public class IvyResolveTest extends Test
             // ok
         }
     }
-    
+
     public void testSimpleExtends() throws Exception {
         resolve.setFile(new File("test/java/org/apache/ivy/ant/ivy-extends-multiconf.xml"));
         resolve.execute();

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyRetrieveBuildFileTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyRetrieveBuildFileTest.java?rev=1557968&r1=1557967&r2=1557968&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyRetrieveBuildFileTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyRetrieveBuildFileTest.java Tue Jan 14 08:27:37 2014
@@ -21,11 +21,11 @@ import org.apache.ivy.core.report.Resolv
 import org.apache.tools.ant.BuildFileTest;
 
 public class IvyRetrieveBuildFileTest extends BuildFileTest {
-    
+
     protected void setUp() throws Exception {
         configureProject("test/java/org/apache/ivy/ant/IvyRetrieveBuildFile.xml");
     }
-    
+
     public void testMultipleInlineRetrievesWithCacheCleaning() {
         executeTarget("testMultipleInlineRetrievesWithCacheCleaning");
         ResolveReport report = (ResolveReport) getProject().getReference("ivy.resolved.report");

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyRetrieveTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyRetrieveTest.java?rev=1557968&r1=1557967&r2=1557968&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyRetrieveTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyRetrieveTest.java Tue Jan 14 08:27:37 2014
@@ -29,11 +29,9 @@ import org.apache.tools.ant.BuildExcepti
 import org.apache.tools.ant.Project;
 
 public class IvyRetrieveTest extends TestCase {
-    private static final String IVY_RETRIEVE_PATTERN = 
-            "build/test/lib/[organisation]/[module]/ivy-[revision].xml";
+    private static final String IVY_RETRIEVE_PATTERN = "build/test/lib/[organisation]/[module]/ivy-[revision].xml";
 
-    private static final String RETRIEVE_PATTERN = 
-            "build/test/lib/[conf]/[artifact]-[revision].[type]";
+    private static final String RETRIEVE_PATTERN = "build/test/lib/[conf]/[artifact]-[revision].[type]";
 
     private File cache;
 
@@ -85,11 +83,11 @@ public class IvyRetrieveTest extends Tes
         project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-latest-extra.xml");
         retrieve.getSettings().setValidate(false);
         retrieve.execute();
-        
+
         assertTrue(new File(IvyPatternHelper.substitute(RETRIEVE_PATTERN, "org1", "mod1.2", "2.2",
             "mod1.2", "jar", "jar", "default")).exists());
     }
-    
+
     public void testInline() throws Exception {
         // we first resolve another ivy file
         IvyResolve resolve = new IvyResolve();
@@ -152,15 +150,15 @@ public class IvyRetrieveTest extends Tes
         assertFalse(new File("build/test/lib/unknown").exists()); // even conf directory should
         // have been deleted
     }
-    
+
     public void testSyncWithIgnoreList() throws Exception {
         project.setProperty("ivy.dep.file", "test/repositories/1/org6/mod6.2/ivys/ivy-0.4.xml");
         retrieve.setSync(true);
-        
+
         new File("build/test/lib/.svn").mkdirs();
         new File("build/test/lib/.svn/test.txt").createNewFile();
         assertTrue(new File("build/test/lib/.svn/test.txt").exists());
-        
+
         retrieve.execute();
 
         assertTrue(new File("build/test/lib/.svn/test.txt").exists());
@@ -228,7 +226,7 @@ public class IvyRetrieveTest extends Tes
         assertTrue(new File(IvyPatternHelper.substitute(RETRIEVE_PATTERN, "org1", "mod1.2", "2.0",
             "mod1.2", "jar", "jar")).exists());
     }
-    
+
     public void testUseOriginWithIvyPattern() throws Exception {
         // mod2.5 depends on virtual mod2.3 which depends on mod2.1 which depends on mod1.1 which
         // depends on mod1.2
@@ -249,14 +247,14 @@ public class IvyRetrieveTest extends Tes
         assertFalse(new File(IvyPatternHelper.substitute(ivyPattern, "org1", "mod1.2", "2.0",
             "ivy", "ivy", "xml")).exists());
     }
-    
+
     public void testRetrieveWithOriginalNamePattern() throws Exception {
         retrieve.setFile(new File("test/java/org/apache/ivy/ant/ivy-631.xml"));
         retrieve.setConf("default");
         retrieve.setPattern("build/test/lib/[conf]/[originalname].[ext]");
         retrieve.setSync(true);
         retrieve.execute();
-        
+
         assertTrue(new File("build/test/lib/default/mod1.2-2.2.jar").exists());
     }
 
@@ -393,8 +391,8 @@ public class IvyRetrieveTest extends Tes
 
     private File getArchiveFileInCache(String organisation, String module, String revision,
             String artifact, String type, String ext) {
-        return TestHelper.getArchiveFileInCache(retrieve.getIvyInstance(), organisation,
-            module, revision, artifact, type, ext);
+        return TestHelper.getArchiveFileInCache(retrieve.getIvyInstance(), organisation, module,
+            revision, artifact, type, ext);
     }
 
 }

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyTaskTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyTaskTest.java?rev=1557968&r1=1557967&r2=1557968&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyTaskTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyTaskTest.java Tue Jan 14 08:27:37 2014
@@ -45,14 +45,15 @@ public class IvyTaskTest extends TestCas
         IvySettings settings = ivy.getSettings();
         assertNotNull(settings);
 
-        assertEquals(new File("test/repositories/build/cache").getAbsoluteFile(), settings.getDefaultCache());
+        assertEquals(new File("test/repositories/build/cache").getAbsoluteFile(),
+            settings.getDefaultCache());
         // The next test doesn't always works on windows (mix C: and c: drive)
         assertEquals(new File("test/repositories/ivysettings.xml").getAbsolutePath().toUpperCase(),
-            new File((String) settings.getVariables().getVariable("ivy.settings.file")).getAbsolutePath()
-                    .toUpperCase());
+            new File((String) settings.getVariables().getVariable("ivy.settings.file"))
+                    .getAbsolutePath().toUpperCase());
         assertEquals(new File("test/repositories/ivysettings.xml").toURI().toURL().toExternalForm()
-                .toUpperCase(), ((String) settings.getVariables().getVariable("ivy.settings.url"))
-                .toUpperCase());
+                .toUpperCase(),
+            ((String) settings.getVariables().getVariable("ivy.settings.url")).toUpperCase());
         assertEquals(new File("test/repositories").getAbsolutePath().toUpperCase(),
             ((String) settings.getVariables().getVariable("ivy.settings.dir")).toUpperCase());
         assertEquals("myvalue", settings.getVariables().getVariable("myproperty"));
@@ -82,10 +83,11 @@ public class IvyTaskTest extends TestCas
         assertEquals(new File("build/cache").getAbsoluteFile(), settings.getDefaultCache());
         assertEquals(new File("test/repositories/ivysettings.xml").getAbsolutePath(), settings
                 .getVariables().getVariable("ivy.settings.file"));
-        assertEquals(new File("test/repositories/ivysettings.xml").toURI().toURL().toExternalForm(),
+        assertEquals(
+            new File("test/repositories/ivysettings.xml").toURI().toURL().toExternalForm(),
             settings.getVariables().getVariable("ivy.settings.url"));
-        assertEquals(new File("test/repositories").getAbsolutePath(), settings.getVariables().getVariable(
-            "ivy.settings.dir"));
+        assertEquals(new File("test/repositories").getAbsolutePath(), settings.getVariables()
+                .getVariable("ivy.settings.dir"));
         assertEquals("myvalue", settings.getVariables().getVariable("myproperty"));
     }
 
@@ -99,6 +101,6 @@ public class IvyTaskTest extends TestCas
         task.setProject(p);
         task.execute();
 
-        assertNotNull(p.getProperty("ivy.version"));                
+        assertNotNull(p.getProperty("ivy.version"));
     }
 }

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/NormalRelativeUrlResolverTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/NormalRelativeUrlResolverTest.java?rev=1557968&r1=1557967&r2=1557968&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/NormalRelativeUrlResolverTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/NormalRelativeUrlResolverTest.java Tue Jan 14 08:27:37 2014
@@ -26,52 +26,52 @@ import junit.framework.TestCase;
 public class NormalRelativeUrlResolverTest extends TestCase {
 
     private NormalRelativeUrlResolver t = new NormalRelativeUrlResolver();
-    
+
     public void testRelativeHttpURL() throws MalformedURLException {
         URL base = new URL("http://xxx/file.txt");
-        assertEquals(new URL("http://xxx/file2.txt"), t.getURL(base , "file2.txt"));
+        assertEquals(new URL("http://xxx/file2.txt"), t.getURL(base, "file2.txt"));
     }
-    
+
     public void testRelativeFileURL() throws MalformedURLException {
         URL base = new URL("file://xxx/file.txt");
-        assertEquals(new URL("file://xxx/file2.txt"), t.getURL(base , "file2.txt"));
+        assertEquals(new URL("file://xxx/file2.txt"), t.getURL(base, "file2.txt"));
     }
 
     public void testRelativeMixedURL() throws MalformedURLException {
         URL base = new URL("http://xxx/file.txt");
-        assertEquals(new URL("file://file2.txt"), t.getURL(base , "file://file2.txt"));
+        assertEquals(new URL("file://file2.txt"), t.getURL(base, "file://file2.txt"));
     }
 
     public void testFileAndUrlWithAbsoluteFile() throws MalformedURLException {
         URL base = new URL("file://xxx/file.txt");
         File absFile = new File(".").getAbsoluteFile();
-        assertEquals(absFile.toURI().toURL(), t.getURL(base , absFile.toString() , null));
-        assertEquals(absFile.toURI().toURL(), t.getURL(base , absFile.toString() , ""));
-        assertEquals(absFile.toURI().toURL(), t.getURL(base , absFile.toString() , "somthing.txt"));
+        assertEquals(absFile.toURI().toURL(), t.getURL(base, absFile.toString(), null));
+        assertEquals(absFile.toURI().toURL(), t.getURL(base, absFile.toString(), ""));
+        assertEquals(absFile.toURI().toURL(), t.getURL(base, absFile.toString(), "somthing.txt"));
     }
 
     public void testFileAndUrlWithRelativeFile() throws MalformedURLException {
         URL base = new URL("file://xxx/file.txt");
-        assertEquals(new URL("file://xxx/file2.txt"), t.getURL(base , "file2.txt" , null));
-        assertEquals(new URL("file://xxx/file2.txt"), t.getURL(base , "file2.txt" , ""));
-        assertEquals(new URL("file://xxx/sub/file2.txt"), 
-                t.getURL(base , "sub/file2.txt" , "something"));
+        assertEquals(new URL("file://xxx/file2.txt"), t.getURL(base, "file2.txt", null));
+        assertEquals(new URL("file://xxx/file2.txt"), t.getURL(base, "file2.txt", ""));
+        assertEquals(new URL("file://xxx/sub/file2.txt"),
+            t.getURL(base, "sub/file2.txt", "something"));
     }
 
     public void testFileAndUrlWithAbsoluteUrl() throws MalformedURLException {
         URL base = new URL("file://xxx/file.txt");
         URL otherBase = new URL("http://localhost:80/otherfile.txt");
         String absUrl = "http://ibiblio.org/dir/file.txt";
-        assertEquals(new URL(absUrl), t.getURL(base , null , absUrl));
-        assertEquals(new URL(absUrl), t.getURL(otherBase , null , absUrl));
+        assertEquals(new URL(absUrl), t.getURL(base, null, absUrl));
+        assertEquals(new URL(absUrl), t.getURL(otherBase, null, absUrl));
     }
-    
+
     public void testFileAndUrlWithRelativeUrl() throws MalformedURLException {
         URL base = new URL("file://xxx/file.txt");
         URL otherBase = new URL("http://localhost:80/otherfile.txt");
-        assertEquals(new URL("file://xxx/file2.txt"), t.getURL(base , null , "file2.txt"));
-        assertEquals(new URL("http://localhost:80/file2.txt"), 
-                t.getURL(otherBase , null , "file2.txt"));
+        assertEquals(new URL("file://xxx/file2.txt"), t.getURL(base, null, "file2.txt"));
+        assertEquals(new URL("http://localhost:80/file2.txt"),
+            t.getURL(otherBase, null, "file2.txt"));
     }
 
 }

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/TestPerformance.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/TestPerformance.java?rev=1557968&r1=1557967&r2=1557968&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/TestPerformance.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/TestPerformance.java Tue Jan 14 08:27:37 2014
@@ -39,8 +39,7 @@ import org.apache.tools.ant.taskdefs.Del
  * Not a Junit test, performance depends on the machine on which the test is run...
  */
 public class TestPerformance {
-    private static final String PATTERN = 
-            "build/test/perf/[module]/[artifact]-[revision].[ext]";
+    private static final String PATTERN = "build/test/perf/[module]/[artifact]-[revision].[ext]";
 
     private final Ivy ivy;
 
@@ -100,8 +99,9 @@ public class TestPerformance {
 
             int prevCurDep = curDep;
             for (int ver = 0; ver < versions; ver++) {
-                DefaultModuleDescriptor md = new DefaultModuleDescriptor(ModuleRevisionId
-                        .newInstance("apache", "mod" + nb, "1." + ver), "integration", new Date());
+                DefaultModuleDescriptor md = new DefaultModuleDescriptor(
+                        ModuleRevisionId.newInstance("apache", "mod" + nb, "1." + ver),
+                        "integration", new Date());
 
                 curDep = prevCurDep;
                 for (int i = 0; i < deps && curDep < nbModules; i++) {
@@ -125,10 +125,8 @@ public class TestPerformance {
                 }
                 XmlModuleDescriptorWriter.write(md, new File("build/test/perf/mod" + nb + "/ivy-1."
                         + ver + ".xml"));
-                FileUtil
-                        .copy(new File("test/repositories/1/org1/mod1.1/jars/mod1.1-1.0.jar"),
-                            new File("build/test/perf/mod" + nb + "/mod" + nb + "-1." + ver
-                                    + ".jar"), null);
+                FileUtil.copy(new File("test/repositories/1/org1/mod1.1/jars/mod1.1-1.0.jar"),
+                    new File("build/test/perf/mod" + nb + "/mod" + nb + "-1." + ver + ".jar"), null);
             }
             nb++;
         }

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManagerTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManagerTest.java?rev=1557968&r1=1557967&r2=1557968&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManagerTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManagerTest.java Tue Jan 14 08:27:37 2014
@@ -52,8 +52,9 @@ public class DefaultRepositoryCacheManag
         cacheManager.setBasedir(f);
 
         artifact = createArtifact("org", "module", "rev", "name", "type", "ext");
-        
-        Artifact originArtifact = createArtifact("org", "module", "rev", "name", "pom.original", "pom");
+
+        Artifact originArtifact = createArtifact("org", "module", "rev", "name", "pom.original",
+            "pom");
         origin = new ArtifactOrigin(originArtifact, true, "file:/some/where.pom");
 
         cacheManager.saveArtifactOrigin(originArtifact, origin);

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCacheTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCacheTest.java?rev=1557968&r1=1557967&r2=1557968&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCacheTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCacheTest.java Tue Jan 14 08:27:37 2014
@@ -33,64 +33,68 @@ import org.apache.ivy.plugins.parser.Par
 public class ModuleDescriptorMemoryCacheTest extends TestCase {
 
     ModuleDescriptorMemoryCache cache = new ModuleDescriptorMemoryCache(2);
+
     ParserSettings ivySettings = new IvySettings();
+
     IvySettings ivySettings2 = new IvySettings();
-    
+
     File url1 = new File("file://cached/file.txt");;
+
     File url2 = new File("file://cached/file2.txt");;
+
     File url3 = new File("file://cached/file3.txt");;
 
     ModuleRevisionId mrid1 = ModuleRevisionId.newInstance("org", "name", "rev");
+
     ModuleDescriptor md1 = DefaultModuleDescriptor.newDefaultInstance(mrid1);
-    
+
     ModuleRevisionId mrid2 = ModuleRevisionId.newInstance("org", "name", "rev2");
+
     ModuleDescriptor md2 = DefaultModuleDescriptor.newDefaultInstance(mrid2);
-    
+
     ModuleRevisionId mrid3 = ModuleRevisionId.newInstance("org", "name", "rev3");
+
     ModuleDescriptor md3 = DefaultModuleDescriptor.newDefaultInstance(mrid3);
-        
-        
-    public void testUseModuleDescriptorProviderWhenModuleNotCached() throws ParseException, IOException {
+
+    public void testUseModuleDescriptorProviderWhenModuleNotCached() throws ParseException,
+            IOException {
         ModuleDescriptorProviderMock providerMock = new ModuleDescriptorProviderMock(md1);
-        assertEquals(md1 , cache.get(url1,ivySettings , false, providerMock));
-        providerMock.assertCalled();        
+        assertEquals(md1, cache.get(url1, ivySettings, false, providerMock));
+        providerMock.assertCalled();
     }
-    
-    
+
     public void testCacheResultOfModuleDescriptorProvider() throws ParseException, IOException {
         ModuleDescriptorProviderMock providerMock = new ModuleDescriptorProviderMock(md1);
         ModuleDescriptorProviderMock providerMock2 = null;
-        assertEquals(md1 , cache.get(url1,ivySettings , false, providerMock));
-        assertEquals(md1 , cache.get(url1,ivySettings , false, providerMock2));        
+        assertEquals(md1, cache.get(url1, ivySettings, false, providerMock));
+        assertEquals(md1, cache.get(url1, ivySettings, false, providerMock2));
     }
-    
-    
+
     public void testValidationClearInvalidatedCache() throws ParseException, IOException {
         ModuleDescriptorProviderMock providerMock = new ModuleDescriptorProviderMock(md1);
-        ModuleDescriptorProviderMock providerMock2 = new ModuleDescriptorProviderMock(md1);;
-        assertEquals(md1 , cache.get(url1,ivySettings , false, providerMock));
-        assertEquals(md1 , cache.get(url1,ivySettings , true, providerMock2));
+        ModuleDescriptorProviderMock providerMock2 = new ModuleDescriptorProviderMock(md1);
+        ;
+        assertEquals(md1, cache.get(url1, ivySettings, false, providerMock));
+        assertEquals(md1, cache.get(url1, ivySettings, true, providerMock2));
         providerMock2.assertCalled();
     }
 
-    
     public void testValidationDontClearvalidatedCache() throws ParseException, IOException {
         ModuleDescriptorProviderMock providerMock = new ModuleDescriptorProviderMock(md1);
         ModuleDescriptorProviderMock providerMock2 = null;
-        assertEquals(md1 , cache.get(url1,ivySettings , true, providerMock));
-        assertEquals(md1 , cache.get(url1,ivySettings , false, providerMock2));        
+        assertEquals(md1, cache.get(url1, ivySettings, true, providerMock));
+        assertEquals(md1, cache.get(url1, ivySettings, false, providerMock2));
     }
 
-   
     public void testSizeIsLimitied() throws ParseException, IOException {
         ModuleDescriptorProviderMock providerMock = new ModuleDescriptorProviderMock(md1);
         ModuleDescriptorProviderMock providerMock1b = new ModuleDescriptorProviderMock(md1);
         ModuleDescriptorProviderMock providerMock2 = new ModuleDescriptorProviderMock(md2);
         ModuleDescriptorProviderMock providerMock3 = new ModuleDescriptorProviderMock(md3);
-        cache.get(url1,ivySettings , false, providerMock);
-        cache.get(url2,ivySettings , false, providerMock2);
-        cache.get(url3,ivySettings , false, providerMock3);//adding 1
-        cache.get(url1,ivySettings , false, providerMock1b);//and one has been removed
+        cache.get(url1, ivySettings, false, providerMock);
+        cache.get(url2, ivySettings, false, providerMock2);
+        cache.get(url3, ivySettings, false, providerMock3);// adding 1
+        cache.get(url1, ivySettings, false, providerMock1b);// and one has been removed
         providerMock1b.assertCalled();
     }
 
@@ -99,69 +103,69 @@ public class ModuleDescriptorMemoryCache
         ModuleDescriptorProviderMock providerMock2 = new ModuleDescriptorProviderMock(md2);
         ModuleDescriptorProviderMock providerMock2b = new ModuleDescriptorProviderMock(md1);
         ModuleDescriptorProviderMock providerMock3 = new ModuleDescriptorProviderMock(md3);
-        cache.get(url1,ivySettings , false, providerMock);
-        cache.get(url2,ivySettings , false, providerMock2);
-        cache.get(url1,ivySettings , false, null);  
-        cache.get(url3,ivySettings , false, providerMock3);
-        cache.get(url1,ivySettings , false, null);//and one has been removed
-        cache.get(url2,ivySettings , false, providerMock2b);
+        cache.get(url1, ivySettings, false, providerMock);
+        cache.get(url2, ivySettings, false, providerMock2);
+        cache.get(url1, ivySettings, false, null);
+        cache.get(url3, ivySettings, false, providerMock3);
+        cache.get(url1, ivySettings, false, null);// and one has been removed
+        cache.get(url2, ivySettings, false, providerMock2b);
         providerMock2b.assertCalled();
     }
 
-
     public void testVariableChangeInvalidateEntry() throws ParseException, IOException {
         ModuleDescriptorProviderMock providerMock = new ModuleDescriptorProviderMock(md1);
         ModuleDescriptorProviderMock providerMock2 = new ModuleDescriptorProviderMock(md1);
-        assertEquals(md1 , cache.get(url1,ivySettings2 , false, providerMock));
+        assertEquals(md1, cache.get(url1, ivySettings2, false, providerMock));
         ivySettings2.getVariables().setVariable("val", "changedVal", true);
-        assertEquals(md1 , cache.get(url1,ivySettings2 , false, providerMock2));
+        assertEquals(md1, cache.get(url1, ivySettings2, false, providerMock2));
         providerMock2.assertCalled();
     }
-    
-    
+
     public void testGetStaleDontReadFromCache() throws ParseException, IOException {
         ModuleDescriptorProviderMock providerMock = new ModuleDescriptorProviderMock(md1);
         ModuleDescriptorProviderMock providerMock2 = new ModuleDescriptorProviderMock(md2);
-        assertEquals(md1 , cache.get(url1,ivySettings , false, providerMock));
-        assertEquals(md2 , cache.getStale(url1,ivySettings , false, providerMock2));
-        providerMock2.assertCalled();        
+        assertEquals(md1, cache.get(url1, ivySettings, false, providerMock));
+        assertEquals(md2, cache.getStale(url1, ivySettings, false, providerMock2));
+        providerMock2.assertCalled();
     }
-    
+
     public void testGetStaleStoreResultInCache() throws ParseException, IOException {
         ModuleDescriptorProviderMock providerMock = new ModuleDescriptorProviderMock(md1);
         ModuleDescriptorProviderMock providerMock2 = null;
-        assertEquals(md1 , cache.getStale(url1,ivySettings , false, providerMock));
-        assertEquals(md1 , cache.get(url1,ivySettings , false, providerMock2));        
+        assertEquals(md1, cache.getStale(url1, ivySettings, false, providerMock));
+        assertEquals(md1, cache.get(url1, ivySettings, false, providerMock2));
     }
-    
+
     public void testASizeOf0MeansNoCache() throws ParseException, IOException {
         cache = new ModuleDescriptorMemoryCache(0);
         ModuleDescriptorProviderMock providerMock = new ModuleDescriptorProviderMock(md1);
         ModuleDescriptorProviderMock providerMock2 = new ModuleDescriptorProviderMock(md1);
-        assertEquals(md1 , cache.get(url1,ivySettings , false, providerMock));
-        assertEquals(md1 , cache.get(url1,ivySettings , false, providerMock2));
+        assertEquals(md1, cache.get(url1, ivySettings, false, providerMock));
+        assertEquals(md1, cache.get(url1, ivySettings, false, providerMock2));
         providerMock2.assertCalled();
     }
-    
+
     private static class ModuleDescriptorProviderMock implements ModuleDescriptorProvider {
-        
+
         private boolean called = false;
+
         private final ModuleDescriptor result;
-        
+
         public ModuleDescriptorProviderMock(ModuleDescriptor result) {
             this.result = result;
         }
 
-        public ModuleDescriptor provideModule(ParserSettings ivySettings, File descriptorFile, 
+        public ModuleDescriptor provideModule(ParserSettings ivySettings, File descriptorFile,
                 boolean validate) {
-            if (ivySettings!=null) ivySettings.substitute("${val}");
+            if (ivySettings != null)
+                ivySettings.substitute("${val}");
             called = true;
             return result;
         }
-        
+
         public void assertCalled() {
             Assert.assertTrue(called);
         }
     }
-    
+
 }

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/deliver/DeliverTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/deliver/DeliverTest.java?rev=1557968&r1=1557967&r2=1557968&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/deliver/DeliverTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/deliver/DeliverTest.java Tue Jan 14 08:27:37 2014
@@ -32,6 +32,7 @@ import org.apache.tools.ant.Project;
 
 public class DeliverTest extends TestCase {
     private File cache;
+
     private File deliverDir;
 
     private IvyDeliver ivyDeliver;
@@ -43,13 +44,14 @@ public class DeliverTest extends TestCas
 
         deliverDir = new File("build/test/deliver");
         deliverDir.mkdirs();
-        
+
         Project project = new Project();
         project.init();
-        
+
         ivyDeliver = new IvyDeliver();
         ivyDeliver.setProject(project);
-        ivyDeliver.setDeliverpattern(deliverDir.getAbsolutePath() + "/[type]s/[artifact]-[revision](-[classifier]).[ext]");
+        ivyDeliver.setDeliverpattern(deliverDir.getAbsolutePath()
+                + "/[type]s/[artifact]-[revision](-[classifier]).[ext]");
     }
 
     protected void tearDown() throws Exception {

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/event/IvyEventFilterTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/event/IvyEventFilterTest.java?rev=1557968&r1=1557967&r2=1557968&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/event/IvyEventFilterTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/event/IvyEventFilterTest.java Tue Jan 14 08:27:37 2014
@@ -31,15 +31,22 @@ import org.apache.ivy.core.report.Resolv
 public class IvyEventFilterTest extends TestCase {
 
     private ModuleDescriptor md = null;
+
     private ModuleDescriptor md2 = null;
+
     private ModuleDescriptor md3 = null;
+
     private ModuleDescriptor md4 = null;
-    
+
     public void setUp() throws Exception {
-        md = new DefaultModuleDescriptor(ModuleRevisionId.newInstance("foo", "bar", "1.0"), "integration", new Date());
-        md2 = new DefaultModuleDescriptor(ModuleRevisionId.newInstance("foo2", "bar", "1.0"), "integration", new Date());
-        md3 = new DefaultModuleDescriptor(ModuleRevisionId.newInstance("foo3", "baz", "1.0"), "integration", new Date());
-        md4 = new DefaultModuleDescriptor(ModuleRevisionId.newInstance("foo", "baz", "1.0"), "integration", new Date());
+        md = new DefaultModuleDescriptor(ModuleRevisionId.newInstance("foo", "bar", "1.0"),
+                "integration", new Date());
+        md2 = new DefaultModuleDescriptor(ModuleRevisionId.newInstance("foo2", "bar", "1.0"),
+                "integration", new Date());
+        md3 = new DefaultModuleDescriptor(ModuleRevisionId.newInstance("foo3", "baz", "1.0"),
+                "integration", new Date());
+        md4 = new DefaultModuleDescriptor(ModuleRevisionId.newInstance("foo", "baz", "1.0"),
+                "integration", new Date());
     }
 
     public void testSimple() {

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/install/InstallTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/install/InstallTest.java?rev=1557968&r1=1557967&r2=1557968&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/install/InstallTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/install/InstallTest.java Tue Jan 14 08:27:37 2014
@@ -35,52 +35,52 @@ public class InstallTest extends TestCas
         ivy.configure(new File("test/repositories/ivysettings.xml"));
 
         ivy.install(ModuleRevisionId.newInstance("org1", "mod1.2", "2.0"), ivy.getSettings()
-                .getDefaultResolver().getName(), "install", 
-                new InstallOptions());
+                .getDefaultResolver().getName(), "install", new InstallOptions());
 
         assertTrue(new File("build/test/install/org1/mod1.2/ivy-2.0.xml").exists());
         assertTrue(new File("build/test/install/org1/mod1.2/mod1.2-2.0.jar").exists());
     }
-    
+
     public void testValidate() throws Exception {
         Ivy ivy = Ivy.newInstance();
         ivy.configure(new File("test/repositories/ivysettings.xml"));
 
-        ivy.install(ModuleRevisionId.newInstance("orgfailure", "modfailure", "1.0"), ivy.getSettings()
-                .getDefaultResolver().getName(), "install", new InstallOptions());
+        ivy.install(ModuleRevisionId.newInstance("orgfailure", "modfailure", "1.0"), ivy
+                .getSettings().getDefaultResolver().getName(), "install", new InstallOptions());
 
         assertFalse(new File("build/test/install/orgfailure/modfailure/ivy-1.0.xml").exists());
-        assertFalse(new File("build/test/install/orgfailure/modfailure/modfailure-1.0.jar").exists());
+        assertFalse(new File("build/test/install/orgfailure/modfailure/modfailure-1.0.jar")
+                .exists());
     }
 
     public void testMaven() throws Exception {
         Ivy ivy = Ivy.newInstance();
         ivy.configure(new File("test/repositories/ivysettings.xml"));
 
-        ResolveReport rr = ivy.install(ModuleRevisionId.newInstance("org.apache", "test", "1.0"), ivy.getSettings()
-                .getDefaultResolver().getName(), "install", new InstallOptions());
+        ResolveReport rr = ivy.install(ModuleRevisionId.newInstance("org.apache", "test", "1.0"),
+            ivy.getSettings().getDefaultResolver().getName(), "install", new InstallOptions());
 
         assertTrue(new File("build/test/install/org.apache/test/ivy-1.0.xml").exists());
         assertTrue(new File("build/test/install/org.apache/test/test-1.0.jar").exists());
-        
+
         // the original descriptor is not installed
         assertFalse(new File("build/test/install/org.apache/test/test-1.0.pom").exists());
 
         ivy.install(ModuleRevisionId.newInstance("org.apache", "test", "1.0"), ivy.getSettings()
-            .getDefaultResolver().getName(), "install", new InstallOptions()
-                .setInstallOriginalMetadata(true)
-                .setOverwrite(true));
-        
+                .getDefaultResolver().getName(), "install", new InstallOptions()
+                .setInstallOriginalMetadata(true).setOverwrite(true));
+
         // the original descriptor is installed now, too
         assertTrue(new File("build/test/install/org.apache/test/test-1.0.pom").exists());
     }
-    
+
     public void testNoValidate() throws Exception {
         Ivy ivy = Ivy.newInstance();
         ivy.configure(new File("test/repositories/ivysettings.xml"));
 
-        ivy.install(ModuleRevisionId.newInstance("orgfailure", "modfailure", "1.0"), ivy.getSettings()
-                .getDefaultResolver().getName(), "install", new InstallOptions().setValidate(false));
+        ivy.install(ModuleRevisionId.newInstance("orgfailure", "modfailure", "1.0"), ivy
+                .getSettings().getDefaultResolver().getName(), "install",
+            new InstallOptions().setValidate(false));
 
         assertTrue(new File("build/test/install/orgfailure/modfailure/ivy-1.0.xml").exists());
         assertTrue(new File("build/test/install/orgfailure/modfailure/modfailure-1.0.jar").exists());
@@ -90,7 +90,7 @@ public class InstallTest extends TestCas
         Ivy ivy = Ivy.newInstance();
         ivy.configure(new File("test/repositories/ivysettings-nodefaultresolver.xml"));
 
-        ivy.install(ModuleRevisionId.newInstance("org1", "mod1.2", "2.0"), "test", "install", 
+        ivy.install(ModuleRevisionId.newInstance("org1", "mod1.2", "2.0"), "test", "install",
             new InstallOptions());
 
         assertTrue(new File("build/test/install/org1/mod1.2/ivy-2.0.xml").exists());
@@ -115,8 +115,8 @@ public class InstallTest extends TestCas
         Ivy ivy = Ivy.newInstance();
         ivy.configure(new File("test/repositories/ivysettings-nodefaultresolver.xml"));
 
-        ivy.install(ModuleRevisionId.newInstance("org1", "mod1.4", "1.0.1"), 
-            "test", "install", new InstallOptions());
+        ivy.install(ModuleRevisionId.newInstance("org1", "mod1.4", "1.0.1"), "test", "install",
+            new InstallOptions());
 
         assertTrue(new File("build/test/install/org1/mod1.4/ivy-1.0.1.xml").exists());
 
@@ -131,8 +131,8 @@ public class InstallTest extends TestCas
         Ivy ivy = Ivy.newInstance();
         ivy.configure(new File("test/repositories/ivysettings-dummydefaultresolver.xml"));
 
-        ivy.install(ModuleRevisionId.newInstance("org1", "mod1.4", "1.0.1"), 
-            "test", "install", new InstallOptions());
+        ivy.install(ModuleRevisionId.newInstance("org1", "mod1.4", "1.0.1"), "test", "install",
+            new InstallOptions());
 
         assertTrue(new File("build/test/install/org1/mod1.4/ivy-1.0.1.xml").exists());
 
@@ -148,8 +148,8 @@ public class InstallTest extends TestCas
         ivy.configure(new File("test/repositories/ivysettings.xml"));
 
         ivy.install(ModuleRevisionId.newInstance("org1", "mod1.1", "1.0"), ivy.getSettings()
-                .getDefaultResolver().getName(), "install", 
-                new InstallOptions().setTransitive(false));
+                .getDefaultResolver().getName(), "install",
+            new InstallOptions().setTransitive(false));
 
         assertTrue(new File("build/test/install/org1/mod1.1/ivy-1.0.xml").exists());
         assertTrue(new File("build/test/install/org1/mod1.1/mod1.1-1.0.jar").exists());
@@ -162,7 +162,7 @@ public class InstallTest extends TestCas
         Ivy ivy = Ivy.newInstance();
         ivy.configure(new File("test/repositories/ivysettings.xml"));
 
-        ivy.install(ModuleRevisionId.newInstance("org1", ".*", ".*"), "1", "install", 
+        ivy.install(ModuleRevisionId.newInstance("org1", ".*", ".*"), "1", "install",
             new InstallOptions().setMatcherName(PatternMatcher.REGEXP).setOverwrite(true));
 
         assertTrue(new File("build/test/install/org1/mod1.1/ivy-1.0.xml").exists());