From 3e7100797afc9068d10990f57b46e868ff812966 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 28 Oct 2016 14:18:44 +0000
Subject: [PATCH] Use the new Entry.parseAttribute() method

---
 opendj-server-legacy/src/main/java/org/opends/server/tasks/TaskUtils.java |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tasks/TaskUtils.java b/opendj-server-legacy/src/main/java/org/opends/server/tasks/TaskUtils.java
index c8ed1f5..52fcf08 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tasks/TaskUtils.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tasks/TaskUtils.java
@@ -33,7 +33,6 @@
 import org.forgerock.opendj.server.config.server.BackendCfg;
 import org.forgerock.opendj.server.config.server.RootCfg;
 import org.opends.server.api.Backend;
-import org.opends.server.tools.BackendToolUtils;
 import org.opends.server.types.Entry;
 import org.opends.server.config.ConfigurationHandler;
 import org.opends.server.core.DirectoryServer;
@@ -51,9 +50,7 @@
 import static org.opends.server.util.ServerConstants.*;
 import static org.opends.server.util.StaticUtils.*;
 
-/**
- * This class defines a number of static utility methods for server tasks.
- */
+/** This class defines a number of static utility methods for server tasks. */
 public class TaskUtils
 {
   private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
@@ -71,7 +68,7 @@
   {
     try
     {
-      return BackendToolUtils.getStringSingleValuedAttribute(configEntry, ATTR_BACKEND_ID);
+      return configEntry.parseAttribute(ATTR_BACKEND_ID).asString();
     }
     catch (Exception e)
     {
@@ -117,7 +114,7 @@
         try
         {
           configEntry = Converters.to(configHandler.getEntry(childrenDn));
-          backendID = BackendToolUtils.getStringSingleValuedAttribute(configEntry, ATTR_BACKEND_ID);
+          backendID = configEntry.parseAttribute(ATTR_BACKEND_ID).asString();
           if (backendID == null)
           {
             continue;

--
Gitblit v1.10.0