From 0440760ba5af5211e7da2a120d708f11079973c4 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 22 Aug 2014 10:38:08 +0000
Subject: [PATCH] Applied AutoRefactor to com.forgerock.opendj.ldap.tools package.

---
 opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/Utils.java |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/Utils.java b/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/Utils.java
index bf1467d..1ae8983 100644
--- a/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/Utils.java
+++ b/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/Utils.java
@@ -87,25 +87,25 @@
         }
 
         final String lowerOID = StaticUtils.toLowerCase(controlOID);
-        if (lowerOID.equals("accountusable") || lowerOID.equals("accountusability")) {
+        if ("accountusable".equals(lowerOID) || "accountusability".equals(lowerOID)) {
             controlOID = AccountUsabilityRequestControl.OID;
-        } else if (lowerOID.equals("authzid") || lowerOID.equals("authorizationidentity")) {
+        } else if ("authzid".equals(lowerOID) || "authorizationidentity".equals(lowerOID)) {
             controlOID = AuthorizationIdentityRequestControl.OID;
-        } else if (lowerOID.equals("noop") || lowerOID.equals("no-op")) {
+        } else if ("noop".equals(lowerOID) || "no-op".equals(lowerOID)) {
             // controlOID = OID_LDAP_NOOP_OPENLDAP_ASSIGNED;
-        } else if (lowerOID.equals("subentries")) {
+        } else if ("subentries".equals(lowerOID)) {
             // controlOID = OID_LDAP_SUBENTRIES;
-        } else if (lowerOID.equals("managedsait")) {
+        } else if ("managedsait".equals(lowerOID)) {
             // controlOID = OID_MANAGE_DSAIT_CONTROL;
-        } else if (lowerOID.equals("pwpolicy") || lowerOID.equals("passwordpolicy")) {
+        } else if ("pwpolicy".equals(lowerOID) || "passwordpolicy".equals(lowerOID)) {
             controlOID = PasswordPolicyRequestControl.OID;
-        } else if (lowerOID.equals("subtreedelete") || lowerOID.equals("treedelete")) {
+        } else if ("subtreedelete".equals(lowerOID) || "treedelete".equals(lowerOID)) {
             controlOID = SubtreeDeleteRequestControl.OID;
-        } else if (lowerOID.equals("realattrsonly") || lowerOID.equals("realattributesonly")) {
+        } else if ("realattrsonly".equals(lowerOID) || "realattributesonly".equals(lowerOID)) {
             // controlOID = OID_REAL_ATTRS_ONLY;
-        } else if (lowerOID.equals("virtualattrsonly") || lowerOID.equals("virtualattributesonly")) {
+        } else if ("virtualattrsonly".equals(lowerOID) || "virtualattributesonly".equals(lowerOID)) {
             // controlOID = OID_VIRTUAL_ATTRS_ONLY;
-        } else if (lowerOID.equals("effectiverights") || lowerOID.equals("geteffectiverights")) {
+        } else if ("effectiverights".equals(lowerOID) || "geteffectiverights".equals(lowerOID)) {
             controlOID = GetEffectiveRightsRequestControl.OID;
         }
 
@@ -117,9 +117,9 @@
 
         idx = remainder.indexOf(":");
         if (idx == -1) {
-            if (remainder.equalsIgnoreCase("true")) {
+            if ("true".equalsIgnoreCase(remainder)) {
                 controlCriticality = true;
-            } else if (remainder.equalsIgnoreCase("false")) {
+            } else if ("false".equalsIgnoreCase(remainder)) {
                 controlCriticality = false;
             } else {
                 // TODO: I18N
@@ -131,9 +131,9 @@
         }
 
         final String critical = remainder.substring(0, idx);
-        if (critical.equalsIgnoreCase("true")) {
+        if ("true".equalsIgnoreCase(critical)) {
             controlCriticality = true;
-        } else if (critical.equalsIgnoreCase("false")) {
+        } else if ("false".equalsIgnoreCase(critical)) {
             controlCriticality = false;
         } else {
             // TODO: I18N
@@ -180,8 +180,8 @@
                     .getResult().getResultCode().toString()));
         }
 
-        if ((ere.getResult().getDiagnosticMessage() != null)
-                && (ere.getResult().getDiagnosticMessage().length() > 0)) {
+        if (ere.getResult().getDiagnosticMessage() != null
+                && ere.getResult().getDiagnosticMessage().length() > 0) {
             app.errPrintln(ERR_TOOL_ERROR_MESSAGE.get(ere.getResult().getDiagnosticMessage()));
         }
 
@@ -294,7 +294,7 @@
         }
     }
 
-    // Prevent instantiation.
+    /** Prevent instantiation. */
     private Utils() {
         // Do nothing.
     }

--
Gitblit v1.10.0