From a2bc68638f55ae0ad7b9e3a04c7a3c02d01384f8 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Wed, 13 Feb 2013 23:44:11 +0000
Subject: [PATCH] Partial fix for OPENDJ-758 : Implement configurable update policy for simple and default mappers

---
 opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Utils.java |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Utils.java b/opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Utils.java
index e230bf4..559c92f 100644
--- a/opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Utils.java
+++ b/opendj3/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Utils.java
@@ -103,11 +103,8 @@
                     } else if (syntax.equals(getGeneralizedTimeSyntax())) {
                         return printDateTime(byteStringToGeneralizedTime().apply(value, null)
                                 .toCalendar());
-                    } else if (syntax.isHumanReadable()) {
-                        return byteStringToString().apply(value, null);
                     } else {
-                        // Base 64 encoded binary.
-                        return value.toBase64String();
+                        return byteStringToString().apply(value, null);
                     }
                 }
             };
@@ -121,11 +118,8 @@
                         if (syntax.equals(getGeneralizedTimeSyntax())) {
                             return ByteString.valueOf(GeneralizedTime.valueOf(parseDateTime(value
                                     .toString())));
-                        } else if (syntax.isHumanReadable()) {
-                            return ByteString.valueOf(value);
                         } else {
-                            // Base 64 encoded binary.
-                            return ByteString.valueOfBase64(value.toString());
+                            return ByteString.valueOf(value);
                         }
                     } else {
                         throw new IllegalArgumentException("Unrecognized type of JSON value: "

--
Gitblit v1.10.0