You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2015/08/24 01:49:13 UTC

svn commit: r1697283 - in /commons/proper/net/trunk/src/test/java/org/apache/commons/net/ntp: TestNtpClient.java TimeStampTest.java

Author: sebb
Date: Sun Aug 23 23:49:13 2015
New Revision: 1697283

URL: http://svn.apache.org/r1697283
Log:
Always use blocks

Modified:
    commons/proper/net/trunk/src/test/java/org/apache/commons/net/ntp/TestNtpClient.java
    commons/proper/net/trunk/src/test/java/org/apache/commons/net/ntp/TimeStampTest.java

Modified: commons/proper/net/trunk/src/test/java/org/apache/commons/net/ntp/TestNtpClient.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/test/java/org/apache/commons/net/ntp/TestNtpClient.java?rev=1697283&r1=1697282&r2=1697283&view=diff
==============================================================================
--- commons/proper/net/trunk/src/test/java/org/apache/commons/net/ntp/TestNtpClient.java (original)
+++ commons/proper/net/trunk/src/test/java/org/apache/commons/net/ntp/TestNtpClient.java Sun Aug 23 23:49:13 2015
@@ -50,7 +50,9 @@ public class TestNtpClient {
         boolean running = false;
         for (int retries=0; retries < 5; retries++) {
             running = server.isRunning();
-            if (running) break;
+            if (running) {
+                break;
+            }
             // if not running then sleep 2 seconds and try again
             try {
                 Thread.sleep(2000);

Modified: commons/proper/net/trunk/src/test/java/org/apache/commons/net/ntp/TimeStampTest.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/test/java/org/apache/commons/net/ntp/TimeStampTest.java?rev=1697283&r1=1697282&r2=1697283&view=diff
==============================================================================
--- commons/proper/net/trunk/src/test/java/org/apache/commons/net/ntp/TimeStampTest.java (original)
+++ commons/proper/net/trunk/src/test/java/org/apache/commons/net/ntp/TimeStampTest.java Sun Aug 23 23:49:13 2015
@@ -80,11 +80,13 @@ public class TimeStampTest extends TestC
     public void testNotSame() {
         TimeStamp time = TimeStamp.getCurrentTime();
         Object other = Integer.valueOf(0);
-        if(time.equals(other))
+        if(time.equals(other)) {
           fail("TimeStamp cannot equal Date");
+        }
         other = null;
-        if(time.equals(other))
-        fail("TimeStamp cannot equal null");
+        if(time.equals(other)) {
+            fail("TimeStamp cannot equal null");
+        }
     }
 
 }