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/main/java/org/opends/server/authorization/dseecompat/DNS.java |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/DNS.java b/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/DNS.java
index 7b63ce4..d77bd0e 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/DNS.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/DNS.java
@@ -183,21 +183,25 @@
     boolean evalHostName(String[] remoteHostName, String[] pat) {
       boolean wildCard=pat[0].equals("*");
       //Check if there is a single wild-card.
-      if(pat.length == 1 && wildCard)
+      if(pat.length == 1 && wildCard) {
         return true;
+      }
       int remoteHnIndex=remoteHostName.length-pat.length;
-      if(remoteHnIndex < 0)
+      if(remoteHnIndex < 0) {
         return false;
+      }
       int patternIndex=0;
-      if(!wildCard)
-          remoteHnIndex=0;
-      else {
+      if(!wildCard) {
+        remoteHnIndex=0;
+      } else {
           patternIndex=1;
           remoteHnIndex++;
       }
-      for(int i=remoteHnIndex ;i<remoteHostName.length;i++)
-            if(!pat[patternIndex++].equalsIgnoreCase(remoteHostName[i]))
-                return false;
+      for(int i=remoteHnIndex ;i<remoteHostName.length;i++) {
+        if(!pat[patternIndex++].equalsIgnoreCase(remoteHostName[i])) {
+          return false;
+        }
+      }
       return true;
     }
 

--
Gitblit v1.10.0