From ba663b53d933130d2b6a68c1644e5744428dd1d6 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 25 Nov 2016 11:41:50 +0000
Subject: [PATCH] Manual fixes/changes post inlining DirectoryServer.getSchema()

---
 opendj-server-legacy/src/main/java/org/opends/server/extensions/VirtualStaticGroup.java |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/extensions/VirtualStaticGroup.java b/opendj-server-legacy/src/main/java/org/opends/server/extensions/VirtualStaticGroup.java
index 1e55fa8..55ebb81 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/extensions/VirtualStaticGroup.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/extensions/VirtualStaticGroup.java
@@ -30,7 +30,7 @@
 import org.forgerock.opendj.ldap.DN;
 import org.forgerock.opendj.ldap.ResultCode;
 import org.forgerock.opendj.ldap.SearchScope;
-import org.forgerock.opendj.ldap.schema.AttributeType;
+import org.forgerock.opendj.ldap.schema.Schema;
 import org.forgerock.opendj.server.config.server.VirtualStaticGroupImplementationCfg;
 import org.opends.server.api.Group;
 import org.opends.server.core.DirectoryServer;
@@ -109,8 +109,7 @@
 
     // Get the target group DN attribute from the entry, if there is one.
     DN targetDN = null;
-    AttributeType targetType = DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_TARGET_GROUP_DN);
-    for (Attribute a : groupEntry.getAllAttributes(targetType))
+    for (Attribute a : groupEntry.getAllAttributes(ATTR_TARGET_GROUP_DN))
     {
       for (ByteString v : a)
       {
@@ -160,7 +159,8 @@
     ifNull(entry);
 
     // FIXME -- This needs to exclude enhanced groups once we have support for them.
-    return entry.hasObjectClass(DirectoryServer.getInstance().getServerContext().getSchema().getObjectClass(OC_VIRTUAL_STATIC_GROUP));
+    Schema schema = DirectoryServer.getInstance().getServerContext().getSchema();
+    return entry.hasObjectClass(schema.getObjectClass(OC_VIRTUAL_STATIC_GROUP));
   }
 
   @Override
@@ -227,7 +227,7 @@
       return false;
     }
 
-    Group targetGroup =
+    Group<?> targetGroup =
          DirectoryServer.getGroupManager().getGroupInstance(targetGroupDN);
     if (targetGroup == null)
     {
@@ -255,7 +255,7 @@
       return false;
     }
 
-    Group targetGroup =
+    Group<?> targetGroup =
          DirectoryServer.getGroupManager().getGroupInstance(targetGroupDN);
     if (targetGroup == null)
     {
@@ -288,7 +288,7 @@
   public MemberList getMembers()
          throws DirectoryException
   {
-    Group targetGroup =
+    Group<?> targetGroup =
          DirectoryServer.getGroupManager().getGroupInstance(targetGroupDN);
     if (targetGroup == null)
     {
@@ -311,7 +311,7 @@
                                SearchFilter filter)
          throws DirectoryException
   {
-    Group targetGroup =
+    Group<?> targetGroup =
          DirectoryServer.getGroupManager().getGroupInstance(targetGroupDN);
     if (targetGroup == null)
     {

--
Gitblit v1.10.0