From 9c88e7e8be7dde117ada9ae483d535b99c6c11dc Mon Sep 17 00:00:00 2001
From: Violette Roche-Montane <violette.roche-montane@forgerock.com>
Date: Tue, 25 Feb 2014 10:35:48 +0000
Subject: [PATCH] Checkpoint OPENDJ-1343 Migrate dsconfig - Code cleanup. Thanks to AutoRefactor ;)

---
 opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/CLIProfile.java |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/CLIProfile.java b/opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/CLIProfile.java
index 83d797a..abfc203 100644
--- a/opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/CLIProfile.java
+++ b/opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/CLIProfile.java
@@ -22,6 +22,7 @@
  *
  *
  *      Copyright 2009 Sun Microsystems, Inc.
+ *      Portions Copyright 2014 ForgeRock AS
  */
 
 package org.opends.server.tools.dsconfig;
@@ -45,7 +46,7 @@
  */
 final class CLIProfile {
 
-  // The singleton instance.
+  /** The singleton instance. */
   private static final CLIProfile INSTANCE = new CLIProfile();
 
 
@@ -59,12 +60,12 @@
     return INSTANCE;
   }
 
-  // The CLI profile property table.
+  /** The CLI profile property table. */
   private final ManagedObjectDefinitionResource resource;
 
 
 
-  // Private constructor.
+  /** Private constructor. */
   private CLIProfile() {
     this.resource = ManagedObjectDefinitionResource.createForProfile("cli");
   }
@@ -81,13 +82,12 @@
    *         displayed in a list-xxx operation.
    */
   public Set<String> getDefaultListPropertyNames(RelationDefinition<?, ?> r) {
-    String s = resource.getString(r.getParentDefinition(), "relation."
+    final String s = resource.getString(r.getParentDefinition(), "relation."
         + r.getName() + ".list-properties");
     if (s.trim().length() == 0) {
       return Collections.emptySet();
-    } else {
-      return new LinkedHashSet<String>(Arrays.asList(s.split(",")));
     }
+    return new LinkedHashSet<String>(Arrays.asList(s.split(",")));
   }
 
 
@@ -145,7 +145,6 @@
    *         customization.
    */
   public boolean isForCustomization(AbstractManagedObjectDefinition<?, ?> d) {
-    String s = resource.getString(d, "is-for-customization");
-    return Boolean.parseBoolean(s);
+    return Boolean.parseBoolean(resource.getString(d, "is-for-customization"));
   }
 }

--
Gitblit v1.10.0