You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2017/12/18 05:31:13 UTC

[02/10] ant git commit: Checkstyle: whitespace, line continuation and modifier idiosyncrasies

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/AbstractXSLTLiaisonTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/AbstractXSLTLiaisonTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/AbstractXSLTLiaisonTest.java
index 9a77203..f55c3f9 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/AbstractXSLTLiaisonTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/AbstractXSLTLiaisonTest.java
@@ -30,7 +30,9 @@ import javax.xml.parsers.DocumentBuilderFactory;
 import org.apache.tools.ant.taskdefs.XSLTLiaison;
 import org.apache.tools.ant.util.FileUtils;
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
 import org.w3c.dom.Document;
 
 /**
@@ -45,6 +47,9 @@ public abstract class AbstractXSLTLiaisonTest {
 
     protected XSLTLiaison liaison;
 
+    @Rule
+    public TemporaryFolder testFolder = new TemporaryFolder();
+
     @Before
     public void setUp() throws Exception {
         liaison = createLiaison();
@@ -79,13 +84,8 @@ public abstract class AbstractXSLTLiaisonTest {
         liaison.setStylesheet(xsl);
         liaison.addParam("param", "value");
         File in = getFile("/taskdefs/optional/xsltliaison-in.xml");
-        File out = new File("xsltliaison.tmp");
-        out.deleteOnExit(); // just to be sure
-        try {
-            liaison.transform(in, out);
-        } finally {
-            out.delete();
-        }
+        File out = testFolder.newFile("xsltliaison.tmp");
+        liaison.transform(in, out);
     }
 
     @Test
@@ -93,17 +93,13 @@ public abstract class AbstractXSLTLiaisonTest {
         File xsl = getFile("/taskdefs/optional/xsltliaison-encoding-in.xsl");
         liaison.setStylesheet(xsl);
         File in = getFile("/taskdefs/optional/xsltliaison-encoding-in.xml");
-        File out = new File("xsltliaison-encoding.tmp");
-        out.deleteOnExit(); // just to be sure
-        try {
-            liaison.transform(in, out);
-            Document doc = parseXML(out);
-            assertEquals("root",doc.getDocumentElement().getNodeName());
-            assertEquals("message",doc.getDocumentElement().getFirstChild().getNodeName());
-            assertEquals("\u00E9\u00E0\u00E8\u00EF\u00F9",doc.getDocumentElement().getFirstChild().getFirstChild().getNodeValue());
-        } finally {
-            out.delete();
-        }
+        File out = testFolder.newFile("xsltliaison-encoding.tmp");
+        liaison.transform(in, out);
+        Document doc = parseXML(out);
+        assertEquals("root", doc.getDocumentElement().getNodeName());
+        assertEquals("message", doc.getDocumentElement().getFirstChild().getNodeName());
+        assertEquals("\u00E9\u00E0\u00E8\u00EF\u00F9",
+                doc.getDocumentElement().getFirstChild().getFirstChild().getNodeValue());
     }
 
     public Document parseXML(File file) throws Exception {

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java
index cbd66b6..d1c3aea 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.java
@@ -87,8 +87,8 @@ public class EchoPropertiesTest {
         try {
             buildRule.executeTarget("testReadBadFile");
             fail("BuildException should have been thrown on bad file");
-        } catch(BuildException ex) {
-            assertContains("srcfile is a directory","srcfile is a directory!", ex.getMessage());
+        } catch (BuildException ex) {
+            assertContains("srcfile is a directory", "srcfile is a directory!", ex.getMessage());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/JavahTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/JavahTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/JavahTest.java
index 91f7b32..32ec8bb 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/JavahTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/JavahTest.java
@@ -31,8 +31,7 @@ import static org.junit.Assert.assertTrue;
 
 public class JavahTest {
 
-    private final static String BUILD_XML =
-        "src/etc/testcases/taskdefs/optional/javah/build.xml";
+    private static final String BUILD_XML = "src/etc/testcases/taskdefs/optional/javah/build.xml";
 
     @Rule
     public BuildFileRule buildRule = new BuildFileRule();

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/JspcTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/JspcTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/JspcTest.java
index d1a0f57..3955f57 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/JspcTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/JspcTest.java
@@ -44,7 +44,7 @@ import static org.junit.Assert.fail;
  */
 public class JspcTest {
 
-    private final static String TASKDEFS_DIR = "src/etc/testcases/taskdefs/optional/";
+    private static final String TASKDEFS_DIR = "src/etc/testcases/taskdefs/optional/";
 
     @Rule
     public BuildFileRule buildRule = new BuildFileRule();
@@ -149,7 +149,7 @@ public class JspcTest {
     @Test
     public void testJasperNameManglerSelection() {
         JspCompilerAdapter adapter =
-                JspCompilerAdapterFactory.getCompiler("jasper", null,null);
+                JspCompilerAdapterFactory.getCompiler("jasper", null, null);
         JspMangler mangler = adapter.createMangler();
         assertTrue(mangler instanceof JspNameMangler);
         adapter = JspCompilerAdapterFactory.getCompiler("jasper41", null, null);

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/Native2AsciiTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/Native2AsciiTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/Native2AsciiTest.java
index 748225e..0ea5d9b 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/Native2AsciiTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/Native2AsciiTest.java
@@ -32,7 +32,7 @@ import static org.junit.Assert.assertTrue;
 
 public class Native2AsciiTest {
 
-    private final static String BUILD_XML =
+    private static final String BUILD_XML =
         "src/etc/testcases/taskdefs/optional/native2ascii/build.xml";
 
     @Rule

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/PropertyFileTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/PropertyFileTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/PropertyFileTest.java
index 8b1e081..fa6cd86 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/PropertyFileTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/PropertyFileTest.java
@@ -117,15 +117,15 @@ public class PropertyFileTest {
     @Test
     public void testExerciseDefaultAndIncrement() throws Exception {
         buildRule.executeTarget("exercise");
-        assertEquals("3",buildRule.getProject().getProperty("int.with.default"));
-        assertEquals("1",buildRule.getProject().getProperty("int.without.default"));
-        assertEquals("-->",buildRule.getProject().getProperty("string.with.default"));
-        assertEquals(".",buildRule.getProject().getProperty("string.without.default"));
+        assertEquals("3", buildRule.getProject().getProperty("int.with.default"));
+        assertEquals("1", buildRule.getProject().getProperty("int.without.default"));
+        assertEquals("-->", buildRule.getProject().getProperty("string.with.default"));
+        assertEquals(".", buildRule.getProject().getProperty("string.without.default"));
         assertEquals("2002/01/21 12:18", buildRule.getProject().getProperty("ethans.birth"));
         assertEquals("2003/01/21", buildRule.getProject().getProperty("first.birthday"));
         assertEquals("0124", buildRule.getProject().getProperty("olderThanAWeek"));
         assertEquals("37", buildRule.getProject().getProperty("existing.prop"));
-        assertEquals("6",buildRule.getProject().getProperty("int.without.value"));
+        assertEquals("6", buildRule.getProject().getProperty("int.without.value"));
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/PvcsTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/PvcsTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/PvcsTest.java
index cd7a431..29b2685 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/PvcsTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/PvcsTest.java
@@ -41,7 +41,7 @@ public class PvcsTest {
         try {
             buildRule.executeTarget("test1");
             fail("Required argument repository not specified");
-        }  catch (BuildException ex) {
+        } catch (BuildException ex) {
             //TODO check exception message
         }
     }

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/SchemaValidateTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/SchemaValidateTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/SchemaValidateTest.java
index 667c890..643aa6e 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/SchemaValidateTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/SchemaValidateTest.java
@@ -35,8 +35,7 @@ public class SchemaValidateTest {
     /**
      * where tasks run
      */
-    private final static String TASKDEFS_DIR =
-            "src/etc/testcases/taskdefs/optional/";
+    private static final String TASKDEFS_DIR = "src/etc/testcases/taskdefs/optional/";
 
     @Rule
     public BuildFileRule buildRule = new BuildFileRule();

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/TraXLiaisonTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/TraXLiaisonTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/TraXLiaisonTest.java
index c4f28ab..527e264 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/TraXLiaisonTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/TraXLiaisonTest.java
@@ -38,9 +38,7 @@ import org.junit.Test;
 /**
  * TraX XSLTLiaison testcase
  */
-public class TraXLiaisonTest extends AbstractXSLTLiaisonTest
-    implements XSLTLogger {
-
+public class TraXLiaisonTest extends AbstractXSLTLiaisonTest implements XSLTLogger {
 
     @After
     public void tearDown() {

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XmlValidateCatalogTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XmlValidateCatalogTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XmlValidateCatalogTest.java
index c9948bb..33fa189 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XmlValidateCatalogTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XmlValidateCatalogTest.java
@@ -33,7 +33,7 @@ public class XmlValidateCatalogTest {
     /**
      * where tasks run
      */
-    private final static String TASKDEFS_DIR = "src/etc/testcases/taskdefs/optional/";
+    private static final String TASKDEFS_DIR = "src/etc/testcases/taskdefs/optional/";
 
     @Rule
     public BuildFileRule buildRule = new BuildFileRule();

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XmlValidateTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XmlValidateTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XmlValidateTest.java
index d5f27a6..9cd6eb2 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XmlValidateTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XmlValidateTest.java
@@ -40,8 +40,7 @@ public class XmlValidateTest {
     /**
      * where tasks run
      */
-    private final static String TASKDEFS_DIR =
-        "src/etc/testcases/taskdefs/optional/";
+    private static final String TASKDEFS_DIR = "src/etc/testcases/taskdefs/optional/";
 
     @Rule
     public BuildFileRule buildRule = new BuildFileRule();
@@ -112,11 +111,10 @@ public class XmlValidateTest {
         try {
             buildRule.executeTarget("testSchemaGood");
         } catch (BuildException e) {
-            if (e
-                .getMessage()
-                .endsWith(" doesn't recognize feature http://apache.org/xml/features/validation/schema")
-                || e.getMessage().endsWith(
-                    " doesn't support feature http://apache.org/xml/features/validation/schema")) {
+            if (e.getMessage().endsWith(
+                    " doesn't recognize feature http://apache.org/xml/features/validation/schema")
+                    || e.getMessage().endsWith(
+                            " doesn't support feature http://apache.org/xml/features/validation/schema")) {
                 throw new AssumptionViolatedException("parser doesn't support schema");
             } else {
                 throw e;
@@ -132,11 +130,10 @@ public class XmlValidateTest {
             buildRule.executeTarget("testSchemaBad");
             fail("Should throw BuildException because 'Bad Schema Validation'");
         } catch (BuildException e) {
-            if (e
-                .getMessage()
-                .endsWith(" doesn't recognize feature http://apache.org/xml/features/validation/schema")
-                || e.getMessage().endsWith(
-                    " doesn't support feature http://apache.org/xml/features/validation/schema")) {
+            if (e.getMessage().endsWith(
+                    " doesn't recognize feature http://apache.org/xml/features/validation/schema")
+                    || e.getMessage().endsWith(
+                            " doesn't support feature http://apache.org/xml/features/validation/schema")) {
                 throw new AssumptionViolatedException("parser doesn't support schema");
             } else {
                 assertTrue(

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XsltTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XsltTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XsltTest.java
index b45505b..d84fc69 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XsltTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XsltTest.java
@@ -35,7 +35,7 @@ public class XsltTest {
     /**
      * where tasks run
      */
-    private final static String TASKDEFS_DIR = "src/etc/testcases/taskdefs/optional/";
+    private static final String TASKDEFS_DIR = "src/etc/testcases/taskdefs/optional/";
 
     @Rule
     public BuildFileRule buildRule = new BuildFileRule();

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/i18n/TranslateTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/i18n/TranslateTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/i18n/TranslateTest.java
index 15564a7..75c91d4 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/i18n/TranslateTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/i18n/TranslateTest.java
@@ -39,9 +39,9 @@ public class TranslateTest {
     @Rule
     public final BuildFileRule buildRule = new BuildFileRule();
 
-    static private final int BUF_SIZE = 32768;
+    private static final int BUF_SIZE = 32768;
 
-    private final static String TASKDEFS_DIR = "src/etc/testcases/taskdefs/optional/i18n/translate";
+    private static final String TASKDEFS_DIR = "src/etc/testcases/taskdefs/optional/i18n/translate";
 
     @Before
     public void setUp() {

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/image/ImageTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/image/ImageTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/image/ImageTest.java
index 85747ab..b39832b 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/image/ImageTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/image/ImageTest.java
@@ -39,11 +39,9 @@ import static org.junit.Assume.assumeTrue;
  */
 public class ImageTest {
 
-    private final static String TASKDEFS_DIR =
-        "src/etc/testcases/taskdefs/optional/image/";
-    private final static String LARGEIMAGE = "largeimage.jpg";
-
     private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
+    private static final String TASKDEFS_DIR = "src/etc/testcases/taskdefs/optional/image/";
+    private static final String LARGEIMAGE = "largeimage.jpg";
 
     @Rule
     public BuildFileRule buildRule = new BuildFileRule();
@@ -66,9 +64,7 @@ public class ImageTest {
         AntAssert.assertContains("Processing File", buildRule.getLog());
 
         File f = new File(buildRule.getOutputDir(), LARGEIMAGE);
-        assertTrue("Did not create " + f.getAbsolutePath(),
-                   f.exists());
-
+        assertTrue("Did not create " + f.getAbsolutePath(), f.exists());
     }
 
     @Test
@@ -77,14 +73,13 @@ public class ImageTest {
         AntAssert.assertContains("Processing File", buildRule.getLog());
         File f = new File(buildRule.getOutputDir(), LARGEIMAGE);
         assumeTrue("Could not change file modificaiton date",
-                f.setLastModified(f.lastModified() - (FILE_UTILS.getFileTimestampGranularity() * 2)));
+                f.setLastModified(f.lastModified() - FILE_UTILS.getFileTimestampGranularity() * 2));
         long lastModified = f.lastModified();
         buildRule.executeTarget("testOverwriteTrue");
         AntAssert.assertContains("Processing File", buildRule.getLog());
         f = new File(buildRule.getOutputDir(), LARGEIMAGE);
         long overwrittenLastModified = f.lastModified();
-        assertTrue("File was not overwritten.",
-                   lastModified < overwrittenLastModified);
+        assertTrue("File was not overwritten.", lastModified < overwrittenLastModified);
     }
 
     @Test
@@ -97,8 +92,7 @@ public class ImageTest {
         AntAssert.assertContains("Processing File", buildRule.getLog());
         f = new File(buildRule.getOutputDir(), LARGEIMAGE);
         long overwrittenLastModified = f.lastModified();
-        assertTrue("File was overwritten.",
-                   lastModified == overwrittenLastModified);
+        assertTrue("File was overwritten.", lastModified == overwrittenLastModified);
     }
 
     @Test
@@ -106,9 +100,7 @@ public class ImageTest {
         buildRule.executeTarget("testSimpleScaleWithMapper");
         AntAssert.assertContains("Processing File", buildRule.getLog());
         File f = new File(buildRule.getOutputDir(), "scaled-" + LARGEIMAGE);
-        assertTrue("Did not create " + f.getAbsolutePath(),
-                   f.exists());
-
+        assertTrue("Did not create " + f.getAbsolutePath(), f.exists());
     }
 
     @Test
@@ -117,13 +109,10 @@ public class ImageTest {
         try {
             buildRule.executeTarget("testFailOnError");
             AntAssert.assertContains("Unable to process image stream", buildRule.getLog());
-        }
-        catch (RuntimeException re){
-            assertTrue("Run time exception should say "
-                       + "'Unable to process image stream'. :"
+        } catch (RuntimeException re){
+            assertTrue("Run time exception should say 'Unable to process image stream'. :"
                        + re.toString(),
-                       re.toString()
-                       .indexOf("Unable to process image stream") > -1);
+                       re.toString().indexOf("Unable to process image stream") > -1);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java
index e99c462..c467e9a 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java
@@ -21,7 +21,6 @@ package org.apache.tools.ant.taskdefs.optional.junit;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.apache.tools.ant.AntAssert.assertContains;
-import static org.junit.Assert.fail;
 
 import java.io.ByteArrayInputStream;
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java
index 3c22507..28d7f9c 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java
@@ -375,7 +375,7 @@ public class JUnitTaskTest {
         assertEquals("Incorrect ignore message on explicit ignored test", "Please don't ignore me!",
                 xpath.compile("//testsuite/testcase[@name='explicitIgnoreTest']/skipped/@message").evaluate(doc));
         assertEquals("No message should be set on Ignored tests with no Ignore annotation text", 0,
-                ((Node)xpath.compile("//testsuite/testcase[@name='explicitlyIgnoreTestNoMessage']/skipped")
+                ((Node) xpath.compile("//testsuite/testcase[@name='explicitlyIgnoreTestNoMessage']/skipped")
                         .evaluate(doc, XPathConstants.NODE)).getAttributes().getLength());
         assertEquals("Incorrect ignore message on implicit ignored test", "This test will be ignored",
                 xpath.compile("//testsuite/testcase[@name='implicitlyIgnoreTest']/skipped/@message").evaluate(doc));
@@ -469,7 +469,7 @@ public class JUnitTaskTest {
                 System.currentTimeMillis() / 1000));
         workDir.mkdirs();
         try {
-            final File modulesDir = new File(workDir,"modules");    //NOI18N
+            final File modulesDir = new File(workDir, "modules");    //NOI18N
             modulesDir.mkdirs();
 
             final Project project = new Project();

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestListenerTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestListenerTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestListenerTest.java
index 0067203..a4798ef 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestListenerTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestListenerTest.java
@@ -64,24 +64,24 @@ public class JUnitTestListenerTest {
     public void testTestCountFired() {
         buildRule.getProject().setProperty("enableEvents", "true");
         buildRule.executeTarget(PASS_TEST_TARGET);
-        assertContains("expecting test count message", JUnitTask.TESTLISTENER_PREFIX +
-                   "tests to run: ", buildRule.getFullLog());
+        assertContains("expecting test count message", JUnitTask.TESTLISTENER_PREFIX
+                + "tests to run: ", buildRule.getFullLog());
     }
 
     @Test
     public void testStartTestFired() {
         buildRule.getProject().setProperty("enableEvents", "true");
         buildRule.executeTarget(PASS_TEST_TARGET);
-        assertContains("expecting test started message", JUnitTask.TESTLISTENER_PREFIX +
-                   "startTest(" + PASS_TEST + ")", buildRule.getFullLog());
+        assertContains("expecting test started message", JUnitTask.TESTLISTENER_PREFIX
+                + "startTest(" + PASS_TEST + ")", buildRule.getFullLog());
     }
 
     @Test
     public void testEndTestFired() {
         buildRule.getProject().setProperty("enableEvents", "true");
         buildRule.executeTarget(PASS_TEST_TARGET);
-        assertContains("expecting test ended message", JUnitTask.TESTLISTENER_PREFIX +
-                   "endTest(" + PASS_TEST + ")", buildRule.getFullLog());
+        assertContains("expecting test ended message", JUnitTask.TESTLISTENER_PREFIX
+                + "endTest(" + PASS_TEST + ")", buildRule.getFullLog());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunnerTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunnerTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunnerTest.java
index 3886fe7..e8544ce 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunnerTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunnerTest.java
@@ -42,7 +42,7 @@ public class JUnitTestRunnerTest {
     // check that a valid method name generates no errors
     @Test
     public void testValidMethod() {
-        TestRunner runner = createRunnerForTestMethod(ValidMethodTestCase.class,"testA");
+        TestRunner runner = createRunnerForTestMethod(ValidMethodTestCase.class, "testA");
         runner.run();
         assertEquals(runner.getFormatter().getError(), JUnitTestRunner.SUCCESS, runner.getRetCode());
     }
@@ -50,7 +50,7 @@ public class JUnitTestRunnerTest {
     // check that having an invalid method name generates an error
     @Test
     public void testInvalidMethod() {
-        TestRunner runner = createRunnerForTestMethod(InvalidMethodTestCase.class,"testInvalid");
+        TestRunner runner = createRunnerForTestMethod(InvalidMethodTestCase.class, "testInvalid");
         runner.run();
         String error = runner.getFormatter().getError();
         // might be FAILURES or ERRORS depending on JUnit version?
@@ -118,7 +118,7 @@ public class JUnitTestRunnerTest {
     // check that JUnit 4 synthetic AssertionFailedError gets message and cause from AssertionError
     @Test
     public void testJUnit4AssertionError() {
-        TestRunner runner = createRunnerForTestMethod(AssertionErrorTest.class,"throwsAssertionError");
+        TestRunner runner = createRunnerForTestMethod(AssertionErrorTest.class, "throwsAssertionError");
         runner.run();
 
         AssertionFailedError failure = runner.getFormatter().getFailure();
@@ -140,7 +140,7 @@ public class JUnitTestRunnerTest {
     }
 
     // the test runner that wrap the dummy formatter that interests us
-    private final static class TestRunner extends JUnitTestRunner {
+    private static final class TestRunner extends JUnitTestRunner {
         private ResultFormatter formatter = new ResultFormatter();
         TestRunner(JUnitTest test, String[] methods, boolean haltonerror,
                    boolean filtertrace, boolean haltonfailure) {
@@ -157,16 +157,16 @@ public class JUnitTestRunnerTest {
     }
 
     // dummy formatter just to catch the error
-    private final static class ResultFormatter implements JUnitResultFormatter {
+    private static final class ResultFormatter implements JUnitResultFormatter {
         private AssertionFailedError failure;
         private Throwable error;
         public void setSystemOutput(String output) {
         }
         public void setSystemError(String output) {
         }
-        public void startTestSuite(JUnitTest suite) throws BuildException{
+        public void startTestSuite(JUnitTest suite) throws BuildException {
         }
-        public void endTestSuite(JUnitTest suite) throws BuildException{
+        public void endTestSuite(JUnitTest suite) throws BuildException {
         }
         public void setOutput(OutputStream out) {
         }

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/XMLFormatterWithCDATAOnSystemOut.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/XMLFormatterWithCDATAOnSystemOut.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/XMLFormatterWithCDATAOnSystemOut.java
index 3f464d8..1221ba4 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/XMLFormatterWithCDATAOnSystemOut.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/XMLFormatterWithCDATAOnSystemOut.java
@@ -34,21 +34,21 @@ public class XMLFormatterWithCDATAOnSystemOut {
     private static final String REPORT =
         "TEST-" + XMLFormatterWithCDATAOnSystemOut.class.getName() + ".xml";
 
-    private static final String TESTDATA =
-        "<ERROR>" +
-        "<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
-        "  <RESPONSE>" +
-        "    <GDS/>" +
-        "    <ERROR>" +
-        "      <ID/>" +
-        "      <MESSAGE/>" +
-        "      <REQUEST_TYPE/>" +
-        "      <RESEND/>" +
-        "      <RAW_RESPONSE/>" +
-        "    </ERROR>" +
-        "  </RESPONSE>" +
-        "]]>" +
-        "</ERROR>";
+    private static final String TESTDATA
+        = "<ERROR>"
+        + "<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+        + "  <RESPONSE>"
+        + "    <GDS/>"
+        + "    <ERROR>"
+        + "      <ID/>"
+        + "      <MESSAGE/>"
+        + "      <REQUEST_TYPE/>"
+        + "      <RESEND/>"
+        + "      <RAW_RESPONSE/>"
+        + "    </ERROR>"
+        + "  </RESPONSE>"
+        + "]]>"
+        + "</ERROR>";
 
     @Rule
     public BuildFileRule buildRule = new BuildFileRule();

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java
index f8c89f2..9ee8575 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java
@@ -216,8 +216,8 @@ public class FTPTest {
         FileSet fsDestination = (FileSet) buildRule.getProject().getReference("fileset-destination-without-selector");
         DirectoryScanner dsDestination = fsDestination.getDirectoryScanner(buildRule.getProject());
         dsDestination.scan();
-        String [] sortedDestinationDirectories = dsDestination.getIncludedDirectories();
-        String [] sortedDestinationFiles = dsDestination.getIncludedFiles();
+        String[] sortedDestinationDirectories = dsDestination.getIncludedDirectories();
+        String[] sortedDestinationFiles = dsDestination.getIncludedFiles();
         for (int counter = 0; counter < sortedDestinationDirectories.length; counter++) {
             sortedDestinationDirectories[counter] =
                 sortedDestinationDirectories[counter].replace(File.separatorChar, '/');
@@ -306,8 +306,8 @@ public class FTPTest {
     public void testOrderOfIncludePatternsIrrelevant() {
         Assume.assumeTrue(loginFailureMessage, loginSucceeded);
         Assume.assumeTrue("Could not change remote directory", changeRemoteDir(remoteTmpDir));
-        String [] expectedFiles = {"alpha/beta/beta.xml", "alpha/beta/gamma/gamma.xml"};
-        String [] expectedDirectories = {"alpha/beta", "alpha/beta/gamma" };
+        String[] expectedFiles = {"alpha/beta/beta.xml", "alpha/beta/gamma/gamma.xml"};
+        String[] expectedDirectories = {"alpha/beta", "alpha/beta/gamma" };
         FTP.FTPDirectoryScanner ds = myFTPTask.newScanner(ftp);
         ds.setBasedir(new File(buildRule.getProject().getBaseDir(), "tmp"));
         ds.setIncludes(new String[] {"alpha/be?a/**", "alpha/beta/gamma/"});
@@ -797,12 +797,12 @@ public class FTPTest {
 
     @Test
     public void testInitialCommand() {
-        performCommandTest("test-initial-command", new int[] { 1,0 });
+        performCommandTest("test-initial-command", new int[] {1, 0});
     }
 
     @Test
     public void testSiteAction() {
-        performCommandTest("test-site-action", new int[] { 1,0 });
+        performCommandTest("test-site-action", new int[] {1, 0});
     }
 
     private void performCommandTest(String target, int[] expectedCounts) {

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/script/ScriptDefTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/script/ScriptDefTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/script/ScriptDefTest.java
index 5d4d4cf..66e6567 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/script/ScriptDefTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/script/ScriptDefTest.java
@@ -117,10 +117,8 @@ public class ScriptDefTest {
     public void testDoubleDef() {
         buildRule.executeTarget("doubledef");
         String log = buildRule.getLog();
-        assertTrue("Task1 did not execute",
-            log.indexOf("Task1") != -1);
-        assertTrue("Task2 did not execute",
-            log.indexOf("Task2") != -1);
+        assertTrue("Task1 did not execute", log.indexOf("Task1") != -1);
+        assertTrue("Task2 did not execute", log.indexOf("Task2") != -1);
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/sos/SOSTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/sos/SOSTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/sos/SOSTest.java
index 1354e52..3e8caf5 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/sos/SOSTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/sos/SOSTest.java
@@ -180,7 +180,7 @@ public class SOSTest {
                 "-recursive", "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME,
                 "-password", "", "-database", VSS_SERVER_PATH, "-project",
                 DS_VSS_PROJECT_PATH, "", "", "-soshome", SOS_HOME, "-workdir",
-                project.getBaseDir().getAbsolutePath(), "-log", SRC_COMMENT,};
+                project.getBaseDir().getAbsolutePath(), "-log", SRC_COMMENT};
 
         // Set up a SOSCheckin task
         SOSCheckin sosCheckin = new SOSCheckin();

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/ssh/ScpTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/ssh/ScpTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/ssh/ScpTest.java
index e19a37a..f32b4ff 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/ssh/ScpTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/ssh/ScpTest.java
@@ -95,8 +95,8 @@ public class ScpTest {
         scpTask.setTodir(sshHostUri);
         scpTask.execute();
 
-        File testFile = new File(tempDir.getPath() + File.separator +
-                "download-testSingleFileUploadAndDownload.test");
+        File testFile = new File(tempDir.getPath() + File.separator
+                + "download-testSingleFileUploadAndDownload.test");
         addCleanup(testFile);
         assertFalse("Assert that the testFile does not exist.", testFile.exists());
 

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/taskdefs/optional/vss/MSVSSTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/vss/MSVSSTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/vss/MSVSSTest.java
index 772c6c1..5d27f57 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/vss/MSVSSTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/vss/MSVSSTest.java
@@ -377,8 +377,8 @@ public class MSVSSTest implements MSVSSConstants {
     @Test
     public void testCpCommandLine() {
         String[] sTestCmdLine = {MSVSS.SS_EXE, MSVSS.COMMAND_CP,
-                DS_VSS_PROJECT_PATH, MSVSS.FLAG_AUTORESPONSE_DEF, MSVSS.FLAG_LOGIN +
-                VSS_USERNAME};
+                DS_VSS_PROJECT_PATH, MSVSS.FLAG_AUTORESPONSE_DEF,
+                MSVSS.FLAG_LOGIN + VSS_USERNAME};
 
         // Set up a VSSCp task
         MSVSSCP vssCp = new MSVSSCP();
@@ -403,7 +403,7 @@ public class MSVSSTest implements MSVSSConstants {
     /**  Tests Create commandline generation.  */
     @Test
     public void testCreateCommandLine() {
-        String[] sTestCmdLine = { MSVSS.SS_EXE, MSVSS.COMMAND_CREATE,
+        String[] sTestCmdLine = {MSVSS.SS_EXE, MSVSS.COMMAND_CREATE,
                 DS_VSS_PROJECT_PATH, MSVSS.FLAG_COMMENT + SRC_COMMENT, MSVSS.FLAG_AUTORESPONSE_NO,
                 MSVSS.FLAG_QUIET, MSVSS.FLAG_LOGIN + VSS_USERNAME};
 

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/types/CommandlineTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/types/CommandlineTest.java b/src/tests/junit/org/apache/tools/ant/types/CommandlineTest.java
index 6807a33..4ba00bb 100644
--- a/src/tests/junit/org/apache/tools/ant/types/CommandlineTest.java
+++ b/src/tests/junit/org/apache/tools/ant/types/CommandlineTest.java
@@ -58,8 +58,7 @@ public class CommandlineTest {
 
         s = Commandline.translateCommandline("1 \"2\'3\" 4");
         assertEquals("Case with double quotes around single quote", 3, s.length);
-        assertEquals("Double quotes stripped, single quote included", "2\'3",
-                     s[1]);
+        assertEquals("Double quotes stripped, single quote included", "2\'3", s[1]);
 
         s = Commandline.translateCommandline("1 \'2 3\' 4");
         assertEquals("Case with single quotes and whitespace", 3, s.length);
@@ -67,8 +66,7 @@ public class CommandlineTest {
 
         s = Commandline.translateCommandline("1 \'2\"3\' 4");
         assertEquals("Case with single quotes around double quote", 3, s.length);
-        assertEquals("Single quotes stripped, double quote included", "2\"3",
-                     s[1]);
+        assertEquals("Single quotes stripped, double quote included", "2\"3", s[1]);
 
         // \ doesn't have a special meaning anymore - this is different from
         // what the Unix sh does but causes a lot of problems on DOS

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/types/EnumeratedAttributeTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/types/EnumeratedAttributeTest.java b/src/tests/junit/org/apache/tools/ant/types/EnumeratedAttributeTest.java
index af1a88b..14436de 100644
--- a/src/tests/junit/org/apache/tools/ant/types/EnumeratedAttributeTest.java
+++ b/src/tests/junit/org/apache/tools/ant/types/EnumeratedAttributeTest.java
@@ -49,7 +49,7 @@ public class EnumeratedAttributeTest {
 
     @Test
     public void testFactory() {
-        Factory ea = (Factory)EnumeratedAttribute.getInstance(Factory.class, "one");
+        Factory ea = (Factory) EnumeratedAttribute.getInstance(Factory.class, "one");
         assertEquals("Factory did not set the right value.", ea.getValue(), "one");
         try {
             EnumeratedAttribute.getInstance(Factory.class, "illegal");
@@ -98,7 +98,7 @@ public class EnumeratedAttributeTest {
 
     public static class Factory extends EnumeratedAttribute {
         public String[] getValues() {
-            return new String[] { "one", "two", "three" };
+            return new String[] {"one", "two", "three"};
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/types/FilterSetTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/types/FilterSetTest.java b/src/tests/junit/org/apache/tools/ant/types/FilterSetTest.java
index 7cf905e..68c1754 100644
--- a/src/tests/junit/org/apache/tools/ant/types/FilterSetTest.java
+++ b/src/tests/junit/org/apache/tools/ant/types/FilterSetTest.java
@@ -40,7 +40,7 @@ import static org.junit.Assert.fail;
  */
 public class FilterSetTest {
 
-    static private final int BUF_SIZE = 32768;
+    private static final int BUF_SIZE = 32768;
 
     @Rule
     public BuildFileRule buildRule = new BuildFileRule();
@@ -87,7 +87,7 @@ public class FilterSetTest {
         String line = "@test@ line";
         FilterSet fs = new FilterSet();
         fs.addFilter("test", "@test1@");
-        fs.addFilter("test1","@test2@");
+        fs.addFilter("test1", "@test2@");
         fs.addFilter("test2", "it works");
         fs.setBeginToken("@");
         fs.setEndToken("@");
@@ -104,7 +104,7 @@ public class FilterSetTest {
         String line = "@test@ line @test3@";
         FilterSet fs = new FilterSet();
         fs.addFilter("test", "@test1@");
-        fs.addFilter("test1","@test2@");
+        fs.addFilter("test1", "@test2@");
         fs.addFilter("test2", "@test@");
         fs.addFilter("test3", "testvalue");
         fs.setBeginToken("@");
@@ -122,7 +122,7 @@ public class FilterSetTest {
         String line = "@test@ line @test2@";
         FilterSet fs = new FilterSet();
         fs.addFilter("test", "@test1@");
-        fs.addFilter("test1","@test@");
+        fs.addFilter("test1", "@test@");
         fs.addFilter("test2", "testvalue");
         fs.setBeginToken("@");
         fs.setEndToken("@");

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/types/PatternSetTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/types/PatternSetTest.java b/src/tests/junit/org/apache/tools/ant/types/PatternSetTest.java
index 1dbacfc..a4f27b0 100644
--- a/src/tests/junit/org/apache/tools/ant/types/PatternSetTest.java
+++ b/src/tests/junit/org/apache/tools/ant/types/PatternSetTest.java
@@ -199,7 +199,7 @@ public class PatternSetTest {
         String[] excludes = p.getExcludePatterns(project);
         String[] includes = p.getIncludePatterns(project);
 
-        assertEquals("Includes","**/*.java", includes[0]);
-        assertEquals("Excludes","**/*.class", excludes[0]);
+        assertEquals("Includes", "**/*.java", includes[0]);
+        assertEquals("Excludes", "**/*.class", excludes[0]);
     }
 }

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/types/TarFileSetTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/types/TarFileSetTest.java b/src/tests/junit/org/apache/tools/ant/types/TarFileSetTest.java
index 28251e0..391e248 100644
--- a/src/tests/junit/org/apache/tools/ant/types/TarFileSetTest.java
+++ b/src/tests/junit/org/apache/tools/ant/types/TarFileSetTest.java
@@ -104,7 +104,7 @@ public class TarFileSetTest extends AbstractFileSetTest {
         f.setPrefix("/examples");
         f.setFileMode("600");
         f.setDirMode("530");
-        getProject().addReference("test",f);
+        getProject().addReference("test", f);
         TarFileSet zid = (TarFileSet) getInstance();
         zid.setRefid(new Reference(getProject(), "test"));
         assertTrue("src attribute copied by copy constructor",

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java b/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java
index e2df448..961e55d 100644
--- a/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java
+++ b/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java
@@ -91,8 +91,7 @@ public class XMLCatalogTest {
             Source result = catalog.resolve("i/dont/exist.dtd", null);
             String expected = toURLString(new File(project.getBaseDir() +
                                                    "/i/dont/exist.dtd"));
-            String resultStr =
-                fileURLPartWithoutLeadingSlashes((SAXSource)result);
+            String resultStr = fileURLPartWithoutLeadingSlashes((SAXSource) result);
             assertTrue("Empty catalog should return input with a system ID like "
                        + expected + " but was " + resultStr,
                        expected.endsWith(resultStr));
@@ -131,8 +130,7 @@ public class XMLCatalogTest {
         Source result = catalog.resolve("i/dont/exist.dtd", null);
         String expected = toURLString(new File(project.getBaseDir().toURL() +
                                                "/i/dont/exist.dtd"));
-        String resultStr =
-            fileURLPartWithoutLeadingSlashes((SAXSource)result);
+        String resultStr = fileURLPartWithoutLeadingSlashes((SAXSource) result);
         assertTrue("Nonexistent Catalog entry return input with a system ID like "
                    + expected + " but was " + resultStr,
                    expected.endsWith(resultStr));

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/types/ZipFileSetTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/types/ZipFileSetTest.java b/src/tests/junit/org/apache/tools/ant/types/ZipFileSetTest.java
index d89b0bd..c89b420 100644
--- a/src/tests/junit/org/apache/tools/ant/types/ZipFileSetTest.java
+++ b/src/tests/junit/org/apache/tools/ant/types/ZipFileSetTest.java
@@ -103,7 +103,7 @@ public class ZipFileSetTest extends AbstractFileSetTest {
         f.setPrefix("/examples");
         f.setFileMode("600");
         f.setDirMode("530");
-        getProject().addReference("test",f);
+        getProject().addReference("test", f);
         ZipFileSet zid = (ZipFileSet) getInstance();
         zid.setRefid(new Reference(getProject(), "test"));
         assertTrue("src attribute copied by copy constructor",

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/types/mappers/MapperResult.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/types/mappers/MapperResult.java b/src/tests/junit/org/apache/tools/ant/types/mappers/MapperResult.java
index a52cabf..8382e05 100644
--- a/src/tests/junit/org/apache/tools/ant/types/mappers/MapperResult.java
+++ b/src/tests/junit/org/apache/tools/ant/types/mappers/MapperResult.java
@@ -90,14 +90,7 @@ public class MapperResult extends Task {
             flattened = b.toString();
         }
         if (!flattened.equals(output)) {
-            throw new BuildException(
-                failMessage
-                + " "
-                + "got "
-                + flattened
-                + " "
-                + "expected "
-                + output);
+            throw new BuildException(failMessage + " got " + flattened + " expected " + output);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/types/optional/depend/ClassFileSetTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/types/optional/depend/ClassFileSetTest.java b/src/tests/junit/org/apache/tools/ant/types/optional/depend/ClassFileSetTest.java
index 392667c..ce86f06 100644
--- a/src/tests/junit/org/apache/tools/ant/types/optional/depend/ClassFileSetTest.java
+++ b/src/tests/junit/org/apache/tools/ant/types/optional/depend/ClassFileSetTest.java
@@ -55,7 +55,7 @@ public class ClassFileSetTest {
     public void testBasicSet() {
         Project p = buildRule.getProject();
         buildRule.executeTarget("testbasicset");
-        FileSet resultFileSet = (FileSet)p.getReference(RESULT_FILESET);
+        FileSet resultFileSet = p.getReference(RESULT_FILESET);
         DirectoryScanner scanner = resultFileSet.getDirectoryScanner(p);
         String[] scannedFiles = scanner.getIncludedFiles();
         Hashtable files = new Hashtable();
@@ -81,7 +81,7 @@ public class ClassFileSetTest {
     public void testSmallSet() {
         Project p = buildRule.getProject();
         buildRule.executeTarget("testsmallset");
-        FileSet resultFileSet = (FileSet)p.getReference(RESULT_FILESET);
+        FileSet resultFileSet = p.getReference(RESULT_FILESET);
         DirectoryScanner scanner = resultFileSet.getDirectoryScanner(p);
         String[] scannedFiles = scanner.getIncludedFiles();
         Hashtable files = new Hashtable();
@@ -103,7 +103,7 @@ public class ClassFileSetTest {
     public void testComboSet() {
         Project p = buildRule.getProject();
         buildRule.executeTarget("testcomboset");
-        FileSet resultFileSet = (FileSet)p.getReference(RESULT_FILESET);
+        FileSet resultFileSet = p.getReference(RESULT_FILESET);
         DirectoryScanner scanner = resultFileSet.getDirectoryScanner(p);
         String[] scannedFiles = scanner.getIncludedFiles();
         Hashtable files = new Hashtable();
@@ -131,7 +131,7 @@ public class ClassFileSetTest {
     public void testMethodParam() {
         Project p = buildRule.getProject();
         buildRule.executeTarget("testmethodparam");
-        FileSet resultFileSet = (FileSet)p.getReference(RESULT_FILESET);
+        FileSet resultFileSet = p.getReference(RESULT_FILESET);
         DirectoryScanner scanner = resultFileSet.getDirectoryScanner(p);
         String[] scannedFiles = scanner.getIncludedFiles();
         Hashtable files = new Hashtable();
@@ -159,7 +159,7 @@ public class ClassFileSetTest {
     public void testMethodParamInner() {
         Project p = buildRule.getProject();
         buildRule.executeTarget("testmethodparaminner");
-        FileSet resultFileSet = (FileSet)p.getReference(RESULT_FILESET);
+        FileSet resultFileSet = p.getReference(RESULT_FILESET);
         DirectoryScanner scanner = resultFileSet.getDirectoryScanner(p);
         String[] scannedFiles = scanner.getIncludedFiles();
         Hashtable files = new Hashtable();

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/types/resources/LazyResourceCollectionTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/types/resources/LazyResourceCollectionTest.java b/src/tests/junit/org/apache/tools/ant/types/resources/LazyResourceCollectionTest.java
index 9e99872..3a2a7ec 100644
--- a/src/tests/junit/org/apache/tools/ant/types/resources/LazyResourceCollectionTest.java
+++ b/src/tests/junit/org/apache/tools/ant/types/resources/LazyResourceCollectionTest.java
@@ -81,8 +81,7 @@ public class LazyResourceCollectionTest {
 
         Iterator<Resource> it = lazyCollection.iterator();
         assertOneCreatedIterator(collectionTest);
-        StringResourceIterator stringResourceIterator = (StringResourceIterator) collectionTest.createdIterators
-                .get(0);
+        StringResourceIterator stringResourceIterator = (StringResourceIterator) collectionTest.createdIterators.get(0);
         assertEquals("A resource was loaded without iterating", 1,
                 stringResourceIterator.cursor);
 
@@ -130,8 +129,7 @@ public class LazyResourceCollectionTest {
         Iterator<Resource> it2 = lazyCollection.iterator();
         assertOneCreatedIterator(collectionTest);
 
-        StringResourceIterator stringResourceIterator = (StringResourceIterator) collectionTest.createdIterators
-                .get(0);
+        StringResourceIterator stringResourceIterator = (StringResourceIterator) collectionTest.createdIterators.get(0);
         assertEquals("A resource was loaded without iterating", 1,
                 stringResourceIterator.cursor);
 
@@ -142,8 +140,7 @@ public class LazyResourceCollectionTest {
 
         r = (StringResource) it2.next();
         assertEquals("r1", r.getValue());
-        assertEquals(
-                "The second iterator did not lookup in the cache for a resource",
+        assertEquals("The second iterator did not lookup in the cache for a resource",
                 2, stringResourceIterator.cursor);
 
         r = (StringResource) it2.next();
@@ -153,8 +150,7 @@ public class LazyResourceCollectionTest {
 
         r = (StringResource) it1.next();
         assertEquals("r2", r.getValue());
-        assertEquals(
-                "The first iterator did not lookup in the cache for a resource",
+        assertEquals("The first iterator did not lookup in the cache for a resource",
                 3, stringResourceIterator.cursor);
 
         r = (StringResource) it2.next();
@@ -164,8 +160,7 @@ public class LazyResourceCollectionTest {
 
         r = (StringResource) it1.next();
         assertEquals("r3", r.getValue());
-        assertEquals(
-                "The first iterator did not lookup in the cache for a resource",
+        assertEquals("The first iterator did not lookup in the cache for a resource",
                 3, stringResourceIterator.cursor);
 
         try {

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorRule.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorRule.java b/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorRule.java
index 64bf741..735a4dd 100644
--- a/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorRule.java
+++ b/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorRule.java
@@ -33,11 +33,11 @@ public class BaseSelectorRule extends BuildFileRule {
 
     private File beddir;
     private File mirrordir;
-    private final String[] filenames = {".","asf-logo.gif.md5","asf-logo.gif.bz2",
-            "asf-logo.gif.gz","copy.filterset.filtered","zip/asf-logo.gif.zip",
-            "tar/asf-logo.gif.tar","tar/asf-logo-huge.tar.gz",
-            "tar/gz/asf-logo.gif.tar.gz","tar/bz2/asf-logo.gif.tar.bz2",
-            "tar/bz2/asf-logo-huge.tar.bz2","tar/bz2"};
+    private final String[] filenames = {".", "asf-logo.gif.md5", "asf-logo.gif.bz2",
+            "asf-logo.gif.gz", "copy.filterset.filtered", "zip/asf-logo.gif.zip",
+            "tar/asf-logo.gif.tar", "tar/asf-logo-huge.tar.gz",
+            "tar/gz/asf-logo.gif.tar.gz", "tar/bz2/asf-logo.gif.tar.bz2",
+            "tar/bz2/asf-logo-huge.tar.bz2", "tar/bz2"};
     private File[] files = new File[filenames.length];
     private File[] mirrorfiles = new File[filenames.length];
 
@@ -54,8 +54,8 @@ public class BaseSelectorRule extends BuildFileRule {
         mirrordir = new File(super.getProject().getProperty("mirror.dir"));
 
         for (int x = 0; x < files.length; x++) {
-            files[x] = new File(beddir,filenames[x]);
-            mirrorfiles[x] = new File(mirrordir,filenames[x]);
+            files[x] = new File(beddir, filenames[x]);
+            mirrorfiles[x] = new File(mirrordir, filenames[x]);
         }
     }
 
@@ -90,7 +90,7 @@ public class BaseSelectorRule extends BuildFileRule {
      * @param selector FileSelector
      */
     public String selectionString(FileSelector selector) {
-        return selectionString(beddir,files,selector);
+        return selectionString(beddir, files, selector);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorTest.java b/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorTest.java
index 34c135a..8133308 100644
--- a/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorTest.java
+++ b/src/tests/junit/org/apache/tools/ant/types/selectors/BaseSelectorTest.java
@@ -39,11 +39,11 @@ public abstract class BaseSelectorTest extends BuildFileTest {
     protected File basedir;
     protected File beddir;
     protected File mirrordir;
-    protected String[] filenames = {".","asf-logo.gif.md5","asf-logo.gif.bz2",
-            "asf-logo.gif.gz","copy.filterset.filtered","zip/asf-logo.gif.zip",
-            "tar/asf-logo.gif.tar","tar/asf-logo-huge.tar.gz",
-            "tar/gz/asf-logo.gif.tar.gz","tar/bz2/asf-logo.gif.tar.bz2",
-            "tar/bz2/asf-logo-huge.tar.bz2","tar/bz2"};
+    protected String[] filenames = {".", "asf-logo.gif.md5", "asf-logo.gif.bz2",
+            "asf-logo.gif.gz", "copy.filterset.filtered", "zip/asf-logo.gif.zip",
+            "tar/asf-logo.gif.tar", "tar/asf-logo-huge.tar.gz",
+            "tar/gz/asf-logo.gif.tar.gz", "tar/bz2/asf-logo.gif.tar.bz2",
+            "tar/bz2/asf-logo-huge.tar.bz2", "tar/bz2"};
     protected File[] files = new File[filenames.length];
     protected File[] mirrorfiles = new File[filenames.length];
 
@@ -61,8 +61,8 @@ public abstract class BaseSelectorTest extends BuildFileTest {
         project.init();
         project.setBaseDir(basedir);
         for (int x = 0; x < files.length; x++) {
-            files[x] = new File(beddir,filenames[x]);
-            mirrorfiles[x] = new File(mirrordir,filenames[x]);
+            files[x] = new File(beddir, filenames[x]);
+            mirrorfiles[x] = new File(mirrordir, filenames[x]);
         }
     }
 
@@ -100,7 +100,7 @@ public abstract class BaseSelectorTest extends BuildFileTest {
         }
         s.setError("test error");
         try {
-            s.isSelected(beddir,filenames[0],files[0]);
+            s.isSelected(beddir, filenames[0], files[0]);
             fail("Cannot cause BuildException when setError() is called");
         } catch (BuildException be) {
             assertEquals("test error",
@@ -117,7 +117,7 @@ public abstract class BaseSelectorTest extends BuildFileTest {
      * @param selector FileSelector
      */
     public String selectionString(FileSelector selector) {
-        return selectionString(beddir,files,selector);
+        return selectionString(beddir, files, selector);
     }
 
     /**
@@ -130,7 +130,7 @@ public abstract class BaseSelectorTest extends BuildFileTest {
      * @param selector FileSelector
      */
     public String mirrorSelectionString(FileSelector selector) {
-        return selectionString(mirrordir,mirrorfiles,selector);
+        return selectionString(mirrordir, mirrorfiles, selector);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/types/selectors/DateSelectorTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/types/selectors/DateSelectorTest.java b/src/tests/junit/org/apache/tools/ant/types/selectors/DateSelectorTest.java
index f1d7ca9..ec3ea89 100644
--- a/src/tests/junit/org/apache/tools/ant/types/selectors/DateSelectorTest.java
+++ b/src/tests/junit/org/apache/tools/ant/types/selectors/DateSelectorTest.java
@@ -197,7 +197,7 @@ public class DateSelectorTest {
         param1.setValue("11/21/2001 4:56 AM");
         param2.setName("when");
         param2.setValue("after");
-        Parameter[] params = {param1,param2};
+        Parameter[] params = {param1, param2};
         s.setParameters(params);
         results = selectorRule.selectionString(s);
         assertEquals("TFFTFTTTFFFT", results);

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java b/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java
index bac4895..e9591b5 100644
--- a/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java
+++ b/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java
@@ -240,7 +240,7 @@ public class ModifiedSelectorTest {
         sel.configure();
 
         // get the cache, so we can check our things
-        MockCache cache = (MockCache)sel.getCache();
+        MockCache cache = (MockCache) sel.getCache();
 
         // the test
         assertFalse("Cache must not be saved before 1st selection.", cache.saved);
@@ -757,11 +757,11 @@ public class ModifiedSelectorTest {
 
             s.addParam(createParam("cache.cachefile", cachefile));
             //s.addParam(createParam("algorithm.provider","---")); // i don't know any valid
-            s.addParam(createParam("cache","propertyfile"));
-            s.addParam(createParam("update","true"));
-            s.addParam(createParam("comparator","rule"));
-            s.addParam(createParam("algorithm.name","sha"));
-            s.addParam(createParam("algorithm","digest"));
+            s.addParam(createParam("cache", "propertyfile"));
+            s.addParam(createParam("update", "true"));
+            s.addParam(createParam("comparator", "rule"));
+            s.addParam(createParam("algorithm.name", "sha"));
+            s.addParam(createParam("algorithm", "digest"));
 
             // first and second run
             performTests(s, "TTTTTTTTTTTT");
@@ -889,7 +889,9 @@ public class ModifiedSelectorTest {
         }
 
         public void doTarget(String target) {
-            if (!isConfigured) setUp();
+            if (!isConfigured) {
+                setUp();
+            }
             executeTarget(target);
         }
 
@@ -898,7 +900,9 @@ public class ModifiedSelectorTest {
         }
 
         public void writeProperties(String line) {
-            if (!isConfigured) setUp();
+            if (!isConfigured) {
+                setUp();
+            }
             File dir = getProject().getBaseDir();
             File file = new File(dir, propfile);
             try {

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/types/selectors/README
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/types/selectors/README b/src/tests/junit/org/apache/tools/ant/types/selectors/README
index eb48f6b..f44ac9a 100644
--- a/src/tests/junit/org/apache/tools/ant/types/selectors/README
+++ b/src/tests/junit/org/apache/tools/ant/types/selectors/README
@@ -37,20 +37,20 @@ the following code:
             makeBed();
 
 
-            s = (DepthSelector)getInstance();
+            s = (DepthSelector) getInstance();
             s.setMin(20);
             s.setMax(25);
             results = selectionString(s);
             assertEquals("FFFFFFFFFFFF", results);
 
 
-            s = (DepthSelector)getInstance();
+            s = (DepthSelector) getInstance();
             s.setMin(0);
             results = selectionString(s);
             assertEquals("TTTTTTTTTTTT", results);
 
 
-            s = (DepthSelector)getInstance();
+            s = (DepthSelector) getInstance();
             s.setMin(1);
             results = selectionString(s);
             assertEquals("FFFFFTTTTTTT", results);

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/types/selectors/SizeSelectorTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/types/selectors/SizeSelectorTest.java b/src/tests/junit/org/apache/tools/ant/types/selectors/SizeSelectorTest.java
index 467b42a..38179c3 100644
--- a/src/tests/junit/org/apache/tools/ant/types/selectors/SizeSelectorTest.java
+++ b/src/tests/junit/org/apache/tools/ant/types/selectors/SizeSelectorTest.java
@@ -180,7 +180,7 @@ public class SizeSelectorTest {
         param2.setValue("Ki");
         param3.setName("when");
         param3.setValue("more");
-        Parameter[] params = {param1,param2,param3};
+        Parameter[] params = {param1, param2, param3};
         s.setParameters(params);
         results = selectorRule.selectionString(s);
         assertEquals("TFFFFFFTFFTT", results);

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/types/selectors/TypeSelectorTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/types/selectors/TypeSelectorTest.java b/src/tests/junit/org/apache/tools/ant/types/selectors/TypeSelectorTest.java
index 1124a48..f6be240 100644
--- a/src/tests/junit/org/apache/tools/ant/types/selectors/TypeSelectorTest.java
+++ b/src/tests/junit/org/apache/tools/ant/types/selectors/TypeSelectorTest.java
@@ -42,7 +42,7 @@ public class TypeSelectorTest {
         TypeSelector s = new TypeSelector();
         try {
             s.isSelected(selectorRule.getProject().getBaseDir(),
-                    selectorRule.getFilenames()[0],selectorRule.getFiles()[0]);
+                    selectorRule.getFilenames()[0], selectorRule.getFiles()[0]);
             fail("TypeSelector did not check for required fields");
         } catch (BuildException be1) {
             assertEquals("The type attribute is required", be1.getMessage());

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/util/Base64ConverterTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/util/Base64ConverterTest.java b/src/tests/junit/org/apache/tools/ant/util/Base64ConverterTest.java
index 48a4cbd..61fdfba 100644
--- a/src/tests/junit/org/apache/tools/ant/util/Base64ConverterTest.java
+++ b/src/tests/junit/org/apache/tools/ant/util/Base64ConverterTest.java
@@ -29,9 +29,9 @@ public class Base64ConverterTest {
 
     @Test
     public void testOneValue() {
-        byte[] mybytes = {0, 0, (byte)0xFF};
+        byte[] mybytes = {0, 0, (byte) 0xFF};
         Base64Converter base64Converter = new Base64Converter();
-        assertEquals("AAD/",base64Converter.encode(mybytes));
+        assertEquals("AAD/", base64Converter.encode(mybytes));
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/util/DateUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/util/DateUtilsTest.java b/src/tests/junit/org/apache/tools/ant/util/DateUtilsTest.java
index e7edf23..ca223d9 100644
--- a/src/tests/junit/org/apache/tools/ant/util/DateUtilsTest.java
+++ b/src/tests/junit/org/apache/tools/ant/util/DateUtilsTest.java
@@ -56,7 +56,7 @@ public class DateUtilsTest {
     public void testDateTimeISO() {
         TimeZone timeZone = TimeZone.getTimeZone("GMT+1");
         Calendar cal = Calendar.getInstance(timeZone);
-        cal.set(2002,1,23,10,11,12);
+        cal.set(2002, 1, 23, 10, 11, 12);
         String text = DateUtils.format(cal.getTime(),
                 DateUtils.ISO8601_DATETIME_PATTERN);
         assertEquals("2002-02-23T09:11:12", text);
@@ -66,7 +66,7 @@ public class DateUtilsTest {
     public void testDateISO() {
         TimeZone timeZone = TimeZone.getTimeZone("GMT");
         Calendar cal = Calendar.getInstance(timeZone);
-        cal.set(2002,1,23);
+        cal.set(2002, 1, 23);
         String text = DateUtils.format(cal.getTime(),
                 DateUtils.ISO8601_DATE_PATTERN);
         assertEquals("2002-02-23", text);
@@ -77,7 +77,7 @@ public class DateUtilsTest {
         // make sure that elapsed time in set via date works
         TimeZone timeZone = TimeZone.getTimeZone("GMT+1");
         Calendar cal = Calendar.getInstance(timeZone);
-        cal.set(2002,1,23, 21, 11, 12);
+        cal.set(2002, 1, 23, 21, 11, 12);
         String text = DateUtils.format(cal.getTime(),
                 DateUtils.ISO8601_TIME_PATTERN);
         assertEquals("20:11:12", text);

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/util/JavaEnvUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/util/JavaEnvUtilsTest.java b/src/tests/junit/org/apache/tools/ant/util/JavaEnvUtilsTest.java
index e26a7cb..cd479d5 100644
--- a/src/tests/junit/org/apache/tools/ant/util/JavaEnvUtilsTest.java
+++ b/src/tests/junit/org/apache/tools/ant/util/JavaEnvUtilsTest.java
@@ -19,14 +19,11 @@ package org.apache.tools.ant.util;
 
 import java.io.File;
 
-import junit.framework.AssertionFailedError;
-
 import org.apache.tools.ant.taskdefs.condition.Os;
 import org.junit.Assume;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assume.assumeTrue;
 
@@ -38,7 +35,6 @@ public class JavaEnvUtilsTest {
 
     private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
 
-
     @Test
     public void testGetExecutableNetware() {
         Assume.assumeTrue("Test only runs on netware", Os.isName("netware"));
@@ -51,33 +47,28 @@ public class JavaEnvUtilsTest {
     @Test
     public void testGetExecutableWindows() {
         Assume.assumeTrue("Test only runs on windows", Os.isFamily("windows"));
-        String javaHome =
-            FILE_UTILS.normalize(System.getProperty("java.home"))
+        String javaHome = FILE_UTILS.normalize(System.getProperty("java.home"))
             .getAbsolutePath();
 
         String j = JavaEnvUtils.getJreExecutable("java");
         assertTrue(j.endsWith(".exe"));
         assertTrue(j + " is absolute", (new File(j)).isAbsolute());
         try {
-            assertTrue(j + " is normalized and in the JRE dir",
-                       j.startsWith(javaHome));
-        } catch (AssertionFailedError e) {
+            assertTrue(j + " is normalized and in the JRE dir", j.startsWith(javaHome));
+        } catch (AssertionError e) {
             // java.home is bogus
             assertEquals("java.exe", j);
         }
 
         j = JavaEnvUtils.getJdkExecutable("javac");
         assertTrue(j.endsWith(".exe"));
+
         try {
             assertTrue(j + " is absolute", (new File(j)).isAbsolute());
-            String javaHomeParent =
-                FILE_UTILS.normalize(javaHome + "/..").getAbsolutePath();
-            assertTrue(j + " is normalized and in the JDK dir",
-                       j.startsWith(javaHomeParent));
-            assertTrue(j + " is normalized and not in the JRE dir",
-                       !j.startsWith(javaHome));
-
-        } catch (AssertionFailedError e) {
+            String javaHomeParent = FILE_UTILS.normalize(javaHome + "/..").getAbsolutePath();
+            assertTrue(j + " is normalized and in the JDK dir", j.startsWith(javaHomeParent));
+            assertTrue(j + " is normalized and not in the JRE dir", !j.startsWith(javaHome));
+        } catch (AssertionError e) {
             // java.home is bogus
             assertEquals("javac.exe", j);
         }
@@ -90,9 +81,7 @@ public class JavaEnvUtilsTest {
     public void testGetExecutableMostPlatforms() {
         Assume.assumeTrue("Test only runs on non Netware and non Windows systems",
                 !Os.isName("netware") && !Os.isFamily("windows"));
-        String javaHome =
-            FILE_UTILS.normalize(System.getProperty("java.home"))
-            .getAbsolutePath();
+        String javaHome = FILE_UTILS.normalize(System.getProperty("java.home")).getAbsolutePath();
 
         // could still be OS/2
         String extension = Os.isFamily("dos") ? ".exe" : "";
@@ -102,8 +91,7 @@ public class JavaEnvUtilsTest {
             assertTrue(j.endsWith(extension));
         }
         assertTrue(j + " is absolute", (new File(j)).isAbsolute());
-        assertTrue(j + " is normalized and in the JRE dir",
-                   j.startsWith(javaHome));
+        assertTrue(j + " is normalized and in the JRE dir", j.startsWith(javaHome));
 
         j = JavaEnvUtils.getJdkExecutable("javac");
         if (!extension.equals("")) {
@@ -111,30 +99,23 @@ public class JavaEnvUtilsTest {
         }
         assertTrue(j + " is absolute", (new File(j)).isAbsolute());
 
-        String javaHomeParent =
-            FILE_UTILS.normalize(javaHome + "/..").getAbsolutePath();
-        assertTrue(j + " is normalized and in the JDK dir",
-                   j.startsWith(javaHomeParent));
+        String javaHomeParent = FILE_UTILS.normalize(javaHome + "/..").getAbsolutePath();
+        assertTrue(j + " is normalized and in the JDK dir", j.startsWith(javaHomeParent));
 
         if ((Os.isFamily("mac") && JavaEnvUtils.getJavaVersionNumber() <= JavaEnvUtils.VERSION_1_6)
             || JavaEnvUtils.isAtLeastJavaVersion(JavaEnvUtils.JAVA_9)) {
-            assertTrue(j+" is normalized and in the JRE dir",
-                       j.startsWith(javaHome));
+            assertTrue(j + " is normalized and in the JRE dir", j.startsWith(javaHome));
         } else {
-            assertTrue(j+" is normalized and not in the JRE dir",
-                       !j.startsWith(javaHome));
+            assertTrue(j + " is normalized and not in the JRE dir", !j.startsWith(javaHome));
         }
 
-        assertEquals("foo" + extension,
-                     JavaEnvUtils.getJreExecutable("foo"));
-        assertEquals("foo" + extension,
-                     JavaEnvUtils.getJdkExecutable("foo"));
+        assertEquals("foo" + extension, JavaEnvUtils.getJreExecutable("foo"));
+        assertEquals("foo" + extension, JavaEnvUtils.getJdkExecutable("foo"));
     }
 
     @Test
     public void testIsAtLeastJavaVersion() {
-        assertTrue(
-                "Current java version is not at least the current java version...",
+        assertTrue("Current java version is not at least the current java version...",
                 JavaEnvUtils.isAtLeastJavaVersion(JavaEnvUtils.getJavaVersion()));
     }
 

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/ant/util/regexp/RegexpMatcherTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/util/regexp/RegexpMatcherTest.java b/src/tests/junit/org/apache/tools/ant/util/regexp/RegexpMatcherTest.java
index 77dbdac..5edaf57 100644
--- a/src/tests/junit/org/apache/tools/ant/util/regexp/RegexpMatcherTest.java
+++ b/src/tests/junit/org/apache/tools/ant/util/regexp/RegexpMatcherTest.java
@@ -25,7 +25,6 @@ import java.io.IOException;
 import java.util.Vector;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 /**
@@ -34,7 +33,7 @@ import static org.junit.Assert.assertTrue;
  */
 public abstract class RegexpMatcherTest {
 
-    public final static String UNIX_LINE = "\n";
+    public static final String UNIX_LINE = "\n";
 
     private RegexpMatcher reg;
 

http://git-wip-us.apache.org/repos/asf/ant/blob/5eef12a9/src/tests/junit/org/apache/tools/bzip2/BlockSortTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/bzip2/BlockSortTest.java b/src/tests/junit/org/apache/tools/bzip2/BlockSortTest.java
index e043f5d..ed0269e 100644
--- a/src/tests/junit/org/apache/tools/bzip2/BlockSortTest.java
+++ b/src/tests/junit/org/apache/tools/bzip2/BlockSortTest.java
@@ -25,8 +25,8 @@ import static org.junit.Assert.assertEquals;
 
 public class BlockSortTest {
 
-    private static final byte[] FIXTURE = { 0, 1, (byte) 252, (byte) 253, (byte) 255,
-                                            (byte) 254, 3, 2, (byte) 128 };
+    private static final byte[] FIXTURE = {0, 1, (byte) 252, (byte) 253, (byte) 255,
+                                           (byte) 254, 3, 2, (byte) 128};
 
     /*
       Burrows-Wheeler transform of fixture the manual way:
@@ -62,8 +62,8 @@ public class BlockSortTest {
         and the original line has been 0
     */
 
-    private static final byte[] FIXTURE_BWT = { (byte) 128, 0, 3, (byte) 254, 2, 1,
-                                                (byte) 252, (byte) 255, (byte) 253 };
+    private static final byte[] FIXTURE_BWT = {(byte) 128, 0, 3, (byte) 254, 2, 1,
+                                               (byte) 252, (byte) 255, (byte) 253};
 
     private static final int[] FIXTURE_SORTED = {
         0, 1, 7, 6, 8, 2, 3, 5, 4