ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject [01/10] ant git commit: Checkstyle: mostly whitespace (cf master)
Date Sat, 02 Dec 2017 17:43:26 GMT
Repository: ant
Updated Branches:
  refs/heads/master 866ce9f55 -> 22fb93b0c


http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/apache/tools/ant/util/StringUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/util/StringUtilsTest.java b/src/tests/junit/org/apache/tools/ant/util/StringUtilsTest.java
index bf5b0d4..59d3ec6 100644
--- a/src/tests/junit/org/apache/tools/ant/util/StringUtilsTest.java
+++ b/src/tests/junit/org/apache/tools/ant/util/StringUtilsTest.java
@@ -31,7 +31,7 @@ import static org.junit.Assert.assertTrue;
 public class StringUtilsTest {
 
     @Test
-    public void testSplit(){
+    public void testSplit() {
         final String data = "a,b,,";
         Vector res = StringUtils.split(data, ',');
         assertEquals(4, res.size());
@@ -42,7 +42,7 @@ public class StringUtilsTest {
     }
 
     @Test
-    public void testSplitLines(){
+    public void testSplitLines() {
         final String data = "a\r\nb\nc\nd\ne";
         Vector res = StringUtils.lineSplit(data);
         assertEquals(5, res.size());
@@ -62,42 +62,42 @@ public class StringUtilsTest {
 
     @Test
     public void testEndsWithBothEmpty() {
-        assertTrue( StringUtils.endsWith( new StringBuffer(), "") );
+        assertTrue(StringUtils.endsWith(new StringBuffer(), ""));
     }
 
     @Test
     public void testEndsWithEmptyString() {
-        assertTrue( StringUtils.endsWith( new StringBuffer("12234545"), "") );
+        assertTrue(StringUtils.endsWith(new StringBuffer("12234545"), ""));
     }
 
     @Test
     public void testEndsWithShorterString() {
-        assertTrue( StringUtils.endsWith( new StringBuffer("12345678"), "78"));
+        assertTrue(StringUtils.endsWith(new StringBuffer("12345678"), "78"));
     }
 
     @Test
     public void testEndsWithSameString() {
-        assertTrue( StringUtils.endsWith( new StringBuffer("123"), "123"));
+        assertTrue(StringUtils.endsWith(new StringBuffer("123"), "123"));
     }
 
     @Test
     public void testEndsWithLongerString() {
-        assertFalse( StringUtils.endsWith( new StringBuffer("12"), "1245"));
+        assertFalse(StringUtils.endsWith(new StringBuffer("12"), "1245"));
     }
 
     @Test
     public void testEndsWithNoMatch() {
-        assertFalse( StringUtils.endsWith( new StringBuffer("12345678"), "789"));
+        assertFalse(StringUtils.endsWith(new StringBuffer("12345678"), "789"));
     }
 
     @Test
     public void testEndsWithEmptyBuffer() {
-        assertFalse( StringUtils.endsWith( new StringBuffer(""), "12345667") );
+        assertFalse(StringUtils.endsWith(new StringBuffer(""), "12345667"));
     }
 
     @Test
     public void testEndsWithJDKPerf() {
-        StringBuffer buf = getFilledBuffer(1024*300, 'a');
+        StringBuffer buf = getFilledBuffer(1024 * 300, 'a');
         for (int i = 0; i < 1000; i++) {
             assertTrue(buf.toString().endsWith("aa"));
         }
@@ -105,7 +105,7 @@ public class StringUtilsTest {
 
     @Test
     public void testEndsWithPerf() {
-        StringBuffer buf = getFilledBuffer(1024*300, 'a');
+        StringBuffer buf = getFilledBuffer(1024 * 300, 'a');
         for (int i = 0; i < 1000; i++) {
             assertTrue(StringUtils.endsWith(buf, "aa"));
         }
@@ -113,7 +113,9 @@ public class StringUtilsTest {
 
     private StringBuffer getFilledBuffer(int size, char ch) {
         StringBuffer buf = new StringBuffer(size);
-        for (int i = 0; i < size; i++) { buf.append(ch); };
+        for (int i = 0; i < size; i++) {
+            buf.append(ch);
+        }
         return buf;
     }
 

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/apache/tools/ant/util/UnPackageNameMapperTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/util/UnPackageNameMapperTest.java b/src/tests/junit/org/apache/tools/ant/util/UnPackageNameMapperTest.java
index 7586950..c59154d 100644
--- a/src/tests/junit/org/apache/tools/ant/util/UnPackageNameMapperTest.java
+++ b/src/tests/junit/org/apache/tools/ant/util/UnPackageNameMapperTest.java
@@ -29,7 +29,7 @@ public class UnPackageNameMapperTest {
         UnPackageNameMapper mapper = new UnPackageNameMapper();
         mapper.setFrom("TEST-*.xml");
         mapper.setTo("*.java");
-        String file ="TEST-org.apache.tools.ant.util.UnPackageNameMapperTest.xml";
+        String file = "TEST-org.apache.tools.ant.util.UnPackageNameMapperTest.xml";
         String result = mapper.mapFileName(file)[0];
         String expected = fixupPath("org/apache/tools/ant/util/UnPackageNameMapperTest.java");
 

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaRegexpMatcherTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaRegexpMatcherTest.java
b/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaRegexpMatcherTest.java
index 3340b59..b93beb3 100644
--- a/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaRegexpMatcherTest.java
+++ b/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaRegexpMatcherTest.java
@@ -59,5 +59,6 @@ public class JakartaRegexpMatcherTest extends RegexpMatcherTest {
     /**
      * Fails for "default" mode.
      */
-    protected void doEndTest2(String text) {}
+    protected void doEndTest2(String text) {
+    }
 }

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaRegexpRegexpTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaRegexpRegexpTest.java
b/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaRegexpRegexpTest.java
index 078fbb1..8edc13c 100644
--- a/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaRegexpRegexpTest.java
+++ b/src/tests/junit/org/apache/tools/ant/util/regexp/JakartaRegexpRegexpTest.java
@@ -40,7 +40,7 @@ public class JakartaRegexpRegexpTest extends RegexpTest {
         try {
             super.testWindowsLineSeparator2();
             fail("Should trigger when this bug is fixed. {@since 1.2}");
-        } catch (AssertionFailedError e){
+        } catch (AssertionFailedError e) {
         }
     }
 
@@ -51,12 +51,13 @@ public class JakartaRegexpRegexpTest extends RegexpTest {
         try {
             super.testUnixLineSeparator();
             fail("Should trigger once this bug is fixed. {@since 1.2}");
-        } catch (AssertionFailedError e){
+        } catch (AssertionFailedError e) {
         }
     }
 
     /**
      * Fails for "default" mode.
      */
-    protected void doEndTest2(String text) {}
+    protected void doEndTest2(String text) {
+    }
 }

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcherTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcherTest.java
b/src/tests/junit/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcherTest.java
index c042e71..40f6dca 100644
--- a/src/tests/junit/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcherTest.java
+++ b/src/tests/junit/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcherTest.java
@@ -40,7 +40,7 @@ public class Jdk14RegexpMatcherTest extends RegexpMatcherTest {
         try {
             super.testParagraphCharacter();
             fail("Should trigger once fixed. {@since JDK 1.4RC1}");
-        } catch (AssertionFailedError e){
+        } catch (AssertionFailedError e) {
         }
     }
 
@@ -48,7 +48,7 @@ public class Jdk14RegexpMatcherTest extends RegexpMatcherTest {
         try {
             super.testLineSeparatorCharacter();
             fail("Should trigger once fixed. {@since JDK 1.4RC1}");
-        } catch (AssertionFailedError e){
+        } catch (AssertionFailedError e) {
         }
     }
 
@@ -56,7 +56,7 @@ public class Jdk14RegexpMatcherTest extends RegexpMatcherTest {
         try {
             super.testStandaloneCR();
             fail("Should trigger once fixed. {@since JDK 1.4RC1}");
-        } catch (AssertionFailedError e){
+        } catch (AssertionFailedError e) {
         }
     }
 
@@ -64,7 +64,7 @@ public class Jdk14RegexpMatcherTest extends RegexpMatcherTest {
         try {
             super.testWindowsLineSeparator();
             fail("Should trigger once fixed. {@since JDK 1.4RC1}");
-        } catch (AssertionFailedError e){
+        } catch (AssertionFailedError e) {
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexpTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexpTest.java b/src/tests/junit/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexpTest.java
index 2b60406..5f5342e 100644
--- a/src/tests/junit/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexpTest.java
+++ b/src/tests/junit/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexpTest.java
@@ -40,7 +40,7 @@ public class Jdk14RegexpRegexpTest extends RegexpTest {
         try {
             super.testParagraphCharacter();
             fail("Should trigger once fixed. {@since JDK 1.4RC1}");
-        } catch (AssertionFailedError e){
+        } catch (AssertionFailedError e) {
         }
     }
 
@@ -48,7 +48,7 @@ public class Jdk14RegexpRegexpTest extends RegexpTest {
         try {
             super.testLineSeparatorCharacter();
             fail("Should trigger once fixed. {@since JDK 1.4RC1}");
-        } catch (AssertionFailedError e){
+        } catch (AssertionFailedError e) {
         }
     }
 
@@ -56,7 +56,7 @@ public class Jdk14RegexpRegexpTest extends RegexpTest {
         try {
             super.testStandaloneCR();
             fail("Should trigger once fixed. {@since JDK 1.4RC1}");
-        } catch (AssertionFailedError e){
+        } catch (AssertionFailedError e) {
         }
     }
 
@@ -64,7 +64,7 @@ public class Jdk14RegexpRegexpTest extends RegexpTest {
         try {
             super.testWindowsLineSeparator();
             fail("Should trigger once fixed. {@since JDK 1.4RC1}");
-        } catch (AssertionFailedError e){
+        } catch (AssertionFailedError e) {
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/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 0950827..3129e68 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
@@ -35,7 +35,9 @@ public abstract class RegexpMatcherTest extends TestCase {
 
     public abstract RegexpMatcher getImplementation();
 
-    protected final RegexpMatcher getReg() {return reg;}
+    protected final RegexpMatcher getReg() {
+        return reg;
+    }
 
     public RegexpMatcherTest(String name) {
         super(name);
@@ -152,7 +154,7 @@ public abstract class RegexpMatcherTest extends TestCase {
 
 
     public void testMultiVersusSingleLine() throws IOException {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("Line1").append(UNIX_LINE);
         buf.append("starttest Line2").append(UNIX_LINE);
         buf.append("Line3 endtest").append(UNIX_LINE);

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/apache/tools/bzip2/CBZip2StreamTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/bzip2/CBZip2StreamTest.java b/src/tests/junit/org/apache/tools/bzip2/CBZip2StreamTest.java
index 50e0e57..88b500a 100644
--- a/src/tests/junit/org/apache/tools/bzip2/CBZip2StreamTest.java
+++ b/src/tests/junit/org/apache/tools/bzip2/CBZip2StreamTest.java
@@ -27,6 +27,7 @@ import static org.junit.Assert.fail;
 
 public class CBZip2StreamTest {
 
+    @SuppressWarnings("resource")
     @Test
     public void testNullPointer() throws IOException {
         try {

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/apache/tools/mail/MailMessageTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/mail/MailMessageTest.java b/src/tests/junit/org/apache/tools/mail/MailMessageTest.java
index 435729e..3d75826 100644
--- a/src/tests/junit/org/apache/tools/mail/MailMessageTest.java
+++ b/src/tests/junit/org/apache/tools/mail/MailMessageTest.java
@@ -65,7 +65,7 @@ public class MailMessageTest {
      *  If this testcase takes >90s to complete, it is very likely that
      *  the two threads are blocked waiting for each other and Thread.join()
      *  timed out.
-     * @throws InterruptedException
+     * @throws InterruptedException if something goes wrong
      */
     @Test
     public void testAPIExample() throws InterruptedException {
@@ -82,8 +82,8 @@ public class MailMessageTest {
         testMailClient.cc("cc2@you.com");
         testMailClient.bcc("bcc@you.com");
         testMailClient.setSubject("Test subject");
-        testMailClient.setMessage( "test line 1\n" +
-            "test line 2" );
+        testMailClient.setMessage("test line 1\n" +
+            "test line 2");
 
         Thread client = new Thread(testMailClient);
         client.start();
@@ -144,7 +144,7 @@ public class MailMessageTest {
 
     /**
      *  Test a MailMessage with no cc or bcc lines
-     * @throws InterruptedException
+     * @throws InterruptedException if something goes wrong
      */
     @Test
     public void testToOnly() throws InterruptedException {
@@ -157,8 +157,8 @@ public class MailMessageTest {
         testMailClient.from("Mail Message <EmailTaskTest@ant.apache.org>");
         testMailClient.to("to@you.com");
         testMailClient.setSubject("Test subject");
-        testMailClient.setMessage( "test line 1\n" +
-            "test line 2" );
+        testMailClient.setMessage("test line 1\n" +
+            "test line 2");
 
         Thread client = new Thread(testMailClient);
         client.start();
@@ -196,7 +196,7 @@ public class MailMessageTest {
 
     /**
      *  Test a MailMessage with no to or bcc lines
-     * @throws InterruptedException
+     * @throws InterruptedException if something goes wrong
      */
     @Test
     public void testCcOnly() throws InterruptedException {
@@ -209,8 +209,8 @@ public class MailMessageTest {
         testMailClient.from("Mail Message <EmailTaskTest@ant.apache.org>");
         testMailClient.cc("cc@you.com");
         testMailClient.setSubject("Test subject");
-        testMailClient.setMessage( "test line 1\n" +
-            "test line 2" );
+        testMailClient.setMessage("test line 1\n" +
+            "test line 2");
 
         Thread client = new Thread(testMailClient);
         client.start();
@@ -248,7 +248,7 @@ public class MailMessageTest {
 
     /**
      *  Test a MailMessage with no to or cc lines
-     * @throws InterruptedException
+     * @throws InterruptedException if something goes wrong
      */
     @Test
     public void testBccOnly() throws InterruptedException {
@@ -261,8 +261,8 @@ public class MailMessageTest {
         testMailClient.from("Mail Message <EmailTaskTest@ant.apache.org>");
         testMailClient.bcc("bcc@you.com");
         testMailClient.setSubject("Test subject");
-        testMailClient.setMessage( "test line 1\n" +
-            "test line 2" );
+        testMailClient.setMessage("test line 1\n" +
+            "test line 2");
 
         Thread client = new Thread(testMailClient);
         client.start();
@@ -291,8 +291,8 @@ public class MailMessageTest {
         "250\r\n" +
         "QUIT\r\n" +
         "221\r\n";
-        assertEquals( expectedResult.length(), result.length() );
-        assertEquals( expectedResult, result );
+        assertEquals(expectedResult.length(), result.length());
+        assertEquals(expectedResult, result);
         assertFalse(testMailClient.getFailMessage(), testMailClient.isFailed());
     }
 
@@ -300,7 +300,7 @@ public class MailMessageTest {
     /**
      *  Test a MailMessage with no subject line
      *  Subject is an optional field (RFC 822 s4.1)
-     * @throws InterruptedException
+     * @throws InterruptedException if something goes wrong
      */
     @Test
     public void testNoSubject() throws InterruptedException {
@@ -312,8 +312,8 @@ public class MailMessageTest {
 
         testMailClient.from("Mail Message <EmailTaskTest@ant.apache.org>");
         testMailClient.to("to@you.com");
-        testMailClient.setMessage( "test line 1\n" +
-            "test line 2" );
+        testMailClient.setMessage("test line 1\n" +
+            "test line 2");
 
         Thread client = new Thread(testMailClient);
         client.start();
@@ -342,15 +342,15 @@ public class MailMessageTest {
         "250\r\n" +
         "QUIT\r\n" +
         "221\r\n";
-        assertEquals( expectedResult.length(), result.length() );
-        assertEquals( expectedResult, result );
+        assertEquals(expectedResult.length(), result.length());
+        assertEquals(expectedResult, result);
         assertFalse(testMailClient.getFailMessage(), testMailClient.isFailed());
     }
 
 
     /**
      *  Test a MailMessage with empty body message
-     * @throws InterruptedException
+     * @throws InterruptedException if something goes wrong
      */
     @Test
     public void testEmptyBody() throws InterruptedException {
@@ -402,7 +402,7 @@ public class MailMessageTest {
      *  Test a MailMessage with US-ASCII character set
      *  The next four testcase can be kinda hard to debug as Ant will often
      *  print the junit failure in US-ASCII.
-     * @throws InterruptedException
+     * @throws InterruptedException if something goes wrong
      */
     @Test
     public void testAsciiCharset() throws InterruptedException {
@@ -453,22 +453,20 @@ public class MailMessageTest {
         bos1.print(expectedResult);
         bos2.print(result);
 
-        assertEquals( "expected message length != actual message length "
-            + "in testAsciiCharset()", expectedResult.length(), result.length() );
-        assertEquals( "baos1 and baos2 should be the same in testAsciiCharset()",
-            baos1.toString(), baos2.toString() ); // order of headers cannot be guaranteed
+        assertEquals("expected message length != actual message length "
+            + "in testAsciiCharset()", expectedResult.length(), result.length());
+        assertEquals("baos1 and baos2 should be the same in testAsciiCharset()",
+            baos1.toString(), baos2.toString()); // order of headers cannot be guaranteed
         assertFalse(testMailClient.getFailMessage(), testMailClient.isFailed());
     }
 
 
-
-
     /**
      * A private test class that pretends to be a mail transfer agent
      */
     private class ServerThread implements Runnable {
 
-        private StringBuffer sb = null;
+        private StringBuilder sb = null;
         private boolean loop = false;
         ServerSocket ssock = null;
         Socket sock = null;
@@ -481,45 +479,45 @@ public class MailMessageTest {
             try {
                 ssock = new ServerSocket(TEST_PORT);
                 sock = ssock.accept(); // wait for connection
-                in = new BufferedReader( new InputStreamReader(
-                    sock.getInputStream()) );
-                out = new BufferedWriter( new OutputStreamWriter(
-                    sock.getOutputStream() ) );
-                sb = new StringBuffer();
-                send( "220 test SMTP EmailTaskTest\r\n" );
+                in = new BufferedReader(new InputStreamReader(
+                    sock.getInputStream()));
+                out = new BufferedWriter(new OutputStreamWriter(
+                    sock.getOutputStream()));
+                sb = new StringBuilder();
+                send("220 test SMTP EmailTaskTest\r\n");
                 loop = true;
-                while ( loop ) {
+                while (loop) {
                     String response = in.readLine();
-                    if ( response == null ) {
+                    if (response == null) {
                         loop = false;
                         break;
                     }
-                    sb.append( response + "\r\n" );
-
-                    if ( !data && response.startsWith( "HELO" ) ) {
-                        send( "250 " + local + " Hello " + local + " " +
-                        "[127.0.0.1], pleased to meet you\r\n" );
-                    } else if ( !data && response.startsWith("MAIL") ) {
-                        send( "250\r\n" );
-                    } else if ( !data && response.startsWith("RCPT")) {
-                        send( "250\r\n" );
+                    sb.append(response).append("\r\n");
+
+                    if (!data && response.startsWith("HELO")) {
+                        send("250 " + local + " Hello " + local + " " +
+                        "[127.0.0.1], pleased to meet you\r\n");
+                    } else if (!data && response.startsWith("MAIL")) {
+                        send("250\r\n");
+                    } else if (!data && response.startsWith("RCPT")) {
+                        send("250\r\n");
                     } else if (!data && response.startsWith("DATA")) {
-                        send( "354\r\n" );
+                        send("354\r\n");
                         data = true;
-                    } else if (data && response.equals(".") ) {
-                        send( "250\r\n" );
+                    } else if (data && response.equals(".")) {
+                        send("250\r\n");
                         data = false;
                     } else if (!data && response.startsWith("QUIT")) {
-                        send( "221\r\n" );
+                        send("221\r\n");
                         loop = false;
                     } else if (!data) {
                         //throw new IllegalStateException("Command unrecognized: "
                         //    + response);
-                        send( "500 5.5.1 Command unrecognized: \"" +
-                            response + "\"\r\n" );
+                        send("500 5.5.1 Command unrecognized: \"" +
+                            response + "\"\r\n");
                         loop = false;
                     } else {
-                        // sb.append( response + "\r\n" );
+                        // sb.append(response + "\r\n");
                     }
 
                 } // while
@@ -531,9 +529,9 @@ public class MailMessageTest {
         }
 
         private void send(String retmsg) throws IOException {
-            out.write( retmsg );
+            out.write(retmsg);
             out.flush();
-            sb.append( retmsg );
+            sb.append(retmsg);
         }
 
         private void disconnect() {
@@ -653,9 +651,9 @@ public class MailMessageTest {
                     msg.setSubject(subject);
                 }
 
-                if (message != null ) {
+                if (message != null) {
                     PrintStream out = msg.getPrintStream();
-                    out.println( message );
+                    out.println(message);
                 }
 
                 msg.sendAndClose();
@@ -674,6 +672,7 @@ public class MailMessageTest {
             return failMessage;
         }
 
+        @SuppressWarnings("unused")
         public void replyTo(String replyTo) {
             replyToList.add(replyTo);
         }

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/apache/tools/tar/TarEntryTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/tar/TarEntryTest.java b/src/tests/junit/org/apache/tools/tar/TarEntryTest.java
index e942cdb..f5c2020 100644
--- a/src/tests/junit/org/apache/tools/tar/TarEntryTest.java
+++ b/src/tests/junit/org/apache/tools/tar/TarEntryTest.java
@@ -18,6 +18,8 @@
 
 package org.apache.tools.tar;
 
+import java.io.File;
+
 import org.junit.Test;
 
 /**
@@ -30,6 +32,6 @@ public class TarEntryTest {
      */
     @Test
     public void testFileConstructor() {
-        new TarEntry(new java.io.File("/foo"));
+        new TarEntry(new File("/foo"));
     }
 }

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/apache/tools/zip/AsiExtraFieldTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/zip/AsiExtraFieldTest.java b/src/tests/junit/org/apache/tools/zip/AsiExtraFieldTest.java
index 873b3f5..c62e3e1 100644
--- a/src/tests/junit/org/apache/tools/zip/AsiExtraFieldTest.java
+++ b/src/tests/junit/org/apache/tools/zip/AsiExtraFieldTest.java
@@ -62,8 +62,8 @@ public class AsiExtraFieldTest implements UnixStat {
                          0, 0, 0, 0,                         // link length
                          5, 0, 6, 0};                        // uid, gid
         assertEquals("no link", expect.length, b.length);
-        for (int i=0; i<expect.length; i++) {
-            assertEquals("no link, byte "+i, expect[i], b[i]);
+        for (int i = 0; i < expect.length; i++) {
+            assertEquals("no link, byte " + i, expect[i], b[i]);
         }
 
         a.setLinkedFile("test");
@@ -74,8 +74,8 @@ public class AsiExtraFieldTest implements UnixStat {
                              (byte)'t', (byte)'e', (byte)'s', (byte)'t'};
         b = a.getLocalFileDataData();
         assertEquals("no link", expect.length, b.length);
-        for (int i=0; i<expect.length; i++) {
-            assertEquals("no link, byte "+i, expect[i], b[i]);
+        for (int i = 0; i < expect.length; i++) {
+            assertEquals("no link, byte " + i, expect[i], b[i]);
         }
 
     }

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/apache/tools/zip/ExtraFieldUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/zip/ExtraFieldUtilsTest.java b/src/tests/junit/org/apache/tools/zip/ExtraFieldUtilsTest.java
index 95a6779..15b1b6d 100644
--- a/src/tests/junit/org/apache/tools/zip/ExtraFieldUtilsTest.java
+++ b/src/tests/junit/org/apache/tools/zip/ExtraFieldUtilsTest.java
@@ -61,11 +61,11 @@ public class ExtraFieldUtilsTest implements UnixStat {
         System.arraycopy(a.getLocalFileDataLength().getBytes(), 0, data, 2, 2);
         System.arraycopy(aLocal, 0, data, 4, aLocal.length);
         System.arraycopy(dummy.getHeaderId().getBytes(), 0, data,
-                         4+aLocal.length, 2);
+                         4 + aLocal.length, 2);
         System.arraycopy(dummy.getLocalFileDataLength().getBytes(), 0, data,
-                         4+aLocal.length+2, 2);
+                         4 + aLocal.length + 2, 2);
         System.arraycopy(dummyLocal, 0, data,
-                         4+aLocal.length+4, dummyLocal.length);
+                         4 + aLocal.length + 4, dummyLocal.length);
 
     }
 
@@ -83,14 +83,14 @@ public class ExtraFieldUtilsTest implements UnixStat {
         assertEquals("data length field 2", 1,
                      ze[1].getLocalFileDataLength().getValue());
 
-        byte[] data2 = new byte[data.length-1];
+        byte[] data2 = new byte[data.length - 1];
         System.arraycopy(data, 0, data2, 0, data2.length);
         try {
             ExtraFieldUtils.parse(data2);
             fail("data should be invalid");
         } catch (Exception e) {
             assertEquals("message",
-                         "bad extra field starting at "+(4 + aLocal.length)
+                         "bad extra field starting at " + (4 + aLocal.length)
                          + ".  Block length of 1 bytes exceeds remaining data of 0 bytes.",
                          e.getMessage());
         }
@@ -109,7 +109,7 @@ public class ExtraFieldUtilsTest implements UnixStat {
         assertEquals("data length field 2", 1,
                      ze[1].getLocalFileDataLength().getValue());
 
-        byte[] data2 = new byte[data.length-1];
+        byte[] data2 = new byte[data.length - 1];
         System.arraycopy(data, 0, data2, 0, data2.length);
         ze = ExtraFieldUtils.parse(data2, true,
                                    ExtraFieldUtils.UnparseableExtraField.READ);
@@ -140,7 +140,7 @@ public class ExtraFieldUtilsTest implements UnixStat {
         assertEquals("data length field 2", 1,
                      ze[1].getLocalFileDataLength().getValue());
 
-        byte[] data2 = new byte[data.length-1];
+        byte[] data2 = new byte[data.length - 1];
         System.arraycopy(data, 0, data2, 0, data2.length);
         ze = ExtraFieldUtils.parse(data2, true,
                                    ExtraFieldUtils.UnparseableExtraField.SKIP);
@@ -158,24 +158,24 @@ public class ExtraFieldUtilsTest implements UnixStat {
         byte[] local =
             ExtraFieldUtils.mergeLocalFileDataData(new ZipExtraField[] {a, dummy});
         assertEquals("local length", data.length, local.length);
-        for (int i=0; i<local.length; i++) {
-            assertEquals("local byte "+i, data[i], local[i]);
+        for (int i = 0; i < local.length; i++) {
+            assertEquals("local byte " + i, data[i], local[i]);
         }
 
         byte[] dummyCentral = dummy.getCentralDirectoryData();
         byte[] data2 = new byte[4 + aLocal.length + 4 + dummyCentral.length];
         System.arraycopy(data, 0, data2, 0, 4 + aLocal.length + 2);
         System.arraycopy(dummy.getCentralDirectoryLength().getBytes(), 0,
-                         data2, 4+aLocal.length+2, 2);
+                         data2, 4 + aLocal.length + 2, 2);
         System.arraycopy(dummyCentral, 0, data2,
-                         4+aLocal.length+4, dummyCentral.length);
+                         4 + aLocal.length + 4, dummyCentral.length);
 
 
         byte[] central =
             ExtraFieldUtils.mergeCentralDirectoryData(new ZipExtraField[] {a, dummy});
         assertEquals("central length", data2.length, central.length);
-        for (int i=0; i<central.length; i++) {
-            assertEquals("central byte "+i, data2[i], central[i]);
+        for (int i = 0; i < central.length; i++) {
+            assertEquals("central byte " + i, data2[i], central[i]);
         }
 
     }

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/apache/tools/zip/UTF8ZipFilesTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/zip/UTF8ZipFilesTest.java b/src/tests/junit/org/apache/tools/zip/UTF8ZipFilesTest.java
index 0e51e6b..6761e4f 100644
--- a/src/tests/junit/org/apache/tools/zip/UTF8ZipFilesTest.java
+++ b/src/tests/junit/org/apache/tools/zip/UTF8ZipFilesTest.java
@@ -19,8 +19,8 @@
 package org.apache.tools.zip;
 
 import java.io.File;
-import java.io.InputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.nio.ByteBuffer;
 import java.util.Enumeration;
 import java.util.zip.CRC32;
@@ -131,11 +131,9 @@ public class UTF8ZipFilesTest {
             zos = new ZipOutputStream(file);
             zos.setEncoding(encoding);
             zos.setUseLanguageEncodingFlag(withEFS);
-            zos.setCreateUnicodeExtraFields(withExplicitUnicodeExtra ?
-                                            ZipOutputStream
-                                            .UnicodeExtraFieldPolicy.NEVER
-                                            : ZipOutputStream
-                                            .UnicodeExtraFieldPolicy.ALWAYS);
+            zos.setCreateUnicodeExtraFields(withExplicitUnicodeExtra
+                                            ? ZipOutputStream.UnicodeExtraFieldPolicy.NEVER
+                                            : ZipOutputStream.UnicodeExtraFieldPolicy.ALWAYS);
 
             ZipEntry ze = new ZipEntry(OIL_BARREL_TXT);
             if (withExplicitUnicodeExtra
@@ -210,7 +208,7 @@ public class UTF8ZipFilesTest {
                 } else if (ze.getName().endsWith("_for_Dollar.txt")) {
                     assertUnicodeName(ze, EURO_FOR_DOLLAR_TXT, encoding);
                 } else if (!ze.getName().equals(ASCII_TXT)) {
-                    throw new AssertionError("Urecognized ZIP entry with name ["
+                    throw new AssertionError("Unrecognized ZIP entry with name ["
                                              + ze.getName() + "] found.");
                 }
             }

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/apache/tools/zip/ZipEncodingTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/zip/ZipEncodingTest.java b/src/tests/junit/org/apache/tools/zip/ZipEncodingTest.java
index 826e410..a0f9f55 100644
--- a/src/tests/junit/org/apache/tools/zip/ZipEncodingTest.java
+++ b/src/tests/junit/org/apache/tools/zip/ZipEncodingTest.java
@@ -113,10 +113,8 @@ public class ZipEncodingTest {
 
         assertEquals(expected.length, actual.limit());
 
-        for (int i = 0; i < expected.length; ++i) {
-
-            byte a = actual.get();
-            assertEquals(expected[i], a);
+        for (byte expectedByte : expected) {
+            assertEquals(expectedByte, actual.get());
         }
 
     }

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/apache/tools/zip/ZipEntryTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/zip/ZipEntryTest.java b/src/tests/junit/org/apache/tools/zip/ZipEntryTest.java
index 3c21f6f..96bbd45 100644
--- a/src/tests/junit/org/apache/tools/zip/ZipEntryTest.java
+++ b/src/tests/junit/org/apache/tools/zip/ZipEntryTest.java
@@ -62,7 +62,7 @@ public class ZipEntryTest {
         assertEquals("second pass", 2, result.length);
         assertSame(a, result[0]);
         assertSame(u2, result[1]);
-        assertEquals("length second pass", data1.length+1, data2.length);
+        assertEquals("length second pass", data1.length + 1, data2.length);
 
         UnrecognizedExtraField u3 = new UnrecognizedExtraField();
         u3.setHeaderId(new ZipShort(2));

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/apache/tools/zip/ZipLongTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/zip/ZipLongTest.java b/src/tests/junit/org/apache/tools/zip/ZipLongTest.java
index a7ece04..12aad02 100644
--- a/src/tests/junit/org/apache/tools/zip/ZipLongTest.java
+++ b/src/tests/junit/org/apache/tools/zip/ZipLongTest.java
@@ -80,7 +80,7 @@ public class ZipLongTest {
     @Test
     public void testSign() {
         ZipLong zl = new ZipLong(new byte[] {(byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF});
-        assertEquals(0x00000000FFFFFFFFl, zl.getValue());
+        assertEquals(0x00000000FFFFFFFFL, zl.getValue());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/example/junit/MultilineAsserts.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/example/junit/MultilineAsserts.java b/src/tests/junit/org/example/junit/MultilineAsserts.java
index 06e1039..be68ec6 100644
--- a/src/tests/junit/org/example/junit/MultilineAsserts.java
+++ b/src/tests/junit/org/example/junit/MultilineAsserts.java
@@ -20,8 +20,16 @@ package org.example.junit;
 import junit.framework.TestCase;
 
 public class MultilineAsserts extends TestCase {
-    public void testFoo() { assertTrue("testFoo \nmessed up", false); }
-    public void testBar() { assertTrue("testBar \ndidn't work", true); }
-    public void testFee() { assertTrue("testFee \ncrashed", false); }
-    public void testFie() { assertTrue("testFie \nbroke", true); }
+    public void testFoo() {
+        assertTrue("testFoo \nmessed up", false);
+    }
+    public void testBar() {
+        assertTrue("testBar \ndidn't work", true);
+    }
+    public void testFee() {
+        assertTrue("testFee \ncrashed", false);
+    }
+    public void testFie() {
+        assertTrue("testFie \nbroke", true);
+    }
 }

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/example/junit/TestNotMissed.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/example/junit/TestNotMissed.java b/src/tests/junit/org/example/junit/TestNotMissed.java
index 6d3babe..41b722f 100644
--- a/src/tests/junit/org/example/junit/TestNotMissed.java
+++ b/src/tests/junit/org/example/junit/TestNotMissed.java
@@ -17,7 +17,6 @@
  */
 package org.example.junit;
 
-
 import org.junit.Test;
 
 public class TestNotMissed {

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/example/tasks/TaskdefTestContainerTask.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/example/tasks/TaskdefTestContainerTask.java b/src/tests/junit/org/example/tasks/TaskdefTestContainerTask.java
index a566d5c..960ad72 100644
--- a/src/tests/junit/org/example/tasks/TaskdefTestContainerTask.java
+++ b/src/tests/junit/org/example/tasks/TaskdefTestContainerTask.java
@@ -21,5 +21,6 @@ package org.example.tasks;
 import org.apache.tools.ant.taskdefs.Sequential;
 
 public class TaskdefTestContainerTask extends Sequential {
-    public TaskdefTestContainerTask() {}
+    public TaskdefTestContainerTask() {
+    }
 }

http://git-wip-us.apache.org/repos/asf/ant/blob/572a2490/src/tests/junit/org/example/tasks/TaskdefTestSimpleTask.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/example/tasks/TaskdefTestSimpleTask.java b/src/tests/junit/org/example/tasks/TaskdefTestSimpleTask.java
index fdb48b0..4adad93 100644
--- a/src/tests/junit/org/example/tasks/TaskdefTestSimpleTask.java
+++ b/src/tests/junit/org/example/tasks/TaskdefTestSimpleTask.java
@@ -24,21 +24,28 @@ import org.apache.tools.ant.Task;
 public class TaskdefTestSimpleTask extends Task {
 
     public class Echo {
-        Echo() {}
+        Echo() {
+        }
+
         private String message = null;
-        public void setMessage(String s) {message = s;}
+
+        public void setMessage(String s) {
+            message = s;
+        }
     }
 
-    public TaskdefTestSimpleTask() {}
+    public TaskdefTestSimpleTask() {
+    }
 
     private Echo echo;
+
     public Echo createEcho() {
         echo = new Echo();
         return echo;
     }
 
     public void execute() {
-        log("simpletask: "+echo.message, Project.MSG_INFO);
+        log("simpletask: " + echo.message, Project.MSG_INFO);
     }
 
 }


Mime
View raw message