opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ServerDescriptor.java
@@ -639,7 +639,7 @@ && areEqual(getDefinitionWithFileName(oc1), getDefinitionWithFileName(oc2)) && areEqual(oc1.getDescription(), oc2.getDescription()) && areEqual(oc1.getObjectClassType(), oc2.getObjectClassType()) && areEqual(oc1.getOptionalAttributes(), oc2.getOptionalAttributes()) && areEqual(oc1.getDeclaredOptionalAttributes(), oc2.getDeclaredOptionalAttributes()) && areEqual(oc1.getDeclaredRequiredAttributes(), oc2.getDeclaredRequiredAttributes()) && areEqual(oc1.getSuperiorClasses(), oc2.getSuperiorClasses()) && areEqual(oc1.getExtraProperties().keySet(), oc2.getExtraProperties().keySet()) opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/DeleteSchemaElementsTask.java
@@ -530,14 +530,14 @@ if (containsAttribute) { required = new HashSet<>(ocToDelete.getDeclaredRequiredAttributes()); optional = new HashSet<>(ocToDelete.getOptionalAttributes()); optional = new HashSet<>(ocToDelete.getDeclaredOptionalAttributes()); required.removeAll(providedAttrsToDelete); optional.removeAll(providedAttrsToDelete); } else { required = ocToDelete.getDeclaredRequiredAttributes(); optional = ocToDelete.getOptionalAttributes(); optional = ocToDelete.getDeclaredOptionalAttributes(); } return new ObjectClass("", ocToDelete.getPrimaryName(), opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/ModifyAttributeTask.java
@@ -167,7 +167,7 @@ Map<String, List<String>> extraProperties = DeleteSchemaElementsTask.cloneExtraProperties(ocToDelete); Set<AttributeType> required = new HashSet<>(ocToDelete.getDeclaredRequiredAttributes()); Set<AttributeType> optional = new HashSet<>(ocToDelete.getOptionalAttributes()); Set<AttributeType> optional = new HashSet<>(ocToDelete.getDeclaredOptionalAttributes()); if (required.contains(oldAttribute)) { required.remove(oldAttribute); opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/ModifyObjectClassTask.java
@@ -167,7 +167,7 @@ ocToDelete.getDescription(), newSups, ocToDelete.getDeclaredRequiredAttributes(), ocToDelete.getOptionalAttributes(), ocToDelete.getDeclaredOptionalAttributes(), ocToDelete.getObjectClassType(), ocToDelete.isObsolete(), extraProperties); opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/NewSchemaElementsTask.java
@@ -420,7 +420,7 @@ appendOIDs(buffer, "SUP", objectClassesToSchemaElements(objectClass.getSuperiorClasses())); appendIfNotNull(buffer, " ", objectClass.getObjectClassType()); appendOIDs(buffer, "MUST", attributeTypesToSchemaElements(objectClass.getDeclaredRequiredAttributes())); appendOIDs(buffer, "MAY", attributeTypesToSchemaElements(objectClass.getOptionalAttributes())); appendOIDs(buffer, "MAY", attributeTypesToSchemaElements(objectClass.getDeclaredOptionalAttributes())); appendExtraProperties(buffer, objectClass.getExtraProperties()); buffer.append(")"); opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/CustomObjectClassPanel.java
@@ -482,7 +482,7 @@ availableModel.remove(attr); modelRequired.add(attr); } for (AttributeType attr : oc.getOptionalAttributes()) for (AttributeType attr : oc.getDeclaredOptionalAttributes()) { availableModel.remove(attr); modelAvailable.add(attr); opendj-server-legacy/src/main/java/org/opends/server/backends/SchemaBackend.java
@@ -1382,7 +1382,7 @@ for (ObjectClass oc : schema.getObjectClasses().values()) { if (oc.getDeclaredRequiredAttributes().contains(removeType) || oc.getOptionalAttributes().contains(removeType)) oc.getDeclaredOptionalAttributes().contains(removeType)) { LocalizableMessage message = ERR_SCHEMA_MODIFY_REMOVE_AT_IN_OC.get( removeType.getNameOrOID(), oc.getNameOrOID()); @@ -1529,7 +1529,7 @@ } } for (AttributeType at : objectClass.getOptionalAttributes()) for (AttributeType at : objectClass.getDeclaredOptionalAttributes()) { if (! schema.hasAttributeType(at.getOID())) { opendj-server-legacy/src/main/java/org/opends/server/types/ObjectClass.java
@@ -348,7 +348,7 @@ * @return Returns an unmodifiable view of the set of optional * attributes for this objectclass. */ public Set<AttributeType> getOptionalAttributes() { public Set<AttributeType> getDeclaredOptionalAttributes() { return optionalAttributes; } opendj-server-legacy/src/main/java/org/opends/server/types/Schema.java
@@ -1933,7 +1933,7 @@ for (ObjectClass oc : objectClasses.values()) { if (oc.getDeclaredRequiredAttributes().contains(type) || oc.getOptionalAttributes().contains(type)) if (oc.getDeclaredRequiredAttributes().contains(type) || oc.getDeclaredOptionalAttributes().contains(type)) { ObjectClass newOC = recreateFromDefinition(oc); deregisterObjectClass(oc); opendj-server-legacy/src/test/java/org/opends/server/types/TestObjectClass.java
@@ -591,7 +591,7 @@ /** * Check the {@link ObjectClass#getOptionalAttributes()} method with * Check the {@link ObjectClass#getDeclaredOptionalAttributes()} method with * no superior and no optional attributes. * * @throws Exception @@ -603,13 +603,13 @@ ObjectClassBuilder builder = new ObjectClassBuilder("testType", "1.2.3"); ObjectClass c = builder.getInstance(); Assert.assertTrue(c.getOptionalAttributes().isEmpty()); Assert.assertTrue(c.getDeclaredOptionalAttributes().isEmpty()); } /** * Check the {@link ObjectClass#getOptionalAttributes()} method with * Check the {@link ObjectClass#getDeclaredOptionalAttributes()} method with * no superior and some optional attributes. * * @throws Exception @@ -622,7 +622,7 @@ builder.addOptionalAttributeTypes(types[0], types[1], types[2]); ObjectClass c = builder.getInstance(); Set<AttributeType> chain = c.getOptionalAttributes(); Set<AttributeType> chain = c.getDeclaredOptionalAttributes(); Assert.assertEquals(chain.size(), 3); Assert.assertTrue(chain.contains(types[0])); Assert.assertTrue(chain.contains(types[1])); @@ -632,7 +632,7 @@ /** * Check the {@link ObjectClass#getOptionalAttributes()} method with * Check the {@link ObjectClass#getDeclaredOptionalAttributes()} method with * a superior but no optional attributes of its own. * * @throws Exception @@ -649,13 +649,13 @@ builder.setSuperior(Collections.singleton(parent)); ObjectClass child = builder.getInstance(); Assert.assertTrue(child.getOptionalAttributes().isEmpty()); Assert.assertTrue(child.getDeclaredOptionalAttributes().isEmpty()); } /** * Check the {@link ObjectClass#getOptionalAttributes()} method with * Check the {@link ObjectClass#getDeclaredOptionalAttributes()} method with * a superior and some optional attributes of its own. * * @throws Exception @@ -673,7 +673,7 @@ builder.setSuperior(Collections.singleton(parent)); ObjectClass child = builder.getInstance(); Set<AttributeType> chain = child.getOptionalAttributes(); Set<AttributeType> chain = child.getDeclaredOptionalAttributes(); Assert.assertEquals(chain.size(), 3); Assert.assertTrue(chain.contains(types[3])); Assert.assertTrue(chain.contains(types[4]));