From 74ebeb29ab3f4c8c758085f05a980fcbb1ca5886 Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Mon, 30 Jul 2007 14:15:55 +0000
Subject: [PATCH] Code and Comments cleaning

---
 opendj-sdk/opends/src/server/org/opends/server/admin/client/cli/DsFrameworkCliServer.java |    4 +---
 opendj-sdk/opends/src/server/org/opends/server/admin/client/cli/DsFrameworkCliParser.java |   35 ++++++++++++++++-------------------
 2 files changed, 17 insertions(+), 22 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/admin/client/cli/DsFrameworkCliParser.java b/opendj-sdk/opends/src/server/org/opends/server/admin/client/cli/DsFrameworkCliParser.java
index dd1ae80..ebd7aad 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/admin/client/cli/DsFrameworkCliParser.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/admin/client/cli/DsFrameworkCliParser.java
@@ -208,7 +208,7 @@
   }
 
   /**
-   * Initialize the parser with the Gloabal options ans subcommands.
+   * Initialize the parser with the Global options and subcommands.
    *
    * @param outStream
    *          The output stream to use for standard output, or <CODE>null</CODE>
@@ -274,7 +274,7 @@
    * Initialize Global option.
    *
    * @param outStream
-   *          The output stream used forn the usage.
+   *          The output stream used for the usage.
    * @throws ArgumentException
    *           If there is a problem with any of the parameters used
    *           to create this argument.
@@ -642,28 +642,28 @@
       {
         // Nothing to do: if this occurs we will systematically refuse the
         // certificates.  Maybe we should avoid this and be strict, but we are
-        // in a best effor mode.
+        // in a best effort mode.
         LOG.log(Level.WARNING, "Error with the truststore", e);
       }
       catch (NoSuchAlgorithmException e)
       {
         // Nothing to do: if this occurs we will systematically refuse the
         // certificates.  Maybe we should avoid this and be strict, but we are
-        // in a best effor mode.
+        // in a best effort mode.
         LOG.log(Level.WARNING, "Error with the truststore", e);
       }
       catch (CertificateException e)
       {
         // Nothing to do: if this occurs we will systematically refuse the
         // certificates.  Maybe we should avoid this and be strict, but we are
-        // in a best effor mode.
+        // in a best effort mode.
         LOG.log(Level.WARNING, "Error with the truststore", e);
       }
       catch (IOException e)
       {
         // Nothing to do: if this occurs we will systematically refuse the
         // certificates.  Maybe we should avoid this and be strict, but we are
-        // in a best effor mode.
+        // in a best effort mode.
         LOG.log(Level.WARNING, "Error with the truststore", e);
       }
     }
@@ -701,8 +701,7 @@
         // Nothing to do: if this occurs we will systematically refuse
         // the
         // certificates. Maybe we should avoid this and be strict, but
-        // we are
-        // in a best effor mode.
+        // we are in a best effort mode.
         LOG.log(Level.WARNING, "Error with the keystore", e);
       }
       catch (NoSuchAlgorithmException e)
@@ -711,7 +710,7 @@
         // the
         // certificates. Maybe we should avoid this and be strict, but
         // we are
-        // in a best effor mode.
+        // in a best effort mode.
         LOG.log(Level.WARNING, "Error with the keystore", e);
       }
       catch (CertificateException e)
@@ -720,7 +719,7 @@
         // the
         // certificates. Maybe we should avoid this and be strict, but
         // we are
-        // in a best effor mode.
+        // in a best effort mode.
         LOG.log(Level.WARNING, "Error with the keystore", e);
       }
       catch (IOException e)
@@ -729,7 +728,7 @@
         // the
         // certificates. Maybe we should avoid this and be strict, but
         // we are
-        // in a best effor mode.
+        // in a best effort mode.
         LOG.log(Level.WARNING, "Error with the keystore", e);
       }
       ApplicationKeyManager akm = new ApplicationKeyManager(keyStore,
@@ -758,8 +757,6 @@
    */
   public int validateGlobalOption(PrintStream err)
   {
-    ReturnCode returnCode = ReturnCode.SUCCESSFUL_NOP;
-
     // Couldn't have at the same time bindPassword and bindPasswordFile
     if(bindPasswordArg.isPresent() && bindPasswordFileArg.isPresent())
     {
@@ -767,7 +764,7 @@
       String message = getMessage(msgID, bindPasswordArg.getLongIdentifier(),
                                   bindPasswordFileArg.getLongIdentifier());
       err.println(wrapText(message, MAX_LINE_WIDTH));
-      return returnCode.CONFLICTING_ARGS.getReturnCode();
+      return ReturnCode.CONFLICTING_ARGS.getReturnCode();
     }
 
     // Couldn't have at the same time trustAll and
@@ -778,7 +775,7 @@
       String message = getMessage(msgID, trustAllArg.getLongIdentifier(),
           trustStorePathArg.getLongIdentifier());
       err.println(wrapText(message, MAX_LINE_WIDTH));
-      return returnCode.CONFLICTING_ARGS.getReturnCode();
+      return ReturnCode.CONFLICTING_ARGS.getReturnCode();
     }
     if (trustAllArg.isPresent() && trustStorePasswordArg.isPresent())
     {
@@ -786,7 +783,7 @@
       String message = getMessage(msgID, trustAllArg.getLongIdentifier(),
           trustStorePasswordArg.getLongIdentifier());
       err.println(wrapText(message, MAX_LINE_WIDTH));
-      return returnCode.CONFLICTING_ARGS.getReturnCode();
+      return ReturnCode.CONFLICTING_ARGS.getReturnCode();
     }
     if (trustAllArg.isPresent() && trustStorePasswordFileArg.isPresent())
     {
@@ -794,7 +791,7 @@
       String message = getMessage(msgID, trustAllArg.getLongIdentifier(),
           trustStorePasswordFileArg.getLongIdentifier());
       err.println(wrapText(message, MAX_LINE_WIDTH));
-      return returnCode.CONFLICTING_ARGS.getReturnCode();
+      return ReturnCode.CONFLICTING_ARGS.getReturnCode();
     }
 
     // Couldn't have at the same time trustStorePasswordArg and
