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

Jean-Noël Rouvignac
06.25.2016 d89c47e7cb1b3c9181e25582539aac1dedb46099
opendj-openidm-account-change-notification-handler/src/main/java/org/forgerock/openidm/accountchange/OpenidmAccountStatusNotificationHandler.java
@@ -413,7 +413,7 @@
        Set<AttributeType> notificationAttrs = config.getAttributeType();
        for (AttributeType t : notificationAttrs) {
            for (Attribute a : userEntry.getAttribute(t)) {
            for (Attribute a : userEntry.getAllAttributes(t)) {
                List<String> attrVals = new ArrayList<>();
                String attrName = a.getAttributeDescription().getAttributeType().getNameOrOID();
                for (ByteString v : a) {
opendj-server-legacy/src/main/java/org/opends/server/admin/AdministrationDataSync.java
@@ -223,7 +223,7 @@
    {
      SearchResultEntry adminConnectorEntry = result.getFirst();
      AttributeType attrType = DirectoryServer.getSchema().getAttributeType(attrName);
      List<Attribute> attrs = adminConnectorEntry.getAttribute(attrType);
      List<Attribute> attrs = adminConnectorEntry.getAllAttributes(attrType);
      if (!attrs.isEmpty())
      {
        // Get the attribute value
opendj-server-legacy/src/main/java/org/opends/server/api/AuthenticationPolicy.java
@@ -70,7 +70,7 @@
    // First check to see if the ds-pwp-password-policy-dn is present.
    String userDNString = userEntry.getName().toString();
    AttributeType type = DirectoryServer.getSchema().getAttributeType(OP_ATTR_PWPOLICY_POLICY_DN);
    for (Attribute a : userEntry.getAttribute(type))
    for (Attribute a : userEntry.getAllAttributes(type))
    {
      if (a.isEmpty())
      {
opendj-server-legacy/src/main/java/org/opends/server/api/AuthenticationPolicyState.java
@@ -95,7 +95,7 @@
  protected static ConditionResult getBoolean(final Entry entry,
      final AttributeType attributeType) throws DirectoryException
  {
    for (final Attribute a : entry.getAttribute(attributeType))
    for (final Attribute a : entry.getAllAttributes(attributeType))
    {
      if (a.isEmpty())
      {
@@ -170,7 +170,7 @@
  {
    long timeValue = -1;
    for (final Attribute a : entry.getAttribute(attributeType))
    for (final Attribute a : entry.getAllAttributes(attributeType))
    {
      if (a.isEmpty())
      {
opendj-server-legacy/src/main/java/org/opends/server/api/ClientConnection.java
@@ -1057,7 +1057,7 @@
    }
    AttributeType privType = DirectoryServer.getSchema().getAttributeType(OP_ATTR_PRIVILEGE_NAME);
    for (Attribute a : entry.getAttribute(privType))
    for (Attribute a : entry.getAllAttributes(privType))
    {
      for (ByteString v : a)
      {
opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/AciHandler.java
@@ -688,7 +688,7 @@
          && resourceEntry.hasAttribute(modAttrType))
      {
        container.setCurrentAttributeType(modAttrType);
        for (Attribute a : resourceEntry.getAttribute(modAttr.getAttributeDescription()))
        for (Attribute a : resourceEntry.getAllAttributes(modAttr.getAttributeDescription()))
        {
          for (ByteString v : a)
          {
@@ -728,7 +728,7 @@
            break;
          case INCREMENT:
            Entry modifiedEntry = operation.getModifiedEntry();
            for (Attribute attr : modifiedEntry.getAttribute(modAttr.getAttributeDescription()))
            for (Attribute attr : modifiedEntry.getAllAttributes(modAttr.getAttributeDescription()))
            {
              for (ByteString val : attr)
              {
opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/AciList.java
@@ -203,13 +203,13 @@
      //DN is checked to verify it is equal to the config DN. If not those
      //attributes are skipped.
      if(hasGlobalAci && entry.getName().equals(configDN)) {
          List<Attribute> attributeList = entry.getAttribute(globalAciType);
          List<Attribute> attributeList = entry.getAllAttributes(globalAciType);
          validAcis = addAciAttributeList(aciList, DN.rootDN(), configDN,
                                          attributeList, failedACIMsgs);
      }
      if(hasAci) {
          List<Attribute> attributeList = entry.getAttribute(aciType);
          List<Attribute> attributeList = entry.getAllAttributes(aciType);
          validAcis += addAciAttributeList(aciList, entry.getName(), configDN,
                                           attributeList, failedACIMsgs);
      }
@@ -299,7 +299,7 @@
      //attributes are skipped.
      if(hasGlobalAci && oldEntry.getName().equals(configDN)) {
          aciList.remove(DN.rootDN());
          List<Attribute> attributeList = newEntry.getAttribute(globalAciType);
          List<Attribute> attributeList = newEntry.getAllAttributes(globalAciType);
          addAciAttributeList(aciList, DN.rootDN(), configDN,
                              attributeList, failedACIMsgs);
      }
opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/GroupDN.java
@@ -129,7 +129,7 @@
    public static boolean evaluate (Entry e, AciEvalContext evalCtx,
                                           AttributeType attributeType,
                                           DN suffixDN) {
        List<Attribute> attrs = e.getAttribute(attributeType);
        List<Attribute> attrs = e.getAllAttributes(attributeType);
        for(ByteString v : attrs.get(0)) {
            try {
                DN groupDN = DN.valueOf(v.toString());
opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/TargAttrFilters.java
@@ -358,7 +358,7 @@
    {
      // Found a match in the entry, iterate over each attribute
      // type in the entry and check its values against the filter.
      for (Attribute a : entry.getAttribute(attrType))
      for (Attribute a : entry.getAllAttributes(attrType))
      {
        if (!matchFilterAttributeValues(a, attrType, f))
        {
opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/UserAttr.java
@@ -214,7 +214,7 @@
    private EnumEvalResult evalURL(AciEvalContext evalCtx) {
        EnumEvalResult matched= EnumEvalResult.FALSE;
        AttributeType attrType = DirectoryServer.getSchema().getAttributeType(attrStr);
        List<Attribute> attrs=evalCtx.getResourceEntry().getAttribute(attrType);
        List<Attribute> attrs=evalCtx.getResourceEntry().getAllAttributes(attrType);
        for(Attribute a : attrs) {
            for(ByteString v : a) {
                LDAPURL url;
opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/UserDN.java
@@ -344,7 +344,7 @@
     */
    public static boolean evaluate(Entry e, DN clientDN,
                                           AttributeType attrType) {
        List<Attribute> attrs =  e.getAttribute(attrType);
        List<Attribute> attrs =  e.getAllAttributes(attrType);
        for(ByteString v : attrs.get(0)) {
            try {
                DN dn = DN.valueOf(v.toString());
opendj-server-legacy/src/main/java/org/opends/server/backends/BackupBackend.java
@@ -379,7 +379,7 @@
      Entry backupDirEntry = getBackupDirectoryEntry(entryDN);
      AttributeType t = getSchema().getAttributeType(ATTR_BACKUP_DIRECTORY_PATH);
      List<Attribute> attrList = backupDirEntry.getAttribute(t);
      List<Attribute> attrList = backupDirEntry.getAllAttributes(t);
      for (ByteString v : attrList.get(0))
      {
        try
@@ -743,7 +743,7 @@
          if (scope != SearchScope.SINGLE_LEVEL)
          {
            List<Attribute> attrList = backupDirEntry.getAttribute(backupPathType);
            List<Attribute> attrList = backupDirEntry.getAllAttributes(backupPathType);
            returnEntries(searchOperation, backupDirDN, filter, attrList);
          }
        }
@@ -762,7 +762,7 @@
      if (scope != SearchScope.BASE_OBJECT)
      {
        AttributeType t = getSchema().getAttributeType(ATTR_BACKUP_DIRECTORY_PATH);
        List<Attribute> attrList = backupDirEntry.getAttribute(t);
        List<Attribute> attrList = backupDirEntry.getAllAttributes(t);
        returnEntries(searchOperation, baseDN, filter, attrList);
      }
    }
opendj-server-legacy/src/main/java/org/opends/server/backends/SchemaBackend.java
@@ -2609,7 +2609,7 @@
    // loop on the attribute types in the entry just received
    // and add them in the existing schema.
    Set<String> oidList = new HashSet<>(1000);
    for (Attribute a : newSchemaEntry.getAttribute(attributeTypesType))
    for (Attribute a : newSchemaEntry.getAllAttributes(attributeTypesType))
    {
      // Look for attribute types that could have been added to the schema
      // or modified in the schema
@@ -2660,7 +2660,7 @@
    // loop on the objectClasses from the entry, search if they are
    // already in the current schema, add them if not.
    oidList.clear();
    for (Attribute a : newSchemaEntry.getAttribute(objectClassesType))
    for (Attribute a : newSchemaEntry.getAllAttributes(objectClassesType))
    {
      for (ByteString v : a)
      {
opendj-server-legacy/src/main/java/org/opends/server/backends/TrustStoreBackend.java
@@ -1077,7 +1077,7 @@
      }
      else
      {
        List<Attribute> certAttrs = entry.getAttribute(
        List<Attribute> certAttrs = entry.getAllAttributes(
             ATTR_CRYPTO_PUBLIC_KEY_CERTIFICATE);
        if (certAttrs.isEmpty())
        {
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/AttributeIndex.java
@@ -160,7 +160,7 @@
    void indexEntry(Entry entry, Set<ByteString> keys)
    {
      for (Attribute attr : entry.getAttribute(attributeType))
      for (Attribute attr : entry.getAllAttributes(attributeType))
      {
        if (!attr.isVirtual())
        {
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/VLVIndex.java
@@ -805,7 +805,7 @@
    final AttributeDescription attrDesc = AttributeDescription.valueOf(sortKey.getAttributeDescription());
    final MatchingRule matchingRule = getEffectiveOrderingRule(sortKey);
    ByteString sortValue = null;
    for (Attribute a : entry.getAttribute(attrDesc.getAttributeType()))
    for (Attribute a : entry.getAllAttributes(attrDesc.getAttributeType()))
    {
      for (ByteString v : a)
      {
opendj-server-legacy/src/main/java/org/opends/server/backends/task/RecurringTask.java
@@ -234,7 +234,7 @@
      Arg1<Object> multipleEntriesErrorMsg, Arg1<Object> noAttrValueErrorMsg) throws DirectoryException
  {
    AttributeType attrType = DirectoryServer.getSchema().getAttributeType(attrName);
    List<Attribute> attrList = taskEntry.getAttribute(attrType);
    List<Attribute> attrList = taskEntry.getAllAttributes(attrType);
    if (attrList.isEmpty())
    {
      LocalizableMessage message = noEntryErrorMsg.get(attrName);
opendj-server-legacy/src/main/java/org/opends/server/backends/task/Task.java
@@ -311,7 +311,7 @@
  private String getAttributeValue(String attributeName, boolean isRequired)
          throws InitializationException
  {
    List<Attribute> attrList = taskEntry.getAttribute(attributeName);
    List<Attribute> attrList = taskEntry.getAllAttributes(attributeName);
    if (attrList.isEmpty())
    {
      if (isRequired)
@@ -360,7 +360,7 @@
  private LinkedList<String> getAttributeValues(String attributeName) throws InitializationException
  {
    LinkedList<String> valueStrings = new LinkedList<>();
    List<Attribute> attrList = taskEntry.getAttribute(attributeName);
    List<Attribute> attrList = taskEntry.getAllAttributes(attributeName);
    if (attrList.isEmpty())
    {
      return valueStrings;
opendj-server-legacy/src/main/java/org/opends/server/backends/task/TaskScheduler.java
@@ -1809,7 +1809,7 @@
  {
    // Get the name of the class that implements the task logic.
    AttributeType attrType = DirectoryServer.getSchema().getAttributeType(ATTR_TASK_CLASS);
    List<Attribute> attrList = entry.getAttribute(attrType);
    List<Attribute> attrList = entry.getAllAttributes(attrType);
    if (attrList.isEmpty())
    {
      LocalizableMessage message = ERR_TASKSCHED_NO_CLASS_ATTRIBUTE.get(ATTR_TASK_ID);
opendj-server-legacy/src/main/java/org/opends/server/core/PasswordPolicyState.java
@@ -181,7 +181,7 @@
  private Attribute getFirstAttributeNotEmpty(AttributeType attributeType)
  {
    for (Attribute a : userEntry.getAttribute(attributeType))
    for (Attribute a : userEntry.getAllAttributes(attributeType))
    {
      if (!a.isEmpty())
      {
@@ -205,7 +205,7 @@
  {
    ArrayList<Long> timeValues = new ArrayList<>();
    for (Attribute a : userEntry.getAttribute(attributeType))
    for (Attribute a : userEntry.getAllAttributes(attributeType))
    {
      for (ByteString v : a)
      {
@@ -926,7 +926,7 @@
    boolean isGeneralizedTime = SYNTAX_GENERALIZED_TIME_NAME.equals(type.getSyntax().getName());
    lastLoginTime = -1;
    for (Attribute a : userEntry.getAttribute(type))
    for (Attribute a : userEntry.getAllAttributes(type))
    {
      if (a.isEmpty())
      {
@@ -1887,7 +1887,7 @@
   */
  public List<ByteString> getClearPasswords()
  {
    final List<Attribute> attrList = userEntry.getAttribute(passwordPolicy.getPasswordAttribute());
    final List<Attribute> attrList = userEntry.getAllAttributes(passwordPolicy.getPasswordAttribute());
    if (attrList.isEmpty())
    {
      return Collections.emptyList();
@@ -1946,7 +1946,7 @@
  @Override
  public boolean passwordMatches(ByteString password)
  {
    List<Attribute> attrList = userEntry.getAttribute(passwordPolicy.getPasswordAttribute());
    List<Attribute> attrList = userEntry.getAllAttributes(passwordPolicy.getPasswordAttribute());
    if (attrList.isEmpty())
    {
      if (logger.isTraceEnabled())
@@ -2117,7 +2117,7 @@
    }
    AttributeType type = passwordPolicy.getPasswordAttribute();
    List<Attribute> attrList = userEntry.getAttribute(type);
    List<Attribute> attrList = userEntry.getAllAttributes(type);
    if (attrList.isEmpty())
    {
      logger.trace("Doing nothing for entry %s because no password values were found.", userDNString);
@@ -2348,7 +2348,7 @@
  {
    TreeMap<Long, ByteString> historyMap = new TreeMap<>();
    AttributeType historyType = DirectoryServer.getSchema().getAttributeType(OP_ATTR_PWPOLICY_HISTORY_LC);
    for (Attribute a : userEntry.getAttribute(historyType))
    for (Attribute a : userEntry.getAllAttributes(historyType))
    {
      for (ByteString v : a)
      {
@@ -2497,7 +2497,7 @@
   */
  public void updatePasswordHistory()
  {
    for (Attribute a : userEntry.getAttribute(passwordPolicy.getPasswordAttribute()))
    for (Attribute a : userEntry.getAllAttributes(passwordPolicy.getPasswordAttribute()))
    {
      ByteString insecurePassword = null;
      for (ByteString v : a)
@@ -2660,7 +2660,7 @@
  {
    ArrayList<String> historyValues = new ArrayList<>();
    AttributeType historyType = DirectoryServer.getSchema().getAttributeType(OP_ATTR_PWPOLICY_HISTORY_LC);
    for (Attribute a : userEntry.getAttribute(historyType))
    for (Attribute a : userEntry.getAllAttributes(historyType))
    {
      for (ByteString v : a)
      {
opendj-server-legacy/src/main/java/org/opends/server/core/SubentryPasswordPolicy.java
@@ -251,7 +251,7 @@
    {
      AttributeType pwdAttrType =
          DirectoryServer.getSchema().getAttributeType(PWD_ATTR_VALIDATOR);
      for (Attribute attr : entry.getAttribute(pwdAttrType))
      for (Attribute attr : entry.getAllAttributes(pwdAttrType))
      {
        for (ByteString val : attr)
        {
@@ -370,7 +370,7 @@
  private String getAttrValue(Entry entry, String pwdAttrName)
  {
    AttributeType pwdAttrType = DirectoryServer.getSchema().getAttributeType(pwdAttrName);
    for (Attribute attr : entry.getAttribute(pwdAttrType))
    for (Attribute attr : entry.getAllAttributes(pwdAttrType))
    {
      for (ByteString value : attr)
      {
opendj-server-legacy/src/main/java/org/opends/server/crypto/CryptoManagerSync.java
@@ -337,8 +337,8 @@
   */
  private void modifyEntry(Entry srcEntry, Entry dstEntry)
  {
    List<Attribute> srcList = srcEntry.getAttribute(attrCert);
    List<Attribute> dstList = dstEntry.getAttribute(attrCert);
    List<Attribute> srcList = srcEntry.getAllAttributes(attrCert);
    List<Attribute> dstList = dstEntry.getAllAttributes(attrCert);
    // Check for changes to the certificate value.
    if (!srcList.equals(dstList))
@@ -392,7 +392,7 @@
  private void putAttributeTypeIfExist(Map<AttributeType, List<Attribute>> userAttrs, Entry srcEntry,
      AttributeType attrType)
  {
    List<Attribute> attrList = srcEntry.getAttribute(attrType);
    List<Attribute> attrList = srcEntry.getAllAttributes(attrType);
    if (!attrList.isEmpty())
    {
      userAttrs.put(attrType, new ArrayList<>(attrList));
opendj-server-legacy/src/main/java/org/opends/server/extensions/AttributeValuePasswordValidator.java
@@ -136,7 +136,7 @@
    final ByteString vr = ByteString.valueOfUtf8(reversed);
    for (AttributeType t : matchAttributes)
    {
      for (Attribute a : userEntry.getAttribute(t))
      for (Attribute a : userEntry.getAllAttributes(t))
      {
        if (a.contains(vf) ||
            (config.isTestReversedPassword() && a.contains(vr)) ||
opendj-server-legacy/src/main/java/org/opends/server/extensions/DynamicGroup.java
@@ -114,7 +114,7 @@
    // out the LDAP URLs that it contains.
    LinkedHashSet<LDAPURL> memberURLs = new LinkedHashSet<>();
    AttributeType memberURLType = DirectoryServer.getSchema().getAttributeType(ATTR_MEMBER_URL_LC);
    for (Attribute a : groupEntry.getAttribute(memberURLType))
    for (Attribute a : groupEntry.getAllAttributes(memberURLType))
    {
      for (ByteString v : a)
      {
opendj-server-legacy/src/main/java/org/opends/server/extensions/ExternalSASLMechanismHandler.java
@@ -206,7 +206,7 @@
    // Get the userCertificate attribute from the user's entry for use in the
    // validation process.
    List<Attribute> certAttrList = userEntry.getAttribute(certificateAttributeType);
    List<Attribute> certAttrList = userEntry.getAllAttributes(certificateAttributeType);
    switch (validationPolicy)
    {
      case ALWAYS:
opendj-server-legacy/src/main/java/org/opends/server/extensions/LDAPPassThroughAuthenticationPolicyFactory.java
@@ -1451,7 +1451,7 @@
            // The bind DN is contained in an attribute in the user's entry.
            mapBind: for (final AttributeType at : cfg.getMappedAttribute())
            {
              for (final Attribute attribute : userEntry.getAttribute(at))
              for (final Attribute attribute : userEntry.getAllAttributes(at))
              {
                if (!attribute.isEmpty())
                {
@@ -1486,7 +1486,7 @@
            final LinkedList<SearchFilter> filterComponents = new LinkedList<>();
            for (final AttributeType at : cfg.getMappedAttribute())
            {
              for (final Attribute attribute : userEntry.getAttribute(at))
              for (final Attribute attribute : userEntry.getAllAttributes(at))
              {
                for (final ByteString value : attribute)
                {
@@ -1622,7 +1622,7 @@
        boolean foundValidCachedPasswordTime = false;
        foundCachedPasswordTime:
        for (Attribute attribute : userEntry.getAttribute(cachedPasswordTimeAttribute))
        for (Attribute attribute : userEntry.getAllAttributes(cachedPasswordTimeAttribute))
        {
          // Ignore any attributes with options.
          if (!attribute.getAttributeDescription().hasOptions())
@@ -1656,7 +1656,7 @@
        // Next determine if there is a cached password.
        ByteString cachedPassword = null;
        foundCachedPassword:
        for (Attribute attribute : userEntry.getAttribute(cachedPasswordAttribute))
        for (Attribute attribute : userEntry.getAllAttributes(cachedPasswordAttribute))
        {
          // Ignore any attributes with options.
          if (!attribute.getAttributeDescription().hasOptions())
opendj-server-legacy/src/main/java/org/opends/server/extensions/SMTPAccountStatusNotificationHandler.java
@@ -489,7 +489,7 @@
      Entry userEntry = notification.getUserEntry();
      for (AttributeType t : addressAttrs)
      {
        for (Attribute a : userEntry.getAttribute(t))
        for (Attribute a : userEntry.getAllAttributes(t))
        {
          for (ByteString v : a)
          {
opendj-server-legacy/src/main/java/org/opends/server/extensions/StaticGroup.java
@@ -195,7 +195,7 @@
      throw new DirectoryException(ResultCode.OBJECTCLASS_VIOLATION, message);
    }
    List<Attribute> memberAttrList = groupEntry.getAttribute(someMemberAttributeType);
    List<Attribute> memberAttrList = groupEntry.getAllAttributes(someMemberAttributeType);
    int membersCount = 0;
    for (Attribute a : memberAttrList)
    {
opendj-server-legacy/src/main/java/org/opends/server/extensions/UserAttributeNotificationMessageTemplateElement.java
@@ -49,7 +49,7 @@
                            AccountStatusNotification notification)
  {
    Entry userEntry = notification.getUserEntry();
    for (Attribute a : userEntry.getAttribute(attributeType))
    for (Attribute a : userEntry.getAllAttributes(attributeType))
    {
      for (ByteString v : a)
      {
opendj-server-legacy/src/main/java/org/opends/server/extensions/VirtualStaticGroup.java
@@ -110,7 +110,7 @@
    // Get the target group DN attribute from the entry, if there is one.
    DN targetDN = null;
    AttributeType targetType = DirectoryServer.getSchema().getAttributeType(ATTR_TARGET_GROUP_DN);
    for (Attribute a : groupEntry.getAttribute(targetType))
    for (Attribute a : groupEntry.getAllAttributes(targetType))
    {
      for (ByteString v : a)
      {
opendj-server-legacy/src/main/java/org/opends/server/plugins/EntryUUIDPlugin.java
@@ -100,7 +100,7 @@
  {
    // See if the entry being imported already contains an entryUUID attribute.
    // If so, then leave it alone.
    List<Attribute> uuidList = entry.getAttribute(entryUUIDType);
    List<Attribute> uuidList = entry.getAllAttributes(entryUUIDType);
    if (!uuidList.isEmpty())
    {
      return PluginResult.ImportLDIF.continueEntryProcessing();
opendj-server-legacy/src/main/java/org/opends/server/plugins/PasswordPolicyImportPlugin.java
@@ -298,7 +298,7 @@
    // See if the entry explicitly states the password policy that it should
    // use.  If so, then only use it to perform the encoding.
    List<Attribute> attrList = entry.getAttribute(customPolicyAttribute);
    List<Attribute> attrList = entry.getAllAttributes(customPolicyAttribute);
    if (!attrList.isEmpty())
    {
      DN policyDN = null;
@@ -337,7 +337,7 @@
        PasswordStorageScheme<?>[] schemes = schemesByPolicy.get(policyDN);
        if (schemes != null)
        {
          attrList = entry.getAttribute(policy.getPasswordAttribute());
          attrList = entry.getAllAttributes(policy.getPasswordAttribute());
          if (attrList.isEmpty())
          {
            return PluginResult.ImportLDIF.continueEntryProcessing();
@@ -418,7 +418,7 @@
    // appropriate schemes.
    for (AttributeType t : authPasswordTypes)
    {
      for (Attribute a : entry.getAttribute(t))
      for (Attribute a : entry.getAllAttributes(t))
      {
        AttributeBuilder builder = new AttributeBuilder(a.getAttributeDescription());
        boolean gotError = false;
@@ -461,7 +461,7 @@
    // appropriate schemes.
    for (AttributeType t : userPasswordTypes)
    {
      for (Attribute a : entry.getAttribute(t))
      for (Attribute a : entry.getAllAttributes(t))
      {
        AttributeBuilder builder = new AttributeBuilder(a.getAttributeDescription());
        boolean gotError = false;
opendj-server-legacy/src/main/java/org/opends/server/plugins/ReferentialIntegrityPlugin.java
@@ -1043,7 +1043,7 @@
    for (AttributeType attrType : attributeTypes)
    {
      final List<Attribute> attrs = entry.getAttribute(attrType, false);
      final List<Attribute> attrs = entry.getAllAttributes(attrType, false);
      PluginResult.PreOperation result = isIntegrityMaintained(attrs, entryDN, entryBaseDN);
      if (result.getResultCode() != ResultCode.SUCCESS)
      {
opendj-server-legacy/src/main/java/org/opends/server/plugins/SevenBitCleanPlugin.java
@@ -129,7 +129,7 @@
    // Make sure all configured attributes have clean values.
    for (AttributeType t : config.getAttributeType())
    {
      for (Attribute a : entry.getAttribute(t))
      for (Attribute a : entry.getAllAttributes(t))
      {
        for (ByteString v : a)
        {
opendj-server-legacy/src/main/java/org/opends/server/plugins/UniqueAttributePlugin.java
@@ -200,7 +200,7 @@
    List<ByteString> recordedValues = new LinkedList<>();
    for (AttributeType t : config.getType())
    {
      for (Attribute a : entry.getAttribute(t))
      for (Attribute a : entry.getAllAttributes(t))
      {
        for (ByteString v : a)
        {
@@ -393,7 +393,7 @@
    DN entryDN = entry.getName();
    for (AttributeType t : config.getType())
    {
      for (Attribute a : entry.getAttribute(t))
      for (Attribute a : entry.getAllAttributes(t))
      {
        for (ByteString v : a)
        {
@@ -763,7 +763,7 @@
    //Remove the attribute value from the map.
    for (AttributeType t : config.getType())
    {
      for (Attribute a : entry.getAttribute(t))
      for (Attribute a : entry.getAllAttributes(t))
      {
        for (ByteString v : a)
        {
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/EntryHistorical.java
@@ -662,7 +662,7 @@
   */
  public static List<Attribute> getHistoricalAttr(Entry entry)
  {
    return entry.getAttribute(HISTORICAL_ATTRIBUTE_NAME);
    return entry.getAllAttributes(HISTORICAL_ATTRIBUTE_NAME);
  }
  /**
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/FractionalLDIFImportPlugin.java
@@ -401,7 +401,7 @@
  private Attribute getAttribute(String attributeName, Entry entry)
  {
    List<Attribute> attrs = entry.getAttribute(DirectoryServer.getSchema().getAttributeType(attributeName));
    List<Attribute> attrs = entry.getAllAttributes(DirectoryServer.getSchema().getAttributeType(attributeName));
    return !attrs.isEmpty() ? attrs.get(0) : null;
  }
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java
@@ -764,7 +764,7 @@
    if (resultEntry != null)
    {
      AttributeType synchronizationGenIDType = DirectoryServer.getSchema().getAttributeType(REPLICATION_GENERATION_ID);
      List<Attribute> attrs = resultEntry.getAttribute(synchronizationGenIDType);
      List<Attribute> attrs = resultEntry.getAllAttributes(synchronizationGenIDType);
      if (!attrs.isEmpty())
      {
        Attribute attr = attrs.get(0);
@@ -785,7 +785,7 @@
  private Iterator<ByteString> getAttributeValueIterator(SearchResultEntry resultEntry, String attrName)
  {
    AttributeType attrType = DirectoryServer.getSchema().getAttributeType(attrName);
    List<Attribute> exclAttrs = resultEntry.getAttribute(attrType);
    List<Attribute> exclAttrs = resultEntry.getAllAttributes(attrType);
    if (!exclAttrs.isEmpty())
    {
      Attribute exclAttr = exclAttrs.get(0);
@@ -3287,7 +3287,7 @@
      SearchResultEntry resultEntry = result.get(0);
      if (resultEntry != null)
      {
        List<Attribute> attrs = resultEntry.getAttribute(REPLICATION_GENERATION_ID);
        List<Attribute> attrs = resultEntry.getAllAttributes(REPLICATION_GENERATION_ID);
        if (!attrs.isEmpty())
        {
          Attribute attr = attrs.get(0);
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/PersistentServerState.java
@@ -212,7 +212,7 @@
  private void updateStateFromEntry(SearchResultEntry resultEntry)
  {
    AttributeType synchronizationStateType = DirectoryServer.getSchema().getAttributeType(REPLICATION_STATE);
    List<Attribute> attrs = resultEntry.getAttribute(synchronizationStateType);
    List<Attribute> attrs = resultEntry.getAllAttributes(synchronizationStateType);
    if (!attrs.isEmpty())
    {
      for (ByteString value : attrs.get(0))
@@ -344,7 +344,7 @@
      CSN dbMaxCSN = serverStateMaxCSN;
      for (SearchResultEntry resEntry : op.getSearchEntries())
      {
        for (ByteString attrValue : resEntry.getAttribute(histType).get(0))
        for (ByteString attrValue : resEntry.getAllAttributes(histType).get(0))
        {
          HistoricalAttributeValue histVal =
              new HistoricalAttributeValue(attrValue.toString());
opendj-server-legacy/src/main/java/org/opends/server/tasks/AddSchemaFileTask.java
@@ -88,7 +88,7 @@
    // Get the attribute that specifies which schema file(s) to add.
    Entry taskEntry = getTaskEntry();
    AttributeType attrType = DirectoryServer.getSchema().getAttributeType(ATTR_TASK_ADDSCHEMAFILE_FILENAME);
    List<Attribute> attrList = taskEntry.getAttribute(attrType);
    List<Attribute> attrList = taskEntry.getAllAttributes(attrType);
    if (attrList.isEmpty())
    {
      LocalizableMessage message = ERR_TASK_ADDSCHEMAFILE_NO_FILENAME.get(
opendj-server-legacy/src/main/java/org/opends/server/tasks/BackupTask.java
@@ -148,23 +148,23 @@
    AttributeType typeBackupDirectory = getSchema().getAttributeType(ATTR_BACKUP_DIRECTORY_PATH);
    AttributeType typeIncrementalBaseID = getSchema().getAttributeType(ATTR_TASK_BACKUP_INCREMENTAL_BASE_ID);
    backUpAll = TaskUtils.getBoolean(taskEntry.getAttribute(typeBackupAll), false);
    compress = TaskUtils.getBoolean(taskEntry.getAttribute(typeCompress), false);
    encrypt = TaskUtils.getBoolean(taskEntry.getAttribute(typeEncrypt), false);
    hash = TaskUtils.getBoolean(taskEntry.getAttribute(typeHash), false);
    incremental = TaskUtils.getBoolean(taskEntry.getAttribute(typeIncremental), false);
    signHash = TaskUtils.getBoolean(taskEntry.getAttribute(typeSignHash), false);
    backendIDList = TaskUtils.getMultiValueString(taskEntry.getAttribute(typeBackendID));
    backupID = TaskUtils.getSingleValueString(taskEntry.getAttribute(typeBackupID));
    backUpAll = TaskUtils.getBoolean(taskEntry.getAllAttributes(typeBackupAll), false);
    compress = TaskUtils.getBoolean(taskEntry.getAllAttributes(typeCompress), false);
    encrypt = TaskUtils.getBoolean(taskEntry.getAllAttributes(typeEncrypt), false);
    hash = TaskUtils.getBoolean(taskEntry.getAllAttributes(typeHash), false);
    incremental = TaskUtils.getBoolean(taskEntry.getAllAttributes(typeIncremental), false);
    signHash = TaskUtils.getBoolean(taskEntry.getAllAttributes(typeSignHash), false);
    backendIDList = TaskUtils.getMultiValueString(taskEntry.getAllAttributes(typeBackendID));
    backupID = TaskUtils.getSingleValueString(taskEntry.getAllAttributes(typeBackupID));
    String backupDirectoryPath = TaskUtils.getSingleValueString(taskEntry.getAttribute(typeBackupDirectory));
    String backupDirectoryPath = TaskUtils.getSingleValueString(taskEntry.getAllAttributes(typeBackupDirectory));
    backupDirectory = new File(backupDirectoryPath);
    if (! backupDirectory.isAbsolute())
    {
      backupDirectory = new File(DirectoryServer.getInstanceRoot(), backupDirectoryPath);
    }
    incrementalBase = TaskUtils.getSingleValueString(taskEntry.getAttribute(typeIncrementalBaseID));
    incrementalBase = TaskUtils.getSingleValueString(taskEntry.getAllAttributes(typeIncrementalBaseID));
    configEntries = TaskUtils.getBackendConfigEntries();
  }
opendj-server-legacy/src/main/java/org/opends/server/tasks/DisconnectClientTask.java
@@ -94,7 +94,7 @@
  private long getConnectionID(Entry taskEntry) throws DirectoryException
  {
    final AttributeType attrType = DirectoryServer.getSchema().getAttributeType(ATTR_TASK_DISCONNECT_CONN_ID);
    for (Attribute a : taskEntry.getAttribute(attrType))
    for (Attribute a : taskEntry.getAllAttributes(attrType))
    {
      for (ByteString v : a)
      {
@@ -115,7 +115,7 @@
  private boolean mustNotifyClient(Entry taskEntry) throws DirectoryException
  {
    final AttributeType attrType = DirectoryServer.getSchema().getAttributeType(ATTR_TASK_DISCONNECT_NOTIFY_CLIENT);
    for (Attribute a : taskEntry.getAttribute(attrType))
    for (Attribute a : taskEntry.getAllAttributes(attrType))
    {
      for (ByteString v : a)
      {
@@ -141,7 +141,7 @@
  private LocalizableMessage getDisconnectMessage(Entry taskEntry)
  {
    AttributeType attrType = DirectoryServer.getSchema().getAttributeType(ATTR_TASK_DISCONNECT_MESSAGE);
    for (Attribute a : taskEntry.getAttribute(attrType))
    for (Attribute a : taskEntry.getAllAttributes(attrType))
    {
      for (ByteString v : a)
      {
opendj-server-legacy/src/main/java/org/opends/server/tasks/ExportTask.java
@@ -152,7 +152,7 @@
    includeBranchStrings = toListOfString(taskEntry, ATTR_TASK_EXPORT_INCLUDE_BRANCH);
    excludeBranchStrings = toListOfString(taskEntry, ATTR_TASK_EXPORT_EXCLUDE_BRANCH);
    List<Attribute> attrList = taskEntry.getAttribute(typeWrapColumn);
    List<Attribute> attrList = taskEntry.getAllAttributes(typeWrapColumn);
    wrapColumn = TaskUtils.getSingleValueInteger(attrList, 0);
    includeOperationalAttributes = toBoolean(taskEntry, true, ATTR_TASK_EXPORT_INCLUDE_OPERATIONAL_ATTRIBUTES);
@@ -161,21 +161,21 @@
  private boolean toBoolean(Entry entry, boolean defaultValue, String attrName)
  {
    final AttributeType attrType = getSchema().getAttributeType(attrName);
    final List<Attribute> attrs = entry.getAttribute(attrType);
    final List<Attribute> attrs = entry.getAllAttributes(attrType);
    return TaskUtils.getBoolean(attrs, defaultValue);
  }
  private ArrayList<String> toListOfString(Entry entry, String attrName)
  {
    final AttributeType attrType = getSchema().getAttributeType(attrName);
    final List<Attribute> attrs = entry.getAttribute(attrType);
    final List<Attribute> attrs = entry.getAllAttributes(attrType);
    return TaskUtils.getMultiValueString(attrs);
  }
  private String toString(Entry entry, String attrName)
  {
    final AttributeType attrType = getSchema().getAttributeType(attrName);
    final List<Attribute> attrs = entry.getAttribute(attrType);
    final List<Attribute> attrs = entry.getAllAttributes(attrType);
    return TaskUtils.getSingleValueString(attrs);
  }
opendj-server-legacy/src/main/java/org/opends/server/tasks/ImportTask.java
@@ -342,25 +342,25 @@
  private int asInt(Entry taskEntry, AttributeType attributeType)
  {
    final List<Attribute> attrList = taskEntry.getAttribute(attributeType);
    final List<Attribute> attrList = taskEntry.getAllAttributes(attributeType);
    return TaskUtils.getSingleValueInteger(attrList, 0);
  }
  private boolean asBoolean(Entry taskEntry, AttributeType attributeType)
  {
    final List<Attribute> attrList = taskEntry.getAttribute(attributeType);
    final List<Attribute> attrList = taskEntry.getAllAttributes(attributeType);
    return TaskUtils.getBoolean(attrList, false);
  }
  private String asString(Entry taskEntry, AttributeType attributeType)
  {
    final List<Attribute> attrList = taskEntry.getAttribute(attributeType);
    final List<Attribute> attrList = taskEntry.getAllAttributes(attributeType);
    return TaskUtils.getSingleValueString(attrList);
  }
  private ArrayList<String> asListOfStrings(Entry taskEntry, AttributeType attributeType)
  {
    final List<Attribute> attrList = taskEntry.getAttribute(attributeType);
    final List<Attribute> attrList = taskEntry.getAllAttributes(attributeType);
    return TaskUtils.getMultiValueString(attrList);
  }
opendj-server-legacy/src/main/java/org/opends/server/tasks/InitializeTargetTask.java
@@ -72,7 +72,7 @@
    AttributeType typeDomainBase = getSchema().getAttributeType(ATTR_TASK_INITIALIZE_TARGET_DOMAIN_DN);
    AttributeType typeScope = getSchema().getAttributeType(ATTR_TASK_INITIALIZE_TARGET_SCOPE);
    List<Attribute> attrList = taskEntry.getAttribute(typeDomainBase);
    List<Attribute> attrList = taskEntry.getAllAttributes(typeDomainBase);
    domainString = TaskUtils.getSingleValueString(attrList);
    try
@@ -90,7 +90,7 @@
      throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, e);
    }
    attrList = taskEntry.getAttribute(typeScope);
    attrList = taskEntry.getAllAttributes(typeScope);
    String targetString = TaskUtils.getSingleValueString(attrList);
    target = domain.decodeTarget(targetString);
opendj-server-legacy/src/main/java/org/opends/server/tasks/InitializeTask.java
@@ -76,7 +76,7 @@
    AttributeType typeSourceScope = getSchema().getAttributeType(ATTR_TASK_INITIALIZE_SOURCE);
    List<Attribute> attrList;
    attrList = taskEntry.getAttribute(typeDomainBase);
    attrList = taskEntry.getAllAttributes(typeDomainBase);
    domainString = TaskUtils.getSingleValueString(attrList);
    try
@@ -93,7 +93,7 @@
      throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, e);
    }
    attrList = taskEntry.getAttribute(typeSourceScope);
    attrList = taskEntry.getAllAttributes(typeSourceScope);
    String sourceString = TaskUtils.getSingleValueString(attrList);
    source = domain.decodeSource(sourceString);
opendj-server-legacy/src/main/java/org/opends/server/tasks/PurgeConflictsHistoricalTask.java
@@ -87,7 +87,7 @@
    Entry taskEntry = getTaskEntry();
    AttributeType typeDomainBase = getSchema().getAttributeType(ATTR_TASK_CONFLICTS_HIST_PURGE_DOMAIN_DN);
    List<Attribute> attrList = taskEntry.getAttribute(typeDomainBase);
    List<Attribute> attrList = taskEntry.getAllAttributes(typeDomainBase);
    domainString = TaskUtils.getSingleValueString(attrList);
    try
@@ -105,7 +105,7 @@
    }
    AttributeType typeMaxDuration = getSchema().getAttributeType(ATTR_TASK_CONFLICTS_HIST_PURGE_MAX_DURATION);
    attrList = taskEntry.getAttribute(typeMaxDuration);
    attrList = taskEntry.getAllAttributes(typeMaxDuration);
    String maxDurationStringInSec = TaskUtils.getSingleValueString(attrList);
    if (maxDurationStringInSec != null)
opendj-server-legacy/src/main/java/org/opends/server/tasks/RebuildTask.java
@@ -96,7 +96,7 @@
    isClearDegradedState = Boolean.parseBoolean(val);
    AttributeType typeIndex = getSchema().getAttributeType(ATTR_REBUILD_INDEX);
    List<Attribute> attrList = taskEntry.getAttribute(typeIndex);
    List<Attribute> attrList = taskEntry.getAllAttributes(typeIndex);
    indexes = TaskUtils.getMultiValueString(attrList);
    rebuildMode = getRebuildMode(indexes);
@@ -114,7 +114,7 @@
  private String asString(Entry taskEntry, String attrName)
  {
    final AttributeType attrType = getSchema().getAttributeType(attrName);
    final List<Attribute> attrList = taskEntry.getAttribute(attrType);
    final List<Attribute> attrList = taskEntry.getAllAttributes(attrType);
    return TaskUtils.getSingleValueString(attrList);
  }
opendj-server-legacy/src/main/java/org/opends/server/tasks/ResetChangeNumberTask.java
@@ -97,7 +97,7 @@
  private List<Attribute> getTaskParameter(Entry taskEntry, String attrTaskResetChangeNumberTo)
  {
    AttributeType taskAttr = getSchema().getAttributeType(attrTaskResetChangeNumberTo);
    return taskEntry.getAttribute(taskAttr);
    return taskEntry.getAllAttributes(taskAttr);
  }
  @Override
opendj-server-legacy/src/main/java/org/opends/server/tasks/RestoreTask.java
@@ -114,7 +114,7 @@
    List<Attribute> attrList;
    attrList = taskEntry.getAttribute(typeBackupDirectory);
    attrList = taskEntry.getAllAttributes(typeBackupDirectory);
    String backupDirectoryPath = TaskUtils.getSingleValueString(attrList);
    backupDirectory = new File(backupDirectoryPath);
    if (! backupDirectory.isAbsolute())
@@ -123,10 +123,10 @@
           new File(DirectoryServer.getInstanceRoot(), backupDirectoryPath);
    }
    attrList = taskEntry.getAttribute(typebackupID);
    attrList = taskEntry.getAllAttributes(typebackupID);
    backupID = TaskUtils.getSingleValueString(attrList);
    attrList = taskEntry.getAttribute(typeVerifyOnly);
    attrList = taskEntry.getAllAttributes(typeVerifyOnly);
    verifyOnly = TaskUtils.getBoolean(attrList, false);
  }
opendj-server-legacy/src/main/java/org/opends/server/tasks/SetGenerationIdTask.java
@@ -68,7 +68,7 @@
    // Retrieves the eventual generation-ID
    AttributeType typeNewValue = getSchema().getAttributeType(ATTR_TASK_SET_GENERATION_ID_NEW_VALUE);
    List<Attribute> attrList = taskEntry.getAttribute(typeNewValue);
    List<Attribute> attrList = taskEntry.getAllAttributes(typeNewValue);
    if (!attrList.isEmpty())
    {
      try
@@ -86,7 +86,7 @@
    // Retrieves the replication domain
    AttributeType typeDomainBase = getSchema().getAttributeType(ATTR_TASK_SET_GENERATION_ID_DOMAIN_DN);
    attrList = taskEntry.getAttribute(typeDomainBase);
    attrList = taskEntry.getAllAttributes(typeDomainBase);
    domainString = TaskUtils.getSingleValueString(attrList);
    try
opendj-server-legacy/src/main/java/org/opends/server/tasks/ShutdownTask.java
@@ -75,7 +75,7 @@
    shutdownMessage = INFO_TASK_SHUTDOWN_DEFAULT_MESSAGE.get(taskEntry.getName());
    AttributeType attrType = DirectoryServer.getSchema().getAttributeType(ATTR_SHUTDOWN_MESSAGE);
    List<Attribute> attrList = taskEntry.getAttribute(attrType);
    List<Attribute> attrList = taskEntry.getAllAttributes(attrType);
    if (!attrList.isEmpty())
    {
      Attribute attr = attrList.get(0);
@@ -87,7 +87,7 @@
    }
    attrType = DirectoryServer.getSchema().getAttributeType(ATTR_RESTART_SERVER);
    attrList = taskEntry.getAttribute(attrType);
    attrList = taskEntry.getAllAttributes(attrType);
    if (!attrList.isEmpty())
    {
      Attribute attr = attrList.get(0);
opendj-server-legacy/src/main/java/org/opends/server/tools/BackendToolUtils.java
@@ -118,7 +118,7 @@
   */
  public static String getStringSingleValuedAttribute(Entry entry, String attrName)
  {
    List<Attribute> attributes = entry.getAttribute(attrName);
    List<Attribute> attributes = entry.getAllAttributes(attrName);
    if (!attributes.isEmpty())
    {
      Attribute attribute = attributes.get(0);
@@ -134,7 +134,7 @@
  {
    try
    {
      List<Attribute> attributes = configEntry.getAttribute(ATTR_BACKEND_BASE_DN);
      List<Attribute> attributes = configEntry.getAllAttributes(ATTR_BACKEND_BASE_DN);
      if (!attributes.isEmpty())
      {
        Attribute attribute = attributes.get(0);
opendj-server-legacy/src/main/java/org/opends/server/tools/ListBackends.java
@@ -418,7 +418,7 @@
      Set<DN> baseDNs = new TreeSet<>();
      try
      {
        List<Attribute> attributes = configEntry.getAttribute(ATTR_BACKEND_BASE_DN);
        List<Attribute> attributes = configEntry.getAllAttributes(ATTR_BACKEND_BASE_DN);
        if (!attributes.isEmpty())
        {
          Attribute attribute = attributes.get(0);
opendj-server-legacy/src/main/java/org/opends/server/tools/tasks/TaskEntry.java
@@ -416,7 +416,7 @@
  }
  private String getSingleStringValue(Entry entry, String attrName) {
    List<Attribute> attrList = entry.getAttribute(attrName);
    List<Attribute> attrList = entry.getAllAttributes(attrName);
    if (attrList.size() == 1) {
      Attribute attr = attrList.get(0);
      if (!attr.isEmpty()) {
@@ -428,7 +428,7 @@
  private List<String> getMultiStringValue(Entry entry, String attrName) {
    List<String> valuesList = new ArrayList<>();
    for (Attribute attr : entry.getAttribute(attrName)) {
    for (Attribute attr : entry.getAllAttributes(attrName)) {
      for (ByteString value : attr) {
        valuesList.add(value.toString());
      }
opendj-server-legacy/src/main/java/org/opends/server/types/Entry.java
@@ -568,7 +568,7 @@
   *          the attribute type
   * @return the List of user or operational attributes
   */
  private List<Attribute> getAttributes(AttributeType attrType)
  private List<Attribute> getAllAttributes0(AttributeType attrType)
  {
    return getUserOrOperationalAttributes(attrType).get(attrType);
  }
@@ -612,9 +612,9 @@
   *         attribute type, or an empty list if the specified
   *         attribute type is not present in this entry.
   */
  public List<Attribute> getAttribute(AttributeType attributeType)
  public List<Attribute> getAllAttributes(AttributeType attributeType)
  {
    return getAttribute(attributeType, true);
    return getAllAttributes(attributeType, true);
  }
@@ -633,7 +633,7 @@
   *          attribute type, or an empty list if the specified
   *          attribute type is not present in this entry.
   */
  public List<Attribute> getAttribute(AttributeType attributeType,
  public List<Attribute> getAllAttributes(AttributeType attributeType,
                                      boolean includeSubordinates)
  {
    if (includeSubordinates && !attributeType.isObjectClass())
@@ -734,13 +734,13 @@
   *          attribute type, or an empty list if the specified
   *          attribute type is not present in this entry.
   */
  public List<Attribute> getAttribute(String nameOrOID)
  public List<Attribute> getAllAttributes(String nameOrOID)
  {
    for (AttributeType attr : userAttributes.keySet())
    {
      if (attr.hasNameOrOID(nameOrOID))
      {
        return getAttribute(attr);
        return getAllAttributes(attr);
      }
    }
@@ -748,7 +748,7 @@
    {
      if (attr.hasNameOrOID(nameOrOID))
      {
        return getAttribute(attr);
        return getAllAttributes(attr);
      }
    }
@@ -773,7 +773,7 @@
   *          attribute type is not present in this entry with the
   *          provided set of options.
   */
  public List<Attribute> getAttribute(AttributeDescription attributeDescription)
  public List<Attribute> getAllAttributes(AttributeDescription attributeDescription)
  {
    AttributeType attributeType = attributeDescription.getAttributeType();
@@ -826,7 +826,7 @@
  public AttributeParser parseAttribute(String attributeDescription)
      throws LocalizedIllegalArgumentException, NullPointerException
  {
    final List<Attribute> attribute = getAttribute(attributeDescription);
    final List<Attribute> attribute = getAllAttributes(attributeDescription);
    return AttributeParser.parseAttribute(!attribute.isEmpty() ? attribute.get(0) : null);
  }
@@ -862,10 +862,10 @@
   */
  public List<Attribute> getUserAttribute(AttributeType attributeType)
  {
    return getAttribute(attributeType, userAttributes);
    return getAllAttributes(attributeType, userAttributes);
  }
  private List<Attribute> getAttribute(AttributeType attributeType,
  private List<Attribute> getAllAttributes(AttributeType attributeType,
      Map<AttributeType, List<Attribute>> attrs)
  {
    List<Attribute> results = new LinkedList<>();
@@ -873,7 +873,7 @@
    return results;
  }
  private List<Attribute> getAttribute(AttributeDescription attributeDescription,
  private List<Attribute> getAllAttributes(AttributeDescription attributeDescription,
      Map<AttributeType, List<Attribute>> attrs)
  {
    List<Attribute> results = new LinkedList<>();
@@ -942,7 +942,7 @@
   */
  public List<Attribute> getOperationalAttribute(AttributeType attributeType)
  {
    return getAttribute(attributeType, operationalAttributes);
    return getAllAttributes(attributeType, operationalAttributes);
  }
@@ -962,7 +962,7 @@
   */
  public List<Attribute> getOperationalAttribute(AttributeDescription attributeDescription)
  {
    return getAttribute(attributeDescription, operationalAttributes);
    return getAllAttributes(attributeDescription, operationalAttributes);
  }
@@ -1222,7 +1222,7 @@
  {
    AttributeDescription attrDesc = attribute.getAttributeDescription();
    AttributeType attrType = attrDesc.getAttributeType();
    List<Attribute> attributes = getAttributes(attrType);
    List<Attribute> attributes = getAllAttributes0(attrType);
    if (attributes == null)
    {
      // There are no attributes with the same attribute type.
@@ -1322,7 +1322,7 @@
   */
  public boolean hasValue(AttributeType attributeType, ByteString value)
  {
    for (Attribute a : getAttribute(attributeType))
    for (Attribute a : getAllAttributes(attributeType))
    {
      if (!a.getAttributeDescription().hasOptions() && a.contains(value))
      {
@@ -2857,7 +2857,7 @@
            try
            {
              DN inheritFromDN = null;
              for (Attribute attr : getAttribute(subEntry.getInheritFromDNType()))
              for (Attribute attr : getAllAttributes(subEntry.getInheritFromDNType()))
              {
                for (ByteString value : attr)
                {
@@ -2892,7 +2892,7 @@
            {
              try
              {
                for (Attribute attr : getAttribute(subEntry.getInheritFromRDNAttrType()))
                for (Attribute attr : getAllAttributes(subEntry.getInheritFromRDNAttrType()))
                {
                  inheritFromDN = subEntry.getInheritFromBaseDN();
                  for (ByteString value : attr)
@@ -4154,7 +4154,7 @@
   */
  public Attribute getExactAttribute(AttributeDescription attributeDescription)
  {
    List<Attribute> attributes = getAttributes(attributeDescription.getAttributeType());
    List<Attribute> attributes = getAllAttributes0(attributeDescription.getAttributeType());
    if (attributes != null)
    {
      for (Attribute attribute : attributes)
@@ -4240,7 +4240,7 @@
  {
    AttributeDescription attrDesc = attribute.getAttributeDescription();
    AttributeType attrType = attrDesc.getAttributeType();
    List<Attribute> attributes = getAttributes(attrType);
    List<Attribute> attributes = getAllAttributes0(attrType);
    if (attributes == null)
    {
      // Do nothing if we are deleting a non-existing attribute.
opendj-server-legacy/src/main/java/org/opends/server/types/SearchFilter.java
@@ -2569,7 +2569,7 @@
    }
    // See if the entry has an attribute with the requested type.
    List<Attribute> attrs = entry.getAttribute(attributeDescription);
    List<Attribute> attrs = entry.getAllAttributes(attributeDescription);
    if (attrs.isEmpty())
    {
      if (logger.isTraceEnabled())
@@ -2673,7 +2673,7 @@
    }
    // See if the entry has an attribute with the requested type.
    List<Attribute> attrs = entry.getAttribute(attributeDescription);
    List<Attribute> attrs = entry.getAllAttributes(attributeDescription);
    if (attrs.isEmpty())
    {
      if (logger.isTraceEnabled())
@@ -2774,7 +2774,7 @@
    }
    // See if the entry has an attribute with the requested type.
    List<Attribute> attrs = entry.getAttribute(attributeDescription);
    List<Attribute> attrs = entry.getAllAttributes(attributeDescription);
    if (attrs.isEmpty())
    {
      if (logger.isTraceEnabled())
@@ -2872,7 +2872,7 @@
    }
    // See if the entry has an attribute with the requested type.
    List<Attribute> attrs = entry.getAttribute(attributeDescription);
    List<Attribute> attrs = entry.getAllAttributes(attributeDescription);
    if (attrs.isEmpty())
    {
      if (logger.isTraceEnabled())
@@ -3015,7 +3015,7 @@
    }
    // See if the entry has an attribute with the requested type.
    List<Attribute> attrs = entry.getAttribute(attributeDescription);
    List<Attribute> attrs = entry.getAllAttributes(attributeDescription);
    if (attrs.isEmpty())
    {
      if (logger.isTraceEnabled())
@@ -3236,7 +3236,7 @@
    }
    else
    {
      final Iterable<Attribute> attrs = entry.getAttribute(attributeDescription);
      final Iterable<Attribute> attrs = entry.getAllAttributes(attributeDescription);
      result = assertionMatchesAnyAttribute(matchingRule, assertion, attrs, result, entry, completeFilter);
      if (ConditionResult.TRUE.equals(result))
      {
opendj-server-legacy/src/main/java/org/opends/server/types/SubEntry.java
@@ -189,7 +189,7 @@
    {
      if (this.isInheritedFromDNCollective)
      {
        for (Attribute attr : entry.getAttribute(ATTR_INHERIT_COLLECTIVE_FROM_DN_LC))
        for (Attribute attr : entry.getAllAttributes(ATTR_INHERIT_COLLECTIVE_FROM_DN_LC))
        {
          for (ByteString value : attr)
          {
@@ -202,7 +202,7 @@
      if (this.isInheritedFromRDNCollective)
      {
        for (Attribute attr : entry.getAttribute(ATTR_INHERIT_COLLECTIVE_FROM_RDN_LC))
        for (Attribute attr : entry.getAllAttributes(ATTR_INHERIT_COLLECTIVE_FROM_RDN_LC))
        {
          for (ByteString value : attr)
          {
@@ -211,7 +211,7 @@
            break;
          }
        }
        for (Attribute attr : entry.getAttribute(ATTR_INHERIT_COLLECTIVE_FROM_RDN_TYPE_LC))
        for (Attribute attr : entry.getAllAttributes(ATTR_INHERIT_COLLECTIVE_FROM_RDN_TYPE_LC))
        {
          for (ByteString value : attr)
          {
@@ -219,7 +219,7 @@
            break;
          }
        }
        for (Attribute attr : entry.getAttribute(ATTR_INHERIT_COLLECTIVE_FROM_BASE_LC))
        for (Attribute attr : entry.getAllAttributes(ATTR_INHERIT_COLLECTIVE_FROM_BASE_LC))
        {
          for (ByteString value : attr)
          {
@@ -231,7 +231,7 @@
        }
      }
      for (Attribute attr : entry.getAttribute(ATTR_INHERIT_COLLECTIVE_ATTR_LC))
      for (Attribute attr : entry.getAllAttributes(ATTR_INHERIT_COLLECTIVE_ATTR_LC))
      {
        for (ByteString value : attr)
        {
@@ -244,7 +244,7 @@
    // Establish collective attribute conflict behavior.
    if (this.isCollective || this.isInheritedCollective)
    {
      for (Attribute attr : entry.getAttribute(ATTR_COLLECTIVE_CONFLICT_BEHAVIOR_LC))
      for (Attribute attr : entry.getAllAttributes(ATTR_COLLECTIVE_CONFLICT_BEHAVIOR_LC))
      {
        for (ByteString value : attr)
        {
@@ -266,7 +266,7 @@
    String specString = null;
    boolean isValidSpec = true;
    AttributeType specAttrType = DirectoryServer.getSchema().getAttributeType(ATTR_SUBTREE_SPEC_LC);
    for (Attribute attr : entry.getAttribute(specAttrType))
    for (Attribute attr : entry.getAllAttributes(specAttrType))
    {
      for (ByteString value : attr)
      {
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendAddOperation.java
@@ -628,7 +628,7 @@
    // See if a password was specified.
    AttributeType passwordAttribute = passwordPolicy.getPasswordAttribute();
    List<Attribute> attrList = entry.getAttribute(passwordAttribute);
    List<Attribute> attrList = entry.getAllAttributes(passwordAttribute);
    if (attrList.isEmpty())
    {
      // The entry doesn't have a password, so no action is required.
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendBindOperation.java
@@ -404,7 +404,7 @@
      PasswordPolicy policy = pwPolicyState.getAuthenticationPolicy();
      AttributeType pwType = policy.getPasswordAttribute();
      if (userEntry.getAttribute(pwType).isEmpty())
      if (userEntry.getAllAttributes(pwType).isEmpty())
      {
        throw new DirectoryException(ResultCode.INVALID_CREDENTIALS,
            ERR_BIND_OPERATION_NO_PASSWORD.get());
@@ -1008,7 +1008,7 @@
      Arg2<Object, Object> cannotProcessAttributeMessage)
  {
    AttributeType attrType = DirectoryServer.getSchema().getAttributeType(attributeTypeName);
    List<Attribute> attrList = userEntry.getAttribute(attrType);
    List<Attribute> attrList = userEntry.getAllAttributes(attrType);
    if (attrList.size() == 1)
    {
      Attribute a = attrList.get(0);
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendCompareOperation.java
@@ -233,7 +233,7 @@
      // Actually perform the compare operation.
      AttributeDescription attrDesc = getAttributeDescription();
      List<Attribute> attrList = entry.getAttribute(attrDesc);
      List<Attribute> attrList = entry.getAllAttributes(attrDesc);
      if (attrList.isEmpty())
      {
        setResultCode(ResultCode.NO_SUCH_ATTRIBUTE);
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java
@@ -1030,7 +1030,7 @@
        // We still need to check if the pre-encoded password matches
        // an existing value, to decrease the number of passwords.
        List<Attribute> attrList = currentEntry.getAttribute(pwdAttrDesc.getAttributeType());
        List<Attribute> attrList = currentEntry.getAllAttributes(pwdAttrDesc.getAttributeType());
        if (attrList.isEmpty())
        {
          throw new DirectoryException(ResultCode.NO_SUCH_ATTRIBUTE, ERR_MODIFY_NO_EXISTING_VALUES.get());
@@ -1043,7 +1043,7 @@
      }
      else
      {
        List<Attribute> attrList = currentEntry.getAttribute(pwdAttrDesc.getAttributeType());
        List<Attribute> attrList = currentEntry.getAllAttributes(pwdAttrDesc.getAttributeType());
        if (attrList.isEmpty())
        {
          throw new DirectoryException(ResultCode.NO_SUCH_ATTRIBUTE, ERR_MODIFY_NO_EXISTING_VALUES.get());
opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java
@@ -1806,7 +1806,7 @@
  public static HashSet<PluginType> getPluginTypes(Entry e)
  {
    HashSet<PluginType> pluginTypes = new HashSet<>();
    for (Attribute a : e.getAttribute("ds-cfg-plugin-type"))
    for (Attribute a : e.getAllAttributes("ds-cfg-plugin-type"))
    {
      for (ByteString v : a)
      {
opendj-server-legacy/src/test/java/org/opends/server/authorization/dseecompat/AciTestCase.java
@@ -69,7 +69,7 @@
    // Save Global ACI.
    Entry e = DirectoryServer.getEntry(DN.valueOf(ACCESS_HANDLER_DN));
    List<Attribute> attrs = e.getAttribute(ConfigConstants.ATTR_AUTHZ_GLOBAL_ACI);
    List<Attribute> attrs = e.getAllAttributes(ConfigConstants.ATTR_AUTHZ_GLOBAL_ACI);
    if (!attrs.isEmpty())
    {
      Reporter.log("Saved global ACI attribute");
opendj-server-legacy/src/test/java/org/opends/server/backends/ChangelogBackendTestCase.java
@@ -943,7 +943,7 @@
  private String readCookieFromNthEntry(List<SearchResultEntry> entries, int i)
  {
    SearchResultEntry entry = entries.get(i);
    return entry.getAttribute("changelogcookie").get(0).iterator().next().toString();
    return entry.getAllAttributes("changelogcookie").get(0).iterator().next().toString();
  }
  private String assertEntriesContainsCSNsAndReadLastCookie(String test, List<SearchResultEntry> entries,
@@ -1403,7 +1403,7 @@
  private static void assertAttributeValues(Entry entry, String attrName, Set<String> expectedValues)
  {
    final Set<String> values = new HashSet<>();
    for (Attribute attr : entry.getAttribute(attrName))
    for (Attribute attr : entry.getAllAttributes(attrName))
    {
      for (ByteString value : attr)
      {
@@ -1479,7 +1479,7 @@
  private static String getAttributeValue(Entry entry, String attrName)
  {
    List<Attribute> attrs = entry.getAttribute(attrName);
    List<Attribute> attrs = entry.getAllAttributes(attrName);
    if (attrs.isEmpty())
    {
      return null;
opendj-server-legacy/src/test/java/org/opends/server/backends/SchemaBackendTestCase.java
@@ -4494,7 +4494,7 @@
    assertTrue(schemaEntry.hasAttribute(mtType));
    ByteString oldMTValue =
         schemaEntry.getAttribute(mtType).get(0).iterator().next();
         schemaEntry.getAllAttributes(mtType).get(0).iterator().next();
    String ldif = toLdif(
         "dn: cn=schema",
@@ -4518,7 +4518,7 @@
    assertTrue(schemaEntry.hasAttribute(mtType));
    ByteString newMTValue =
         schemaEntry.getAttribute(mtType).get(0).iterator().next();
         schemaEntry.getAllAttributes(mtType).get(0).iterator().next();
    assertNotEquals(oldMTValue, newMTValue);
  }
opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/TestDnKeyFormat.java
@@ -348,8 +348,8 @@
        // check the user attributes were not changed
        for (AttributeType attrType : entryBefore.getUserAttributes().keySet()) {
          List<Attribute> listBefore = entryBefore.getAttribute(attrType);
          List<Attribute> listAfter = entryAfter.getAttribute(attrType);
          List<Attribute> listBefore = entryBefore.getAllAttributes(attrType);
          List<Attribute> listAfter = entryAfter.getAllAttributes(attrType);
          assertThat(listBefore).hasSameSizeAs(listAfter);
          for (Attribute attrBefore : listBefore) {
opendj-server-legacy/src/test/java/org/opends/server/core/AddOperationTestCase.java
@@ -357,7 +357,7 @@
    retrieveCompletedOperationElements(addOperation);
    Entry e = DirectoryServer.getEntry(DN.valueOf("ou=People,o=test"));
    List<Attribute> attrList = e.getAttribute(a.getAttributeDescription());
    List<Attribute> attrList = e.getAllAttributes(a.getAttributeDescription());
    assertFalse(attrList.isEmpty());
    boolean foundFoo = false;
@@ -408,7 +408,7 @@
    retrieveCompletedOperationElements(addOperation);
    Entry e = DirectoryServer.getEntry(DN.valueOf("ou=People,o=test"));
    assertThat(e.getAttribute(a.getAttributeDescription().getAttributeType())).isNotEmpty();
    assertThat(e.getAllAttributes(a.getAttributeDescription().getAttributeType())).isNotEmpty();
    UpdatePreOpPlugin.reset();
  }
@@ -440,7 +440,7 @@
    retrieveCompletedOperationElements(addOperation);
    Entry e = DirectoryServer.getEntry(DN.valueOf("ou=People,o=test"));
    assertThat(e.getAttribute(attrType)).isEmpty();
    assertThat(e.getAllAttributes(attrType)).isEmpty();
    UpdatePreOpPlugin.reset();
  }
@@ -793,7 +793,7 @@
    retrieveCompletedOperationElements(addOperation);
    Entry e = DirectoryServer.getEntry(DN.valueOf("ou=People,o=test"));
    List<Attribute> attrList = e.getAttribute("ou");
    List<Attribute> attrList = e.getAllAttributes("ou");
    assertThat(attrList).isNotEmpty();
  }
@@ -845,7 +845,7 @@
    retrieveCompletedOperationElements(addOperation);
    Entry e = DirectoryServer.getEntry(DN.valueOf("uid=test.user,o=test"));
    List<Attribute> attrList = e.getAttribute(getObjectClassAttributeType());
    List<Attribute> attrList = e.getAllAttributes(getObjectClassAttributeType());
    assertTrue(findAttributeValueIgnoreCase(attrList, "top"));
  }
opendj-server-legacy/src/test/java/org/opends/server/core/ModifyOperationTestCase.java
@@ -407,7 +407,7 @@
  public void testGetAndAddModifications() throws Exception
  {
    Entry e = DirectoryServer.getEntry(DN.valueOf("o=test"));
    assertThat(e.getAttribute(getDescriptionAttributeType())).isEmpty();
    assertThat(e.getAllAttributes(getDescriptionAttributeType())).isEmpty();
    UpdatePreOpPlugin.reset();
    UpdatePreOpPlugin.addModification(
@@ -422,7 +422,7 @@
    retrieveSuccessfulOperationElements(modifyOperation);
    e = DirectoryServer.getEntry(DN.valueOf("o=test"));
    assertThat(e.getAttribute(getDescriptionAttributeType())).isNotEmpty();
    assertThat(e.getAllAttributes(getDescriptionAttributeType())).isNotEmpty();
    UpdatePreOpPlugin.reset();
  }
@@ -519,7 +519,7 @@
  public void testSuccessAddAttribute() throws Exception
  {
    Entry e = DirectoryServer.getEntry(DN.valueOf("o=test"));
    assertThat(e.getAttribute(getDescriptionAttributeType())).isEmpty();
    assertThat(e.getAllAttributes(getDescriptionAttributeType())).isEmpty();
    RawModification mod = newRawModification(REPLACE, "description", "foo");
    ModifyOperation modifyOperation = processModify("o=test", mod);
@@ -527,7 +527,7 @@
    retrieveSuccessfulOperationElements(modifyOperation);
    e = DirectoryServer.getEntry(DN.valueOf("o=test"));
    assertThat(e.getAttribute(getDescriptionAttributeType())).isNotEmpty();
    assertThat(e.getAllAttributes(getDescriptionAttributeType())).isNotEmpty();
  }
@@ -543,7 +543,7 @@
  {
    Entry e = DirectoryServer.getEntry(DN.valueOf("o=test"));
    List<Attribute> attrList = e.getAttribute(getOAttributeType());
    List<Attribute> attrList = e.getAllAttributes(getOAttributeType());
    assertEquals(countValues(attrList), 1);
    ModifyOperation modifyOperation = processModify("o=test", newRawModification(ADD, "o", "test2"));
@@ -551,7 +551,7 @@
    retrieveSuccessfulOperationElements(modifyOperation);
    e = DirectoryServer.getEntry(DN.valueOf("o=test"));
    attrList = e.getAttribute(getOAttributeType());
    attrList = e.getAllAttributes(getOAttributeType());
    assertEquals(countValues(attrList), 2);
  }
@@ -569,7 +569,7 @@
  {
    Entry e = DirectoryServer.getEntry(DN.valueOf(baseDN));
    List<Attribute> attrList = e.getAttribute(getOAttributeType());
    List<Attribute> attrList = e.getAllAttributes(getOAttributeType());
    assertEquals(countValues(attrList), 1);
    RawModification mod = newRawModification(ADD, "o;lang-en-us", "test");
@@ -578,7 +578,7 @@
    retrieveSuccessfulOperationElements(modifyOperation);
    e = DirectoryServer.getEntry(DN.valueOf(baseDN));
    attrList = e.getAttribute(getOAttributeType());
    attrList = e.getAllAttributes(getOAttributeType());
    assertEquals(countValues(attrList), 2);
  }
@@ -1805,7 +1805,7 @@
    retrieveSuccessfulOperationElements(modifyOperation);
    Entry e = DirectoryServer.getEntry(DN.valueOf("uid=test.user," + baseDN));
    List<Attribute> attrList = e.getAttribute(getEmployeeNumberAttributeType());
    List<Attribute> attrList = e.getAllAttributes(getEmployeeNumberAttributeType());
    assertIntegerValueExists(attrList, 2);
  }
@@ -1842,7 +1842,7 @@
    retrieveSuccessfulOperationElements(modifyOperation);
    Entry e = DirectoryServer.getEntry(DN.valueOf("uid=test.user," + baseDN));
    List<Attribute> attrList = e.getAttribute(getEmployeeNumberAttributeType());
    List<Attribute> attrList = e.getAllAttributes(getEmployeeNumberAttributeType());
    assertIntegerValueExists(attrList, 11);
  }
@@ -1878,7 +1878,7 @@
    retrieveSuccessfulOperationElements(modifyOperation);
    Entry e = DirectoryServer.getEntry(DN.valueOf("uid=test.user," + baseDN));
    List<Attribute> attrList = e.getAttribute(getEmployeeNumberAttributeType());
    List<Attribute> attrList = e.getAllAttributes(getEmployeeNumberAttributeType());
    assertIntegerValueExists(attrList, 0);
  }
@@ -3173,7 +3173,7 @@
         "displayName: Test User",
         "userPassword: password");
    String passwd = firstValue(e.getAttribute(getUserPasswordAttributeType()));
    String passwd = firstValue(e.getAllAttributes(getUserPasswordAttributeType()));
    assertNotNull(passwd);
    String path = TestCaseUtils.createTempFile(
@@ -3242,7 +3242,7 @@
    // @formatter:on
    e = DirectoryServer.getEntry(DN.valueOf("cn=Test User,o=test"));
    List<Attribute> attrList = e.getAttribute("userpassword");
    List<Attribute> attrList = e.getAllAttributes("userpassword");
    assertThat(attrList).hasSize(1);
    assertFalse(attrList.get(0).getAttributeDescription().hasOptions());
    assertThat(attrList.get(0)).hasSize(1);
@@ -3282,7 +3282,7 @@
    // @formatter:on
    e = DirectoryServer.getEntry(DN.valueOf("cn=Test User,o=test"));
    List<Attribute> attrList = e.getAttribute("userpassword");
    List<Attribute> attrList = e.getAllAttributes("userpassword");
    assertThat(attrList).hasSize(1);
    assertFalse(attrList.get(0).getAttributeDescription().hasOptions());
    assertThat(attrList.get(0)).hasSize(1);
@@ -3318,7 +3318,7 @@
    // @formatter:on
    Entry e = DirectoryServer.getEntry(DN.valueOf("cn=Test User,o=test"));
    List<Attribute> attrList = e.getAttribute("userpassword");
    List<Attribute> attrList = e.getAllAttributes("userpassword");
    assertThat(attrList).hasSize(1);
    assertFalse(attrList.get(0).getAttributeDescription().hasOptions());
    assertThat(attrList.get(0)).hasSize(1);
@@ -3354,7 +3354,7 @@
    // @formatter:on
    Entry e = DirectoryServer.getEntry(DN.valueOf("cn=Test User,o=test"));
    List<Attribute> attrList = e.getAttribute("userpassword");
    List<Attribute> attrList = e.getAllAttributes("userpassword");
    assertThat(attrList).hasSize(1);
    assertFalse(attrList.get(0).getAttributeDescription().hasOptions());
    assertThat(attrList.get(0)).hasSize(1);
@@ -3409,7 +3409,7 @@
    retrieveSuccessfulOperationElements(modifyOperation);
    Entry e = DirectoryServer.getEntry(DN.valueOf("uid=test.user," + baseDN));
    List<Attribute> attrList = e.getAttribute(getUserCertificateAttributeType());
    List<Attribute> attrList = e.getAllAttributes(getUserCertificateAttributeType());
    assertThat(attrList).hasSize(1);
    Attribute a = attrList.get(0);
    assertTrue(a.getAttributeDescription().hasOption("binary"));
opendj-server-legacy/src/test/java/org/opends/server/core/SearchOperationTestCase.java
@@ -980,7 +980,7 @@
  {
    for (String attrType : virtualAttrTypes)
    {
      List<Attribute> attrList = entry.getAttribute(attrType);
      List<Attribute> attrList = entry.getAllAttributes(attrType);
      if (stripVirtualAttributes)
      {
@@ -1037,7 +1037,7 @@
  {
    for (String attrType : realAttrTypes)
    {
      List<Attribute> attrList = entry.getAttribute(attrType);
      List<Attribute> attrList = entry.getAllAttributes(attrType);
      if (stripRealAttributes)
      {
opendj-server-legacy/src/test/java/org/opends/server/core/SubentryManagerTestCase.java
@@ -225,14 +225,14 @@
      Entry e = DirectoryServer.getEntry(DN.valueOf("uid=normal user,ou=people,o=test"));
      assertNotNull(e);
      List<Attribute> description = e.getAttribute("description");
      List<Attribute> description = e.getAllAttributes("description");
      assertThat(description).isEmpty();
      // Collective user will inherit the collective description attribute.
      e = DirectoryServer.getEntry(DN.valueOf("uid=collective user,ou=people,o=test"));
      assertNotNull(e);
      description = e.getAttribute("description");
      description = e.getAllAttributes("description");
      assertThat(description).hasSize(1);
      Attribute attribute = description.get(0);
      assertEquals(attribute.size(), 1);
opendj-server-legacy/src/test/java/org/opends/server/core/TestModifyDNOperation.java
@@ -417,7 +417,7 @@
  private void assertAttrValue(Entry newEntry, String attrName, String expectedAttrValue)
  {
    AttributeType at = DirectoryServer.getSchema().getAttributeType(attrName);
    List<Attribute> attrList = newEntry.getAttribute(at);
    List<Attribute> attrList = newEntry.getAllAttributes(at);
    assertThat(attrList).hasSize(1);
    // Because deleteOldRDN is true, the values from RDN and the entry have to be identical
@@ -547,14 +547,14 @@
        runModifyDNOp(oldEntryDN, "cn=Aaccf Amar Test", true, "dc=example,dc=com");
    assertSuccess(modifyDNOperation);
    Entry entry = assertCnAttrValues(newEntryDN, oldEntryDN);
    assertThat(entry.getAttribute("uid")).isEmpty();
    assertThat(entry.getAllAttributes("uid")).isEmpty();
    examineCompletedOPNoExtraPluginCounts(modifyDNOperation);
    InvocationCounterPlugin.resetAllCounters();
    modifyDNOperation = runModifyDNOp(newEntryDN, "uid=user.0", false, "ou=People,dc=example,dc=com");
    assertSuccess(modifyDNOperation);
    Entry newOldEntry = assertCnAttrValues(oldEntryDN, newEntryDN);
    for(Attribute attribute : newOldEntry.getAttribute("uid"))
    for(Attribute attribute : newOldEntry.getAllAttributes("uid"))
    {
      assertTrue(attribute.contains(b("user.0")));
    }
@@ -567,7 +567,7 @@
    assertNotNull(entry);
    assertNull(DirectoryServer.getEntry(dn(entryDN2)));
    for (Attribute attribute : entry.getAttribute("cn"))
    for (Attribute attribute : entry.getAllAttributes("cn"))
    {
      assertTrue(attribute.contains(b("Aaccf Amar Test")));
      assertTrue(attribute.contains(b("Aaccf Amar")));
opendj-server-legacy/src/test/java/org/opends/server/extensions/EntryDNVirtualAttributeProviderTestCase.java
@@ -118,7 +118,7 @@
    assertNotNull(e);
    assertTrue(e.hasAttribute(entryDNType));
    List<Attribute> attrList = e.getAttribute(entryDNType);
    List<Attribute> attrList = e.getAllAttributes(entryDNType);
    assertThat(attrList).isNotEmpty();
    for (Attribute a : attrList)
    {
opendj-server-legacy/src/test/java/org/opends/server/extensions/EntryUUIDVirtualAttributeProviderTestCase.java
@@ -111,7 +111,7 @@
    assertNotNull(e);
    assertTrue(e.hasAttribute(entryUUIDType));
    List<Attribute> attrList = e.getAttribute(entryUUIDType);
    List<Attribute> attrList = e.getAllAttributes(entryUUIDType);
    assertThat(attrList).isNotEmpty();
    for (Attribute a : attrList)
    {
@@ -145,7 +145,7 @@
      "dc: example");
    assertTrue(e.hasAttribute(entryUUIDType));
    List<Attribute> attrList = e.getAttribute(entryUUIDType);
    List<Attribute> attrList = e.getAllAttributes(entryUUIDType);
    assertThat(attrList).isNotEmpty();
    for (Attribute a : attrList)
    {
opendj-server-legacy/src/test/java/org/opends/server/extensions/GoverningStructureRuleVirtualAttributeProviderTestCase.java
@@ -175,7 +175,7 @@
    assertNotNull(e);
    assertTrue(e.hasAttribute(governingStructureRuleType));
    List<Attribute> attrList = e.getAttribute(governingStructureRuleType);
    List<Attribute> attrList = e.getAllAttributes(governingStructureRuleType);
    assertThat(attrList).isNotEmpty();
    for (Attribute a : attrList)
    {
opendj-server-legacy/src/test/java/org/opends/server/extensions/HasSubordinatesVirtualAttributeProviderTestCase.java
@@ -212,7 +212,7 @@
    assertNotNull(e);
    assertTrue(e.hasAttribute(hasSubordinatesType));
    List<Attribute> attrList = e.getAttribute(hasSubordinatesType);
    List<Attribute> attrList = e.getAllAttributes(hasSubordinatesType);
    assertThat(attrList).isNotEmpty();
    for (Attribute a : attrList)
    {
opendj-server-legacy/src/test/java/org/opends/server/extensions/IsMemberOfVirtualAttributeProviderTestCase.java
@@ -117,7 +117,7 @@
    Entry e = DirectoryServer.getEntry(DN.valueOf("uid=test.user,ou=People,o=test"));
    assertNotNull(e);
    assertTrue(e.hasAttribute(isMemberOfType));
    for (Attribute a : e.getAttribute(isMemberOfType))
    for (Attribute a : e.getAllAttributes(isMemberOfType))
    {
      assertEquals(a.size(), 1);
@@ -175,7 +175,7 @@
    Entry e = DirectoryServer.getEntry(DN.valueOf("uid=test.user,ou=People,o=test"));
    assertNotNull(e);
    assertTrue(e.hasAttribute(isMemberOfType));
    for (Attribute a : e.getAttribute(isMemberOfType))
    for (Attribute a : e.getAllAttributes(isMemberOfType))
    {
      assertEquals(a.size(), 1);
@@ -232,7 +232,7 @@
    Entry e = DirectoryServer.getEntry(DN.valueOf("uid=test.user,ou=People,o=test"));
    assertNotNull(e);
    assertTrue(e.hasAttribute(isMemberOfType));
    for (Attribute a : e.getAttribute(isMemberOfType))
    for (Attribute a : e.getAllAttributes(isMemberOfType))
    {
      assertEquals(a.size(), 1);
@@ -313,7 +313,7 @@
    Entry e = DirectoryServer.getEntry(DN.valueOf("uid=test.user,ou=People,o=test"));
    assertNotNull(e);
    assertTrue(e.hasAttribute(isMemberOfType));
    for (Attribute a : e.getAttribute(isMemberOfType))
    for (Attribute a : e.getAllAttributes(isMemberOfType))
    {
      assertEquals(a.size(), 2);
@@ -416,7 +416,7 @@
    Entry e = DirectoryServer.getEntry(DN.valueOf("uid=test.user,ou=People,o=test"));
    assertNotNull(e);
    assertTrue(e.hasAttribute(isMemberOfType));
    for (Attribute a : e.getAttribute(isMemberOfType))
    for (Attribute a : e.getAllAttributes(isMemberOfType))
    {
      assertEquals(a.size(), 4);
opendj-server-legacy/src/test/java/org/opends/server/extensions/NumSubordinatesVirtualAttributeProviderTestCase.java
@@ -209,7 +209,7 @@
    assertNotNull(e);
    assertTrue(e.hasAttribute(numSubordinatesType));
    List<Attribute> attrList = e.getAttribute(numSubordinatesType);
    List<Attribute> attrList = e.getAllAttributes(numSubordinatesType);
    assertThat(attrList).isNotEmpty();
    for (Attribute a : attrList)
    {
opendj-server-legacy/src/test/java/org/opends/server/extensions/PasswordExpirationTimeVirtualAttributeProviderTestCase.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2012 profiq, s.r.o.
 * Portions Copyright 2014-2015 ForgeRock AS.
 * Portions Copyright 2014-2016 ForgeRock AS.
 */
package org.opends.server.extensions;
@@ -204,7 +204,7 @@
    SearchResultEntry entry = entries.get(0);
    assertNotNull(entry);
    List<Attribute> attrs = entry.getAttribute(attributeName);
    List<Attribute> attrs = entry.getAllAttributes(attributeName);
    assertEquals(attrs.size(), 1);
    Attribute attr = attrs.get(0);
opendj-server-legacy/src/test/java/org/opends/server/extensions/StructuralObjectClassVirtualAttributeProviderTestCase.java
@@ -135,7 +135,7 @@
    assertNotNull(e);
    assertTrue(e.hasAttribute(structuralObjectClassType));
    List<Attribute> attrList = e.getAttribute(structuralObjectClassType);
    List<Attribute> attrList = e.getAllAttributes(structuralObjectClassType);
    assertThat(attrList).isNotEmpty();
    for (Attribute a : attrList)
    {
opendj-server-legacy/src/test/java/org/opends/server/extensions/SubschemaSubentryVirtualAttributeProviderTestCase.java
@@ -118,7 +118,7 @@
    assertNotNull(e);
    assertTrue(e.hasAttribute(subschemaSubentryType));
    List<Attribute> attrList = e.getAttribute(subschemaSubentryType);
    List<Attribute> attrList = e.getAllAttributes(subschemaSubentryType);
    assertThat(attrList).isNotEmpty();
    for (Attribute a : attrList)
    {
opendj-server-legacy/src/test/java/org/opends/server/extensions/UserDefinedVirtualAttributeProviderTestCase.java
@@ -232,7 +232,7 @@
      final SearchRequest request = newSearchRequest(DN.valueOf(userDN), SearchScope.BASE_OBJECT);
      InternalSearchOperation searchOperation = conn.processSearch(request);
      List<Attribute> attrList = searchOperation.getSearchEntries().get(0).getAttribute(descriptionType);
      List<Attribute> attrList = searchOperation.getSearchEntries().get(0).getAllAttributes(descriptionType);
      assertEquals(attrList.size(), 1);
      Attribute attr = attrList.get(0);
@@ -297,7 +297,7 @@
      final SearchRequest request = newSearchRequest(DN.valueOf(userDN), SearchScope.BASE_OBJECT);
      InternalSearchOperation searchOperation = conn.processSearch(request);
      List<Attribute> attrList = searchOperation.getSearchEntries().get(0).getAttribute(descriptionType);
      List<Attribute> attrList = searchOperation.getSearchEntries().get(0).getAllAttributes(descriptionType);
      assertEquals(attrList.size(), 1);
      Attribute attr = attrList.get(0);
@@ -363,7 +363,7 @@
      final SearchRequest request = newSearchRequest(DN.valueOf(userDN), SearchScope.BASE_OBJECT);
      InternalSearchOperation searchOperation = conn.processSearch(request);
      List<Attribute> attrList = searchOperation.getSearchEntries().get(0).getAttribute(descriptionType);
      List<Attribute> attrList = searchOperation.getSearchEntries().get(0).getAllAttributes(descriptionType);
      assertEquals(attrList.size(), 1);
      Attribute attr = attrList.get(0);
@@ -428,7 +428,7 @@
      final SearchRequest request = newSearchRequest(DN.valueOf(userDN), SearchScope.BASE_OBJECT);
      InternalSearchOperation searchOperation = conn.processSearch(request);
      List<Attribute> attrList = searchOperation.getSearchEntries().get(0).getAttribute(descriptionType);
      List<Attribute> attrList = searchOperation.getSearchEntries().get(0).getAllAttributes(descriptionType);
      assertEquals(attrList.size(), 1);
      Attribute attr = attrList.get(0);
@@ -492,7 +492,7 @@
      final SearchRequest request = newSearchRequest(DN.valueOf(userDN), SearchScope.BASE_OBJECT);
      InternalSearchOperation searchOperation = conn.processSearch(request);
      List<Attribute> attrList = searchOperation.getSearchEntries().get(0).getAttribute(descriptionType);
      List<Attribute> attrList = searchOperation.getSearchEntries().get(0).getAllAttributes(descriptionType);
      assertEquals(attrList.size(), 1);
      Attribute a = attrList.get(0);
@@ -565,7 +565,7 @@
          newSearchRequest(DN.valueOf(userDN), SearchScope.BASE_OBJECT).addAttribute("description");
      InternalSearchOperation searchOperation = conn.processSearch(request);
      List<Attribute> attrList = searchOperation.getSearchEntries().get(0).getAttribute(descriptionType);
      List<Attribute> attrList = searchOperation.getSearchEntries().get(0).getAllAttributes(descriptionType);
      assertEquals(attrList.size(), 1);
      Attribute a = attrList.get(0);
opendj-server-legacy/src/test/java/org/opends/server/extensions/VirtualStaticGroupTestCase.java
@@ -740,7 +740,7 @@
    assertNotNull(e);
    assertTrue(e.hasAttribute(memberType));
    Attribute a = e.getAttribute(memberType).get(0);
    Attribute a = e.getAllAttributes(memberType).get(0);
    assertEquals(a.size(), 4);
    assertTrue(a.contains(ByteString.valueOfUtf8(u1.toString())));
@@ -768,7 +768,7 @@
    assertNotNull(e);
    assertTrue(e.hasAttribute(memberType));
    Attribute a = e.getAttribute(memberType).get(0);
    Attribute a = e.getAllAttributes(memberType).get(0);
    assertEquals(a.size(), 1);
    ByteString v = ByteString.valueOfUtf8(u4.toString());
@@ -779,7 +779,7 @@
    ModifyOperation modifyOperation = getRootConnection().processModify(d1, mods);
    assertEquals(modifyOperation.getResultCode(), ResultCode.SUCCESS);
    a = e.getAttribute(memberType).get(0);
    a = e.getAllAttributes(memberType).get(0);
    assertEquals(a.size(), 4);
    assertTrue(a.contains(v));
@@ -804,7 +804,7 @@
    assertNotNull(e);
    assertTrue(e.hasAttribute(memberType));
    Attribute a = e.getAttribute(memberType).get(0);
    Attribute a = e.getAllAttributes(memberType).get(0);
    assertEquals(a.size(), 1);
    ByteString v = ByteString.valueOfUtf8(u4.toString());
@@ -825,7 +825,7 @@
    assertNotNull(e);
    assertTrue(e.hasAttribute(memberType));
    a = e.getAttribute(memberType).get(0);
    a = e.getAllAttributes(memberType).get(0);
    assertEquals(a.size(), 0);
    v = ByteString.valueOfUtf8(u4.toString());
opendj-server-legacy/src/test/java/org/opends/server/plugins/EntryUUIDPluginTestCase.java
@@ -243,7 +243,7 @@
         DirectoryServer.getPluginConfigManager().getRegisteredPlugin(dn);
    plugin.doLDIFImport(importConfig, e);
    assertThat(e.getAttribute("entryuuid")).isNotEmpty();
    assertThat(e.getAllAttributes("entryuuid")).isNotEmpty();
  }
@@ -284,7 +284,7 @@
         DirectoryServer.getPluginConfigManager().getRegisteredPlugin(dn);
    plugin.doLDIFImport(importConfig, e);
    assertThat(e.getAttribute("entryuuid")).isNotEmpty();
    assertThat(e.getAllAttributes("entryuuid")).isNotEmpty();
  }
@@ -303,7 +303,7 @@
                                      "objectClass: top",
                                      "objectClass: device",
                                      "cn: test");
    assertThat(e.getAttribute("entryuuid")).isNotEmpty();
    assertThat(e.getAllAttributes("entryuuid")).isNotEmpty();
  }
@@ -325,6 +325,6 @@
                                      "objectClass: device",
                                      "cn: test",
                                      "entryUUID: " + UUID.randomUUID());
    assertThat(e.getAttribute("entryuuid")).isNotEmpty();
    assertThat(e.getAllAttributes("entryuuid")).isNotEmpty();
  }
}
opendj-server-legacy/src/test/java/org/opends/server/plugins/LDAPADListPluginTestCase.java
@@ -259,6 +259,6 @@
    assertFalse(searchOperation.getSearchEntries().isEmpty());
    Entry e = searchOperation.getSearchEntries().get(0);
    assertThat(e.getAttribute("o")).isNotEmpty();
    assertThat(e.getAllAttributes("o")).isNotEmpty();
  }
}
opendj-server-legacy/src/test/java/org/opends/server/plugins/LastModPluginTestCase.java
@@ -257,8 +257,8 @@
                                      "objectClass: top",
                                      "objectClass: device",
                                      "cn: test");
    assertThat(e.getAttribute("creatorsname")).isNotEmpty();
    assertThat(e.getAttribute("createtimestamp")).isNotEmpty();
    assertThat(e.getAllAttributes("creatorsname")).isNotEmpty();
    assertThat(e.getAllAttributes("createtimestamp")).isNotEmpty();
  }
@@ -286,8 +286,8 @@
    Entry e = DirectoryConfig.getEntry(DN.valueOf("o=test"));
    assertNotNull(e);
    assertThat(e.getAttribute("modifiersname")).isNotEmpty();
    assertThat(e.getAttribute("modifytimestamp")).isNotEmpty();
    assertThat(e.getAllAttributes("modifiersname")).isNotEmpty();
    assertThat(e.getAllAttributes("modifytimestamp")).isNotEmpty();
  }
@@ -313,7 +313,7 @@
    e = DirectoryConfig.getEntry(DN.valueOf("cn=test2,o=test"));
    assertNotNull(e);
    assertThat(e.getAttribute("modifiersname")).isNotEmpty();
    assertThat(e.getAttribute("modifytimestamp")).isNotEmpty();
    assertThat(e.getAllAttributes("modifiersname")).isNotEmpty();
    assertThat(e.getAllAttributes("modifytimestamp")).isNotEmpty();
  }
}
opendj-server-legacy/src/test/java/org/opends/server/plugins/SambaPasswordPluginTestCase.java
@@ -247,7 +247,7 @@
  private boolean contains(Entry entry, String attrName, String password)
  {
    boolean foundPwd = false;
    for (Attribute a : entry.getAttribute(attrName))
    for (Attribute a : entry.getAllAttributes(attrName))
    {
      for (ByteString val : a)
      {
@@ -338,8 +338,8 @@
    Entry entry = DirectoryServer.getEntry(testEntry.getName());
    assertNotNull(entry);
    assertThat(entry.getAttribute("sambantpassword")).isEmpty();
    assertThat(entry.getAttribute("sambalmpassword")).isEmpty();
    assertThat(entry.getAllAttributes("sambantpassword")).isEmpty();
    assertThat(entry.getAllAttributes("sambalmpassword")).isEmpty();
    TestCaseUtils.deleteEntry(entry);
  }
@@ -538,8 +538,8 @@
    Entry entry = DirectoryServer.getEntry(testEntry.getName());
    assertNotNull(entry);
    assertThat(entry.getAttribute("sambantpassword")).isEmpty();
    assertThat(entry.getAttribute("sambalmpassword")).isEmpty();
    assertThat(entry.getAllAttributes("sambantpassword")).isEmpty();
    assertThat(entry.getAllAttributes("sambalmpassword")).isEmpty();
    TestCaseUtils.deleteEntry(entry);
  }
@@ -786,7 +786,7 @@
      Attribute sambaPwdLastSetAttr =
        Attributes.create("sambapwdlastset", String.valueOf(1339012789L));
      assertThat(entry.getAttribute("sambapwdlastset")).contains(sambaPwdLastSetAttr);
      assertThat(entry.getAllAttributes("sambapwdlastset")).contains(sambaPwdLastSetAttr);
      TestCaseUtils.deleteEntry(testEntry);
    }
    finally
opendj-server-legacy/src/test/java/org/opends/server/protocols/ldap/LDAPBinaryOptionTestCase.java
@@ -197,7 +197,7 @@
    List<SearchResultEntry> entries = searchOperation.getSearchEntries();
    SearchResultEntry e = entries.get(0);
    assertNotNull(e);
    List<Attribute> attrs = e.getAttribute("usercertificate");
    List<Attribute> attrs = e.getAllAttributes("usercertificate");
    Attribute a = attrs.get(0);
    assertNotNull(a);
    assertThat(a.getAttributeDescription().getOptions()).contains("binary");
opendj-server-legacy/src/test/java/org/opends/server/replication/ReplicationTestCase.java
@@ -524,7 +524,7 @@
      {
        final Entry newEntry = DirectoryServer.getEntry(dn);
        assertNotNull(newEntry);
        List<Attribute> attrList = newEntry.getAttribute(attrTypeStr);
        List<Attribute> attrList = newEntry.getAllAttributes(attrTypeStr);
        Assertions.assertThat(attrList).isNotEmpty();
        Attribute attr = attrList.get(0);
        boolean foundAttributeValue = attr.contains(ByteString.valueOfUtf8(valueString));
@@ -781,7 +781,7 @@
      {
        Entry newEntry = DirectoryServer.getEntry(dn);
        assertNotNull(newEntry);
        Attribute attribute = newEntry.getAttribute("entryuuid").get(0);
        Attribute attribute = newEntry.getAllAttributes("entryuuid").get(0);
        String found = attribute.iterator().next().toString();
        assertNotNull(found, "Entry: " + dn + " Could not be found.");
        return found;
opendj-server-legacy/src/test/java/org/opends/server/replication/UpdateOperationTest.java
@@ -459,7 +459,7 @@
      // Read the entry back to get its UUID.
      Entry entry = DirectoryServer.getEntry(dn1);
      List<Attribute> attrs = entry.getAttribute(entryuuidType);
      List<Attribute> attrs = entry.getAllAttributes(entryuuidType);
      String entryuuid = attrs.get(0).iterator().next().toString();
      // A change on a first server.
@@ -491,7 +491,7 @@
      // Read the entry to see how the conflict was resolved.
      entry = DirectoryServer.getEntry(dn1);
      attrs = entry.getAttribute(attrType);
      attrs = entry.getAllAttributes(attrType);
      String attrValue1 = attrs.get(0).iterator().next().toString();
      // the value should be the last (time t2) value added
@@ -529,7 +529,7 @@
      // Read the entry to see how the conflict was resolved.
      entry = DirectoryServer.getEntry(dn1);
      attrs = entry.getAttribute(attrType);
      attrs = entry.getAllAttributes(attrType);
      // there should not be a value (delete at time t2)
      assertNull(attrs);
@@ -1087,7 +1087,7 @@
   */
  private boolean assertConflictAttributeExists(Entry entry)
  {
    return !entry.getAttribute("ds-sync-confict").isEmpty();
    return !entry.getAllAttributes("ds-sync-confict").isEmpty();
  }
  @DataProvider(name="assured")
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/AssuredReplicationPluginTest.java
@@ -1480,7 +1480,7 @@
        throw new Exception("Unknown assured type");
    }
    List<Attribute> attrs = entry.getAttribute(assuredAttr);
    List<Attribute> attrs = entry.getAllAttributes(assuredAttr);
    if (attrs.isEmpty())
    {
      return Collections.emptyMap();
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/AttrHistoricalMultipleTest.java
@@ -426,7 +426,7 @@
  private List<ByteString> getValues(Entry entry, Modification mod)
  {
    return getValues(entry.getAttribute(mod.getAttribute().getAttributeDescription()));
    return getValues(entry.getAllAttributes(mod.getAttribute().getAttributeDescription()));
  }
  private List<ByteString> getValues(List<Attribute> attributes)
@@ -463,7 +463,7 @@
  private void assertAttributeValues(Entry entry, String... expectedValues)
  {
    List<ByteString> actualValues = getValues(entry.getAttribute(ATTRIBUTE_NAME));
    List<ByteString> actualValues = getValues(entry.getAllAttributes(ATTRIBUTE_NAME));
    assertThat(actualValues).containsOnly(toByteStrings(expectedValues));
  }
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/AttrHistoricalSingleTest.java
@@ -353,7 +353,7 @@
  private ByteString getActualValue(Entry entry, Modification mod)
  {
    return getActualValue(entry.getAttribute(mod.getAttribute().getAttributeDescription()));
    return getActualValue(entry.getAllAttributes(mod.getAttribute().getAttributeDescription()));
  }
  private ByteString getActualValue(List<Attribute> attributes)
@@ -382,7 +382,7 @@
  private void assertAttributeValue(Entry entry, String expectedValue)
  {
    ByteString actualValue = getActualValue(entry.getAttribute(ATTRIBUTE_NAME));
    ByteString actualValue = getActualValue(entry.getAllAttributes(ATTRIBUTE_NAME));
    assertEquals(actualValue, expectedValue != null ? ByteString.valueOfUtf8(expectedValue) : null);
  }
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/FractionalReplicationTest.java
@@ -544,7 +544,7 @@
      AttributeType synchronizationGenIDType =
          DirectoryServer.getSchema().getAttributeType(REPLICATION_GENERATION_ID);
      List<Attribute> attrs = resultEntry.getAttribute(synchronizationGenIDType);
      List<Attribute> attrs = resultEntry.getAllAttributes(synchronizationGenIDType);
      if (!attrs.isEmpty())
      {
        Attribute attr = attrs.get(0);
@@ -753,7 +753,7 @@
   */
  private static void checkEntryAttributeValue(Entry entry, String attributeName, String attributeValue)
  {
    List<Attribute> attrs = entry.getAttribute(attributeName);
    List<Attribute> attrs = entry.getAllAttributes(attributeName);
    assertThat(attrs).as("Was expecting attribute " + attributeName + "=" + attributeValue).hasSize(1);
    Attribute attr = attrs.get(0);
    Iterator<ByteString> attrValues = attr.iterator();
@@ -1434,7 +1434,7 @@
      assertEquals(newEntryDn, newEntry.getName());
      assertTrue(newEntry.hasObjectClass(getInetOrgPersonObjectClass()));
      checkEntryAttributeValue(newEntry, "displayName", "ValueToBeKept");
      assertThat(newEntry.getAttribute("givenName")).isEmpty();
      assertThat(newEntry.getAllAttributes("givenName")).isEmpty();
    }
    finally
    {
@@ -1515,7 +1515,7 @@
      assertEquals(newEntryDn, newEntry.getName());
      assertTrue(newEntry.hasObjectClass(getInetOrgPersonObjectClass()));
      checkEntryAttributeValue(newEntry, "displayName", "ValueToBeKept");
      assertThat(newEntry.getAttribute("description")).isEmpty();
      assertThat(newEntry.getAllAttributes("description")).isEmpty();
    }
    finally
    {
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalCsnOrderingTest.java
@@ -167,7 +167,7 @@
    // Read the entry back to get its historical and included CSN
    Entry entry = DirectoryServer.getEntry(dn1);
    List<Attribute> attrs1 = entry.getAttribute(histType);
    List<Attribute> attrs1 = entry.getAllAttributes(histType);
      Assertions.assertThat(attrs1).isNotEmpty();
    String histValue = attrs1.get(0).iterator().next().toString();
@@ -184,7 +184,7 @@
    assertEquals(resultCode, 0);
    Entry entry2 = DirectoryServer.getEntry(dn1);
    List<Attribute> attrs2 = entry2.getAttribute(histType);
    List<Attribute> attrs2 = entry2.getAllAttributes(histType);
      Assertions.assertThat(attrs2).isNotEmpty();
    for (ByteString av : attrs2.get(0)) {
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java
@@ -648,7 +648,7 @@
    assertEquals(mod.getAttribute(), values3and4);
    // check that the entry now contains value1 and value2 and no other values.
    Attribute resultEntryAttr = entry.getAttribute(DESCRIPTION).get(0);
    Attribute resultEntryAttr = entry.getAllAttributes(DESCRIPTION).get(0);
    assertEquals(resultEntryAttr, values1and2);
    Attribute attr = buildSyncHist(DESCRIPTION,
@@ -1216,7 +1216,7 @@
  private String getEntryUUID(Entry entry)
  {
    List<Attribute> uuidAttrs = entry.getAttribute(getEntryUUIDAttributeType());
    List<Attribute> uuidAttrs = entry.getAllAttributes(getEntryUUIDAttributeType());
    return uuidAttrs.get(0).iterator().next().toString();
  }
@@ -1241,7 +1241,7 @@
    testModify(entry, hist, 1, true, newModification(DELETE, DISPLAYNAME, "aValue"));
    // The entry should have no value
    assertThat(entry.getAttribute(DISPLAYNAME)).isEmpty();
    assertThat(entry.getAllAttributes(DISPLAYNAME)).isEmpty();
  }
  /**
@@ -1271,7 +1271,7 @@
    assertEquals(hist.encodeAndPurge(), attr);
    // The entry should have no value
    assertThat(entry.getAttribute(DISPLAYNAME)).isEmpty();
    assertThat(entry.getAllAttributes(DISPLAYNAME)).isEmpty();
  }
  /**
@@ -1313,7 +1313,7 @@
    assertEquals(hist.encodeAndPurge(), attrDel);
    // The entry should have no value
    assertThat(entry.getAttribute(DISPLAYNAME)).isEmpty();
    assertThat(entry.getAllAttributes(DISPLAYNAME)).isEmpty();
  }
  /**
@@ -1357,7 +1357,7 @@
    assertEquals(hist.encodeAndPurge(), attr);
    // The entry should have no value
    List<Attribute> attrs = entry.getAttribute(DESCRIPTION);
    List<Attribute> attrs = entry.getAllAttributes(DESCRIPTION);
    assertEquals(attrs.get(0), Attributes.create(DESCRIPTION, "value2", "value3", "value4"));
  }
@@ -1404,7 +1404,7 @@
    assertEquals(hist.encodeAndPurge(), attr);
    // The entry should have no value
    List<Attribute> attrs = entry.getAttribute(DESCRIPTION);
    List<Attribute> attrs = entry.getAllAttributes(DESCRIPTION);
    assertEquals(attrs.get(0), Attributes.create(DESCRIPTION, "value3", "value4"));
  }
@@ -1447,7 +1447,7 @@
    assertEquals(hist.encodeAndPurge(), attrDel);
    // The entry should have no value
    assertThat(entry.getAttribute(DISPLAYNAME)).isEmpty();
    assertThat(entry.getAllAttributes(DISPLAYNAME)).isEmpty();
  }
  /**
@@ -1477,7 +1477,7 @@
    assertEquals(hist.encodeAndPurge(), attr);
    // The entry should have no value
    assertThat(entry.getAttribute(DISPLAYNAME)).isEmpty();
    assertThat(entry.getAllAttributes(DISPLAYNAME)).isEmpty();
  }
  /**
@@ -1507,7 +1507,7 @@
    assertEquals(hist.encodeAndPurge(), attr);
    // The entry should have no value
    assertThat(entry.getAttribute(DISPLAYNAME)).isEmpty();
    assertThat(entry.getAllAttributes(DISPLAYNAME)).isEmpty();
  }
  /**
@@ -1546,7 +1546,7 @@
    assertEquals(hist.encodeAndPurge(), attrDel);
    // The entry should have no value
    assertThat(entry.getAttribute(DISPLAYNAME)).isEmpty();
    assertThat(entry.getAllAttributes(DISPLAYNAME)).isEmpty();
  }
  /**
@@ -1585,7 +1585,7 @@
    assertEquals(hist.encodeAndPurge(), attrDel);
    // The entry should have no value
    assertThat(entry.getAttribute(DISPLAYNAME)).isEmpty();
    assertThat(entry.getAllAttributes(DISPLAYNAME)).isEmpty();
  }
  /**
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/NamingConflictTest.java
@@ -148,7 +148,7 @@
    assertEquals(getEntryUUID(resultEntry.getName()),
        "c9cb8c3c-615a-4122-865d-50323aaaed48",
        "The wrong entry has been renamed");
    assertThat(resultEntry.getAttribute(LDAPReplicationDomain.DS_SYNC_CONFLICT)).isEmpty();
    assertThat(resultEntry.getAllAttributes(LDAPReplicationDomain.DS_SYNC_CONFLICT)).isEmpty();
  }
  private AddMsg addMsg(Entry entry, CSN csn, String parentUUID, String childUUID)
@@ -189,7 +189,7 @@
    assertEquals(getEntryUUID(resultEntry.getName()),
        "c9cb8c3c-615a-4122-865d-50323aaaed48",
        "The wrong entry has been renamed");
    assertThat(resultEntry.getAttribute(LDAPReplicationDomain.DS_SYNC_CONFLICT)).isEmpty();
    assertThat(resultEntry.getAllAttributes(LDAPReplicationDomain.DS_SYNC_CONFLICT)).isEmpty();
  }
  private Entry createAndAddEntry(String commonName) throws Exception
opendj-server-legacy/src/test/java/org/opends/server/schema/GenericSchemaTestCase.java
@@ -193,7 +193,7 @@
  {
    Entry e = readSchemaEntry(f);
    return e != null
        ? e.getAttribute(attributeType)
        ? e.getAllAttributes(attributeType)
        // An empty schema file. This is OK.
        : Collections.<Attribute> emptyList();
  }
opendj-server-legacy/src/test/java/org/opends/server/schema/LDAPSyntaxTest.java
@@ -215,7 +215,7 @@
      assertThat(entries).isNotEmpty();
      SearchResultEntry e = entries.get(0);
      assertNotNull(e);
      Attribute attr = e.getAttribute("ldapsyntaxes").get(0);
      Attribute attr = e.getAllAttributes("ldapsyntaxes").get(0);
      //There are other ways of doing it but we will extract the OID
      //from the attribute values and then check to see if our
opendj-server-legacy/src/test/java/org/opends/server/tasks/DummyTask.java
@@ -56,7 +56,7 @@
    Entry taskEntry = getTaskEntry();
    if (taskEntry != null)
    {
      for (Attribute a : taskEntry.getAttribute(TASK_SLEEP_TIME_ATTRIBUTE))
      for (Attribute a : taskEntry.getAllAttributes(TASK_SLEEP_TIME_ATTRIBUTE))
      {
        for (ByteString v : a)
        {
opendj-server-legacy/src/test/java/org/opends/server/tools/LDIFSearchTestCase.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2006-2008 Sun Microsystems, Inc.
 * Portions Copyright 2015 ForgeRock AS.
 * Portions Copyright 2015-2016 ForgeRock AS.
 */
package org.opends.server.tools;
@@ -111,7 +111,7 @@
    };
    assertEquals(LDIFSearch.mainSearch(args, false, System.out, System.err), 0);
    Entry e = readEntry();
    assertThat(e.getAttribute("objectclass")).isNotEmpty();
    assertThat(e.getAllAttributes("objectclass")).isNotEmpty();
  }
  /**
@@ -133,7 +133,7 @@
    };
    assertEquals(LDIFSearch.mainSearch(args, false, System.out, System.err), 0);
    Entry e = readEntry();
    assertThat(e.getAttribute("objectclass")).isEmpty();
    assertThat(e.getAllAttributes("objectclass")).isEmpty();
  }
  /**
@@ -156,9 +156,9 @@
    };
    assertEquals(LDIFSearch.mainSearch(args, false, System.out, System.err), 0);
    Entry e = readEntry();
    assertThat(e.getAttribute("objectclass")).isEmpty();
    assertThat(e.getAttribute("mail")).isNotEmpty();
    assertThat(e.getAttribute("uid")).isNotEmpty();
    assertThat(e.getAllAttributes("objectclass")).isEmpty();
    assertThat(e.getAllAttributes("mail")).isNotEmpty();
    assertThat(e.getAllAttributes("uid")).isNotEmpty();
  }
@@ -193,8 +193,8 @@
    };
    assertEquals(LDIFSearch.mainSearch(args, false, System.out, System.err), 0);
    Entry e = readEntry();
    assertThat(e.getAttribute("objectclass")).isEmpty();
    assertThat(e.getAttribute("mail")).isNotEmpty();
    assertThat(e.getAttribute("uid")).isNotEmpty();
    assertThat(e.getAllAttributes("objectclass")).isEmpty();
    assertThat(e.getAllAttributes("mail")).isNotEmpty();
    assertThat(e.getAllAttributes("uid")).isNotEmpty();
  }
}
opendj-server-legacy/src/test/java/org/opends/server/tools/makeldif/MakeLDIFTestCase.java
@@ -316,7 +316,7 @@
    Entry e = readEntry(outLdifFilePath);
    assertNotNull(e);
    List<Attribute> attrs = e.getAttribute(attrName);
    List<Attribute> attrs = e.getAllAttributes(attrName);
    assertFalse(attrs.isEmpty());
    Attribute a = attrs.get(0);
    Attribute expectedRes = Attributes.create(attrName, expectedValue);
@@ -365,7 +365,7 @@
    Entry e = readEntry(outLdifFilePath);
    assertNotNull(e);
    List<Attribute> attrs = e.getAttribute("cn");
    List<Attribute> attrs = e.getAllAttributes("cn");
    assertFalse(attrs.isEmpty());
    Attribute a = attrs.get(0);
    assertTrue(a.iterator().next().toString().matches("Foo <[A-Z]>\\{1\\}Bar"),
opendj-server-legacy/src/test/java/org/opends/server/types/TestEntry.java
@@ -226,7 +226,7 @@
    Entry entry = createTestEntry(type, values);
    Set<SubtreeSpecification> result = new HashSet<>();
    List<Attribute> attributes = entry.getAttribute(type, true);
    List<Attribute> attributes = entry.getAllAttributes(type, true);
    for (Attribute a : attributes)
    {
      for (ByteString value : a)
@@ -456,56 +456,56 @@
    AttributeType uidType = getUIDAttributeType();
    AttributeType mnType = getModifiersNameAttributeType();
    assertThat(e.getAttribute(ocType)).hasSize(1);
    assertThat(e.getAttribute(cnType)).hasSize(2);
    assertThat(e.getAttribute(nameType)).hasSize(6);
    assertThat(e.getAllAttributes(ocType)).hasSize(1);
    assertThat(e.getAllAttributes(cnType)).hasSize(2);
    assertThat(e.getAllAttributes(nameType)).hasSize(6);
    assertThat(e.getAttribute(nameType, false)).isEmpty();
    assertThat(e.getAttribute(uidType)).isEmpty();
    assertThat(e.getAttribute(mnType)).hasSize(1);
    assertThat(e.getAttribute("objectclass")).hasSize(1);
    assertThat(e.getAttribute("cn")).hasSize(2);
    assertThat(e.getAttribute("uid")).isEmpty();
    assertThat(e.getAttribute("modifiersname")).hasSize(1);
    assertThat(e.getAllAttributes(nameType, false)).isEmpty();
    assertThat(e.getAllAttributes(uidType)).isEmpty();
    assertThat(e.getAllAttributes(mnType)).hasSize(1);
    assertThat(e.getAllAttributes("objectclass")).hasSize(1);
    assertThat(e.getAllAttributes("cn")).hasSize(2);
    assertThat(e.getAllAttributes("uid")).isEmpty();
    assertThat(e.getAllAttributes("modifiersname")).hasSize(1);
    LinkedHashSet<String> options = null;
    assertThat(e.getAttribute(AttributeDescription.create(ocType, options))).hasSize(1);
    assertThat(e.getAttribute(AttributeDescription.create(cnType, options))).hasSize(2);
    assertThat(e.getAttribute(AttributeDescription.create(nameType, options))).hasSize(6);
    assertThat(e.getAllAttributes(AttributeDescription.create(ocType, options))).hasSize(1);
    assertThat(e.getAllAttributes(AttributeDescription.create(cnType, options))).hasSize(2);
    assertThat(e.getAllAttributes(AttributeDescription.create(nameType, options))).hasSize(6);
    assertThat(e.getAttribute(AttributeDescription.create(uidType, options))).isEmpty();
    assertThat(e.getAttribute(AttributeDescription.create(mnType, options))).hasSize(1);
    assertThat(e.getAllAttributes(AttributeDescription.create(uidType, options))).isEmpty();
    assertThat(e.getAllAttributes(AttributeDescription.create(mnType, options))).hasSize(1);
    options = new LinkedHashSet<>();
    assertThat(e.getAttribute(AttributeDescription.create(ocType, options))).hasSize(1);
    assertThat(e.getAttribute(AttributeDescription.create(cnType, options))).hasSize(2);
    assertThat(e.getAttribute(AttributeDescription.create(nameType, options))).hasSize(6);
    assertThat(e.getAllAttributes(AttributeDescription.create(ocType, options))).hasSize(1);
    assertThat(e.getAllAttributes(AttributeDescription.create(cnType, options))).hasSize(2);
    assertThat(e.getAllAttributes(AttributeDescription.create(nameType, options))).hasSize(6);
    assertThat(e.getAttribute(AttributeDescription.create(uidType, options))).isEmpty();
    assertThat(e.getAttribute(AttributeDescription.create(mnType, options))).hasSize(1);
    assertThat(e.getAllAttributes(AttributeDescription.create(uidType, options))).isEmpty();
    assertThat(e.getAllAttributes(AttributeDescription.create(mnType, options))).hasSize(1);
    options.add("lang-en-US");
    assertThat(e.getAttribute(AttributeDescription.create(ocType, options))).isEmpty();
    assertThat(e.getAttribute(AttributeDescription.create(cnType, options))).hasSize(1);
    assertThat(e.getAttribute(AttributeDescription.create(nameType, options))).hasSize(3);
    assertThat(e.getAllAttributes(AttributeDescription.create(ocType, options))).isEmpty();
    assertThat(e.getAllAttributes(AttributeDescription.create(cnType, options))).hasSize(1);
    assertThat(e.getAllAttributes(AttributeDescription.create(nameType, options))).hasSize(3);
    assertThat(e.getAttribute(AttributeDescription.create(uidType, options))).isEmpty();
    assertThat(e.getAttribute(AttributeDescription.create(mnType, options))).isEmpty();
    assertThat(e.getAllAttributes(AttributeDescription.create(uidType, options))).isEmpty();
    assertThat(e.getAllAttributes(AttributeDescription.create(mnType, options))).isEmpty();
    options.add("lang-en-GB");
    assertThat(e.getAttribute(AttributeDescription.create(ocType, options))).isEmpty();
    assertThat(e.getAttribute(AttributeDescription.create(cnType, options))).isEmpty();
    assertThat(e.getAttribute(AttributeDescription.create(nameType, options))).isEmpty();
    assertThat(e.getAttribute(AttributeDescription.create(uidType, options))).isEmpty();
    assertThat(e.getAttribute(AttributeDescription.create(mnType, options))).isEmpty();
    assertThat(e.getAllAttributes(AttributeDescription.create(ocType, options))).isEmpty();
    assertThat(e.getAllAttributes(AttributeDescription.create(cnType, options))).isEmpty();
    assertThat(e.getAllAttributes(AttributeDescription.create(nameType, options))).isEmpty();
    assertThat(e.getAllAttributes(AttributeDescription.create(uidType, options))).isEmpty();
    assertThat(e.getAllAttributes(AttributeDescription.create(mnType, options))).isEmpty();
    options.clear();
    options.add("lang-en-GB");
    assertThat(e.getAttribute(AttributeDescription.create(ocType, options))).isEmpty();
    assertThat(e.getAttribute(AttributeDescription.create(cnType, options))).isEmpty();
    assertThat(e.getAttribute(AttributeDescription.create(nameType, options))).isEmpty();
    assertThat(e.getAttribute(AttributeDescription.create(uidType, options))).isEmpty();
    assertThat(e.getAttribute(AttributeDescription.create(mnType, options))).isEmpty();
    assertThat(e.getAllAttributes(AttributeDescription.create(ocType, options))).isEmpty();
    assertThat(e.getAllAttributes(AttributeDescription.create(cnType, options))).isEmpty();
    assertThat(e.getAllAttributes(AttributeDescription.create(nameType, options))).isEmpty();
    assertThat(e.getAllAttributes(AttributeDescription.create(uidType, options))).isEmpty();
    assertThat(e.getAllAttributes(AttributeDescription.create(mnType, options))).isEmpty();
  }