mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Fabio Pistolesi
07.06.2016 21fc9878f655ce11382bdc429cc95b9e0ef368fc
OPENDJ-3088 Avoid declaring LDAP information as complex type in JSON events

Do not encapsulate LDAP specifics int o a json value, since it would generate an complex object type instead of a simple nested value.
1 files modified
14 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/loggers/OpenDJAccessEventBuilder.java 14 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/loggers/OpenDJAccessEventBuilder.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2015 ForgeRock AS.
 * Copyright 2015-2016 ForgeRock AS.
 */
package org.opends.server.loggers;
@@ -247,16 +247,10 @@
  private JsonValue getLdapValue()
  {
    final JsonValue ldapValue;
    if (jsonValue.isDefined("ldap"))
    if (!jsonValue.isDefined("ldap"))
    {
      ldapValue = jsonValue.get("ldap");
      jsonValue.put("ldap", object());
    }
    else
    {
      ldapValue = json(object());
      jsonValue.put("ldap", ldapValue);
    }
    return ldapValue;
    return jsonValue.get("ldap");
  }
}