@@ -806,7 +803,7 @@
       String message = getMessage(msgID, trustStorePasswordArg
           .getLongIdentifier(), trustStorePasswordFileArg.getLongIdentifier());
       err.println(wrapText(message, MAX_LINE_WIDTH));
-      return returnCode.CONFLICTING_ARGS.getReturnCode();
+      return ReturnCode.CONFLICTING_ARGS.getReturnCode();
     }
 
     // Couldn't have at the same time startTLSArg and
@@ -818,7 +815,7 @@
       String message = getMessage(msgID, startTLSArg
           .getLongIdentifier(), useSSLArg.getLongIdentifier());
       err.println(wrapText(message, MAX_LINE_WIDTH));
-      return returnCode.CONFLICTING_ARGS.getReturnCode();
+      return ReturnCode.CONFLICTING_ARGS.getReturnCode();
     }
 
     return ReturnCode.SUCCESSFUL_NOP.getReturnCode();
diff --git a/opendj-sdk/opends/src/server/org/opends/server/admin/client/cli/DsFrameworkCliServer.java b/opendj-sdk/opends/src/server/org/opends/server/admin/client/cli/DsFrameworkCliServer.java
index 948b6b9..5f8dc36 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/admin/client/cli/DsFrameworkCliServer.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/admin/client/cli/DsFrameworkCliServer.java
@@ -48,7 +48,6 @@
 import org.opends.admin.ads.ADSContextException;
 import org.opends.admin.ads.ADSContext.ServerProperty;
 import org.opends.admin.ads.ADSContextException.ErrorType;
-import org.opends.server.admin.PropertyOption;
 import org.opends.server.admin.client.cli.DsFrameworkCliReturnCode.ReturnCode;
 import org.opends.server.tools.dsconfig.ArgumentExceptionFactory;
 import org.opends.server.util.args.Argument;
@@ -117,7 +116,7 @@
     GET_SERVER_PROPERTIES("get-server-properties"),
 
     /**
-     * The set-server-propertiess subcommand.
+     * The set-server-properties subcommand.
      */
     SET_SERVER_PROPERTIES("set-server-properties"),
 
@@ -940,7 +939,6 @@
     }
 
     // Check that all mandatory props are set.
-    HashSet<PropertyOption> propList;
     for (ServerProperty s : ServerProperty.values())
     {
       Argument arg = serverProperties.get(s);

--
Gitblit v1.10.0