From 3cc522e06e56a95c9d7ea043b8d97cae8ddb1181 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 10 Jun 2016 07:39:35 +0000
Subject: [PATCH] Code cleanup in schema

---
 opendj-server-legacy/src/main/java/org/opends/server/backends/SchemaBackend.java |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/SchemaBackend.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/SchemaBackend.java
index 59416a7..d62ad64 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/SchemaBackend.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/SchemaBackend.java
@@ -513,8 +513,7 @@
     {
       for (AVA ava : rdn)
       {
-        AttributeType attrType = ava.getAttributeType();
-        Attribute attribute = Attributes.create(attrType, ava.getAttributeValue());
+        Attribute attribute = Attributes.create(ava.getAttributeType(), ava.getAttributeValue());
         addAttributeToSchemaEntry(attribute, userAttrs, operationalAttrs);
       }
     }
@@ -571,7 +570,7 @@
         Attributes.create(getModifyTimestampAttributeType(), modifyTimestamp), userAttrs, operationalAttrs);
 
     // Add the extra attributes.
-    for (Attribute attribute : DirectoryServer.getSchema().getExtraAttributes().values())
+    for (Attribute attribute : DirectoryServer.getSchema().getExtraAttributes())
     {
       addAttributeToSchemaEntry(attribute, userAttrs, operationalAttrs);
     }
@@ -2255,7 +2254,7 @@
 
     if (FILE_USER_SCHEMA_ELEMENTS.equals(schemaFile))
     {
-      for (Attribute attribute : schema.getExtraAttributes().values())
+      for (Attribute attribute : schema.getExtraAttributes())
       {
         AttributeType attributeType = attribute.getAttributeDescription().getAttributeType();
         schemaEntry.putAttribute(attributeType, newArrayList(attribute));

--
Gitblit v1.10.0