mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Nicolas Capponi
19.40.2016 0581e62fc0101b967775920b04ad148845316ace
OPENDJ-2987 Fix computation of optional attributes for isExtensible ObjectClass
1 files modified
8 ■■■■■ changed files
opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java 8 ●●●●● patch | view | raw | blame | history
opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java
@@ -960,9 +960,11 @@
        }
        if (isExtensible()) {
            declaredOptionalAttributes = new HashSet<>(requiredAttributeOIDs.size());
            for (final AttributeType attributeType : schema.getAttributeTypes()) {
                if (attributeType.getUsage() == AttributeUsage.USER_APPLICATIONS) {
            Collection<AttributeType> attributeTypes = schema.getAttributeTypes();
            declaredOptionalAttributes = new HashSet<>(attributeTypes.size());
            for (final AttributeType attributeType : attributeTypes) {
                if (attributeType.getUsage() == AttributeUsage.USER_APPLICATIONS
                        && !requiredAttributes.contains(attributeType)) {
                    declaredOptionalAttributes.add(attributeType);
                }
            }