From 8c48b025410ca522f8c26a82358500567e5cab85 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 12 Jul 2016 10:32:09 +0000
Subject: [PATCH] dsreplication: code cleanup
---
opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/InstallerHelper.java | 15 ++-------------
1 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/InstallerHelper.java b/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/InstallerHelper.java
index 785b8de..4435a35 100644
--- a/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/InstallerHelper.java
+++ b/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/InstallerHelper.java
@@ -78,7 +78,6 @@
import org.opends.server.tools.ConfigureDS;
import org.opends.server.tools.ConfigureWindowsService;
import org.opends.server.tools.JavaPropertiesTool;
-import org.opends.server.types.DirectoryException;
import org.opends.server.types.LDIFExportConfig;
import org.opends.server.types.OpenDsException;
import org.opends.server.util.LDIFException;
@@ -333,7 +332,7 @@
* @throws ApplicationException
* if something goes wrong.
*/
- public void createBackend(ConnectionWrapper conn, String backendName, Set<String> baseDNs,
+ public void createBackend(ConnectionWrapper conn, String backendName, Set<DN> baseDNs,
ManagedObjectDefinition<? extends BackendCfgClient, ? extends BackendCfg> backendType)
throws ApplicationException
{
@@ -342,7 +341,7 @@
RootCfgClient root = conn.getRootConfiguration();
BackendCfgClient backend = root.createBackend(backendType, backendName, null);
backend.setEnabled(true);
- backend.setBaseDN(toDNs(baseDNs));
+ backend.setBaseDN(baseDNs);
backend.setBackendId(backendName);
backend.setWritabilityMode(BackendCfgDefn.WritabilityMode.ENABLED);
backend.commit();
@@ -354,16 +353,6 @@
}
}
- private Set<DN> toDNs(Set<String> strings) throws DirectoryException
- {
- Set<DN> results = new HashSet<>();
- for (String s : strings)
- {
- results.add(DN.valueOf(s));
- }
- return results;
- }
-
/**
* Configures the replication on a given server.
* @param conn the connection to the server where we want to configure
--
Gitblit v1.10.0