Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-966

NPE When ObjectClass Attribute Missing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.3
    • 1.0.3
    • None
    • None

    Description

      In the code below the attribute is not added to the attributes. When attempting to create a subcontext, this results in an NPE.

      ========================================
      Attributes attributes =
      new BasicAttributes();
      Attribute attribute =
      new BasicAttribute(
      "objectClass",
      "top");
      attribute.add("subentry");
      directoryContextL0 =
      (DirContext)
      testPartitionContext.
      createSubcontext(l0RDN, attributes);

      directoryContextL1 =
      (DirContext)
      directoryContextL0.
      createSubcontext(l1RDN, attributes);
      ========================================

      When I try running the test above I get this:

      org.apache.directory.server.core.interceptor.InterceptorException: Unexpected exception. [Root exception is java.lang.NullPointerException]

      Attachments

        Activity

          People

            elecharny Emmanuel Lécharny
            ole Ole Solberg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: