From 6ffbe15300d38c8236c50162f5d05e26f1f7515c Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Tue, 04 Aug 2026 08:32:37 +0000
Subject: [PATCH] Remove the stale migration deprecations of ObjectClass and AttributeDescription (#832)

---
 opendj-core/src/main/java/org/forgerock/opendj/ldap/AttributeDescription.java |   19 ++++---------------
 opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java   |    8 +++++---
 2 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/AttributeDescription.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/AttributeDescription.java
index d61ea31..2dcbc24 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/AttributeDescription.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/AttributeDescription.java
@@ -587,10 +587,7 @@
      * @return The attribute description.
      * @throws NullPointerException
      *             If {@code attributeType} was {@code null}.
-     * @deprecated This method may be removed at any time
-     * @since OPENDJ-2803 Migrate Attribute
      */
-    @Deprecated
     public static AttributeDescription create(final String attributeName, final AttributeType attributeType) {
         Reject.ifNull(attributeName, attributeType);
 
@@ -628,10 +625,7 @@
      * @return The attribute description.
      * @throws NullPointerException
      *             If {@code attributeType} or {@code option} was {@code null}.
-     * @deprecated This method may be removed at any time
-     * @since OPENDJ-2803 Migrate Attribute
      */
-    @Deprecated
     public static AttributeDescription create(
             final String attributeName, final AttributeType attributeType, final String option) {
         Reject.ifNull(attributeName, attributeType, option);
@@ -663,10 +657,7 @@
      * @return The attribute description.
      * @throws NullPointerException
      *             If {@code attributeType} or {@code options} was {@code null}.
-     * @deprecated This method may be removed at any time
-     * @since OPENDJ-2803 Migrate Attribute
      */
-    @Deprecated
     public static AttributeDescription create(
             final String attributeName, final AttributeType attributeType, final String... options) {
         Reject.ifNull(options);
@@ -716,10 +707,7 @@
      * @return The attribute description.
      * @throws NullPointerException
      *             If {@code attributeType} or {@code options} was {@code null}.
-     * @deprecated This method may be removed at any time
-     * @since OPENDJ-2803 Migrate Attribute
      */
-    @Deprecated
     public static AttributeDescription create(
             final String attributeName, final AttributeType attributeType, final Collection<String> options) {
         Reject.ifNull(attributeName, attributeType);
@@ -1164,13 +1152,14 @@
      * <p>
      * In other words, it returns the user-provided name or oid of this attribute description,
      * leaving out the option(s).
+     * <p>
+     * Unlike {@code getAttributeType().getNameOrOID()}, which returns the primary name of the
+     * attribute type in the schema, this method preserves the name as it was provided, including
+     * its case and any alias which was used.
      *
      * @return The attribute name or the oid provided by the user associated with this attribute
      *         description.
-     * @deprecated This method may be removed at any time
-     * @since OPENDJ-2803 Migrate Attribute
      */
-    @Deprecated
     public String getNameOrOID() {
         return nameOrOid;
     }
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java
index aee56ee..993760e 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java
@@ -13,6 +13,7 @@
  *
  * Copyright 2009 Sun Microsystems, Inc.
  * Portions copyright 2015-2016 ForgeRock AS.
+ * Portions Copyright 2026 3A Systems, LLC.
  */
 package org.forgerock.opendj.ldap.schema;
 
@@ -702,13 +703,14 @@
     /**
      * Returns whether this object class is a placeholder,
      * i.e. a dummy object class that does not exist in the schema.
+     * <p>
+     * This is the only way of telling apart an object class read from the schema from the
+     * placeholder a non-strict schema returns for an unknown object class, short of asking the
+     * schema again with {@link Schema#hasObjectClass(String)}.
      *
      * @return {@code true} if this object class is a placeholder,
      *         {@code false} otherwise
-     * @deprecated This method may be removed at any time
-     * @since OPENDJ-2987 Migrate ObjectClass
      */
-    @Deprecated
     public boolean isPlaceHolder() {
         return isPlaceHolder;
     }

--
Gitblit v1.10.0