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

coulbeck
11.42.2006 c0144353899d1191c10de1d50e60036e508d5189
opends/src/server/org/opends/server/core/SearchOperation.java
@@ -944,9 +944,15 @@
          {
            // First, add the objectclass attribute.
            Attribute ocAttr = entry.getObjectClassAttribute();
            List<Attribute> ocList = new ArrayList<Attribute>(1);
            ocList.add(ocAttr);
            entryToReturn.putAttribute(ocAttr.getAttributeType(), ocList);
            try
            {
              entryToReturn.setObjectClasses(ocAttr.getValues());
            }
            catch (DirectoryException e)
            {
              // We cannot get this exception because the object classes have
              // already been validated in the entry they came from.
            }
            // Next iterate through all the user attributes and include them.
@@ -1125,18 +1131,34 @@
        }
        else
        {
          List<Attribute> attrList = entry.getAttribute(attrType, options);
          if (attrList != null)
          if (attrType.isObjectClassType() && !typesOnly)
          {
            if (typesOnly)
            Attribute ocAttr = entry.getObjectClassAttribute();
            try
            {
              attrList = new ArrayList<Attribute>(1);
              attrList.add(new Attribute(attrType));
              entryToReturn.putAttribute(attrType, attrList);
              entryToReturn.setObjectClasses(ocAttr.getValues());
            }
            else
            catch (DirectoryException e)
            {
              entryToReturn.putAttribute(attrType, attrList);
              // We cannot get this exception because the object classes have
              // already been validated in the entry they came from.
            }
          }
          else
          {
            List<Attribute> attrList = entry.getAttribute(attrType, options);
            if (attrList != null)
            {
              if (typesOnly)
              {
                attrList = new ArrayList<Attribute>(1);
                attrList.add(new Attribute(attrType));
                entryToReturn.putAttribute(attrType, attrList);
              }
              else
              {
                entryToReturn.putAttribute(attrType, attrList);
              }
            }
          }
        }
@@ -1564,7 +1586,7 @@
    else
    {
      // FIXME -- Factor in the user's effective time limit.
      timeLimitExpiration = processingStartTime + (1000 * timeLimit);
      timeLimitExpiration = processingStartTime + (1000L * timeLimit);
    }