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

jvergara
19.20.2009 ccf889e78b4a540e88c56c84646aa330788d4f00
Avoid a NullPointerException when modifying an entry containing attributes not defined in the schema (such as the entries under cn=admin data).
1 files modified
6 ■■■■■ changed files
opends/src/guitools/org/opends/guitools/controlpanel/task/ModifyEntryTask.java 6 ●●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/controlpanel/task/ModifyEntryTask.java
@@ -62,6 +62,7 @@
import org.opends.messages.AdminToolMessages;
import org.opends.messages.Message;
import org.opends.server.config.ConfigConstants;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.*;
/**
@@ -507,6 +508,11 @@
      }
      AttributeType attrType = schema.getAttributeType(
          attr.getName().toLowerCase());
      if (attrType == null)
      {
        attrType = DirectoryServer.getDefaultAttributeType(
            attr.getName().toLowerCase());
      }
      Set<AttributeValue> newValues = new LinkedHashSet<AttributeValue>();
      Iterator<AttributeValue> it = attr.iterator();
      while (it.hasNext())