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

Jean-Noel Rouvignac
25.53.2013 c717a729ce2e4ae0f9fb52a125d72a83dab101c0
OPENDJ-390 (CR-1319) ConcurrentModificationException during backup all 

Entry.java:
duplicate() method is used to clone an Entry to avoid modifying it, but while cloning, it actually modifies the current object. Doh! The current object is not modified anymore during the cloning.
1 files modified
7 ■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/types/Entry.java 7 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/types/Entry.java
@@ -2945,16 +2945,19 @@
    deepCopy(operationalAttributes, operationalAttrsCopy, false,
        false, false, true, false);
    // Put back all the suppressed attributes where they belonged to.
    // Then hopefully processVirtualAttributes() will rebuild the suppressed
    // attribute list correctly.
    for (AttributeType t : suppressedAttributes.keySet())
    {
      List<Attribute> attrList = suppressedAttributes.get(t);
      if (t.isOperational())
      {
        operationalAttributes.put(t, attrList);
        operationalAttrsCopy.put(t, attrList);
      }
      else
      {
        userAttributes.put(t, attrList);
        userAttrsCopy.put(t, attrList);
      }
    }