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

coulbeck
18.08.2006 c59836d5e2551d9ee8be2869a932487a2de17dab
Mark Craig found a couple of bugs in the LDIF reader to do with rejected entries.
2 files modified
19 ■■■■■ changed files
opends/src/server/org/opends/server/messages/UtilityMessages.java 4 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/util/LDIFReader.java 15 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/messages/UtilityMessages.java
@@ -1459,8 +1459,8 @@
                    "duplicate attribute %s with value %s.  The second " +
                    "occurrence of that attribute value has been skipped.");
    registerMessage(MSGID_LDIF_MULTIPLE_VALUES_FOR_SINGLE_VALUED_ATTR,
                    "Entry %s includes multiple values for single-valued " +
                    "attribute %s.");
                    "Entry %s starting at line %d includes multiple values " +
                    "for single-valued attribute %s.");
    registerMessage(MSGID_LDIF_INVALID_ATTR_SYNTAX,
                    "Unable to parse LDIF entry %s starting at line %d " +
                    "because it has an invalid value \"%s\" for attribute " +
opends/src/server/org/opends/server/util/LDIFReader.java
@@ -241,12 +241,19 @@
           new HashMap<AttributeType,List<Attribute>>();
      HashMap<AttributeType,List<Attribute>> operationalAttributes =
           new HashMap<AttributeType,List<Attribute>>();
      for (StringBuilder line : lines)
      try
      {
        readAttribute(lines, line, entryDN, objectClasses, userAttributes,
                      operationalAttributes);
        for (StringBuilder line : lines)
        {
          readAttribute(lines, line, entryDN, objectClasses, userAttributes,
                        operationalAttributes);
        }
      }
      catch (LDIFException e)
      {
        entriesRejected++;
        throw e;
      }
      // Create the entry and see if it is one that should be included in the
      // import.