From b8c6b80da1cb6118167a934daa480eb381c59e0e Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 08 Jul 2015 08:06:00 +0000
Subject: [PATCH] opendj-server-legacy maven module: Enabled "NeedBraces" checkstyle rule. This brings opendj-server-legacy's checkstyle rules closer to ForgeRock's checkstyle rules.

---
 opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/StateMachineTest.java |   35 ++++++++++++++++++++++++++++++-----
 1 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/StateMachineTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/StateMachineTest.java
index d2ae777..a08fa52 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/StateMachineTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/StateMachineTest.java
@@ -154,9 +154,13 @@
       // Test connection
       boolean connected = false;
       if (rd != null)
+      {
         connected = rd.isConnected();
+      }
       else
+      {
         connected = rb.isConnected();
+      }
 
       if (connected)
       {
@@ -394,9 +398,18 @@
     } finally
     {
       endTest();
-      if (bw != null) bw.shutdown();
-      if (br3 != null) br3.shutdown();
-      if (br2 != null) br2.shutdown();
+      if (bw != null)
+      {
+        bw.shutdown();
+      }
+      if (br3 != null)
+      {
+        br3.shutdown();
+      }
+      if (br2 != null)
+      {
+        br2.shutdown();
+      }
     }
   }
 
@@ -670,8 +683,14 @@
     {
       // Finalize test
       endTest();
-      if (bw != null) bw.shutdown();
-      if (br != null) br.shutdown();
+      if (bw != null)
+      {
+        bw.shutdown();
+      }
+      if (br != null)
+      {
+        br.shutdown();
+      }
     }
   }
 
@@ -1006,7 +1025,9 @@
     public void pause()
     {
       if (isPaused())
+      {
         return; // Already suspended
+      }
       suspended.set(true);
       // Wait for all messages sent
       while (!sessionDone.get())
@@ -1135,12 +1156,16 @@
           ReplicationMsg msg = rb.receive(); // Allow more messages to be sent by broker writer
           rb.updateWindowAfterReplay();  // Allow RS to send more messages to broker
           if (msg != null)
+          {
             debugInfo("Broker " + serverId + " reader received: " + msg);
+          }
           lastMsg = msg;
         } catch (SocketTimeoutException ex)
         {
           if (shutdown)
+          {
             return;
+          }
         }
       }
       debugInfo("Broker " + serverId + " reader thread is dying");

--
Gitblit v1.10.0