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

ludovicp
28.52.2010 6611e463cf8098a73f74ec525eb391e989ca2b33
Correct issues in MakeLDIF with ifPresentTag and ifAbsentTag
2 files modified
13 ■■■■ changed files
opends/src/server/org/opends/server/tools/makeldif/IfAbsentTag.java 7 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/makeldif/IfPresentTag.java 6 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/makeldif/IfAbsentTag.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Copyright 2006-2010 Sun Microsystems, Inc.
 */
package org.opends.server.tools.makeldif;
import org.opends.messages.Message;
@@ -169,14 +169,15 @@
    }
    String lowerName = toLowerCase(arguments[0]);
    AttributeType t = DirectoryServer.getAttributeType(lowerName, true);
    if (! template.hasAttribute(t))
    attributeType = DirectoryServer.getAttributeType(lowerName, true);
    if (! template.hasAttribute(attributeType))
    {
      Message message =
          ERR_MAKELDIF_TAG_UNDEFINED_ATTRIBUTE.get(arguments[0], lineNumber);
      throw new InitializationException(message);
    }
    if (arguments.length == 2)
    {
      assertionValue = arguments[1];
opends/src/server/org/opends/server/tools/makeldif/IfPresentTag.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Copyright 2006-2010 Sun Microsystems, Inc.
 */
package org.opends.server.tools.makeldif;
import org.opends.messages.Message;
@@ -169,8 +169,8 @@
    }
    String lowerName = toLowerCase(arguments[0]);
    AttributeType t = DirectoryServer.getAttributeType(lowerName, true);
    if (! template.hasAttribute(t))
    attributeType = DirectoryServer.getAttributeType(lowerName, true);
    if (! template.hasAttribute(attributeType))
    {
      Message message =
          ERR_MAKELDIF_TAG_UNDEFINED_ATTRIBUTE.get(arguments[0], lineNumber);