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/test/java/org/opends/server/protocols/ldap/TestLDAPConnectionHandler.java |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/opendj-server-legacy/src/test/java/org/opends/server/protocols/ldap/TestLDAPConnectionHandler.java b/opendj-server-legacy/src/test/java/org/opends/server/protocols/ldap/TestLDAPConnectionHandler.java
index 10852ee..fc43c03 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/protocols/ldap/TestLDAPConnectionHandler.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/protocols/ldap/TestLDAPConnectionHandler.java
@@ -32,6 +32,7 @@
 import org.opends.server.core.DirectoryServer;
 import org.opends.server.types.Attribute;
 import org.forgerock.opendj.ldap.schema.AttributeType;
+import org.forgerock.opendj.ldap.schema.Schema;
 import org.forgerock.opendj.reactive.LDAPConnectionHandler2;
 import org.opends.server.types.Attributes;
 import org.forgerock.opendj.ldap.DN;
@@ -229,21 +230,22 @@
         "ds-cfg-trust-manager-provider: cn=JKS,cn=Trust Manager Providers,cn=config");
     LDAPConnectionHandler2 LDAPConnHandler=getLDAPHandlerInstance(GoodHandlerEntry);
     //Make attrTypes to remove
-    AttributeType at0=DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_LISTEN_PORT);
+    Schema schema = DirectoryServer.getInstance().getServerContext().getSchema();
+    AttributeType at0=schema.getAttributeType(ATTR_LISTEN_PORT);
 //    AttributeType at1=DirectoryServer.getAttributeType(ATTR_LISTEN_ADDRESS, true);
 //    Attribute rAttr1=new Attribute(at1);
 //    GoodHandlerEntry.removeAttribute(rAttr1, null);
-    AttributeType at2=DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_ALLOW_LDAPV2);
-    AttributeType at3=DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_ALLOW_LDAPV2);
-    AttributeType at4=DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_KEEP_LDAP_STATS);
-    AttributeType at5=DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_SEND_REJECTION_NOTICE);
-    AttributeType at6=DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_USE_TCP_KEEPALIVE);
-    AttributeType at7=DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_USE_TCP_NODELAY);
-    AttributeType at8=DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_ALLOW_REUSE_ADDRESS);
-    AttributeType at9=DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_USE_SSL);
-    AttributeType at10=DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_ALLOW_STARTTLS);
-    AttributeType at11=DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_MAX_REQUEST_SIZE);
-    AttributeType at12=DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_ACCEPT_BACKLOG);
+    AttributeType at2=schema.getAttributeType(ATTR_ALLOW_LDAPV2);
+    AttributeType at3=schema.getAttributeType(ATTR_ALLOW_LDAPV2);
+    AttributeType at4=schema.getAttributeType(ATTR_KEEP_LDAP_STATS);
+    AttributeType at5=schema.getAttributeType(ATTR_SEND_REJECTION_NOTICE);
+    AttributeType at6=schema.getAttributeType(ATTR_USE_TCP_KEEPALIVE);
+    AttributeType at7=schema.getAttributeType(ATTR_USE_TCP_NODELAY);
+    AttributeType at8=schema.getAttributeType(ATTR_ALLOW_REUSE_ADDRESS);
+    AttributeType at9=schema.getAttributeType(ATTR_USE_SSL);
+    AttributeType at10=schema.getAttributeType(ATTR_ALLOW_STARTTLS);
+    AttributeType at11=schema.getAttributeType(ATTR_MAX_REQUEST_SIZE);
+    AttributeType at12=schema.getAttributeType(ATTR_ACCEPT_BACKLOG);
     //Remove them
     Attribute rAttr0=Attributes.empty(at0);
     GoodHandlerEntry.removeAttribute(rAttr0, null);

--
Gitblit v1.10.0