From 270f7e621b28f740f6b72ec53b14b1ed0d3b8204 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Tue, 17 Apr 2012 21:22:11 +0000
Subject: [PATCH] Now that validateSchema defaults to true in the LDIFImportConfig class, it must explicitely set to false in the ReplicationBackend. The entries exposed there might not be schema compliant, which is ok, as the backend is only used for backup/restore.
---
opends/src/server/org/opends/server/replication/server/ReplicationBackend.java | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/ReplicationBackend.java b/opends/src/server/org/opends/server/replication/server/ReplicationBackend.java
index 3253baf..d924f3a 100644
--- a/opends/src/server/org/opends/server/replication/server/ReplicationBackend.java
+++ b/opends/src/server/org/opends/server/replication/server/ReplicationBackend.java
@@ -1491,6 +1491,9 @@
ldif = ldif.replace("\n-\n", "\n");
ByteArrayInputStream istream = new ByteArrayInputStream(ldif.getBytes());
LDIFImportConfig newConfig = new LDIFImportConfig(istream);
+ // ReplicationBackend may contain entries that are not schema
+ // compliant. Let's ignore them for now.
+ newConfig.setValidateSchema(false);
return new LDIFReader(newConfig);
}
}
--
Gitblit v1.10.0