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

Nicolas Capponi
18.11.2016 2459c67edc7eadb7ff23ebf3bf42ed738b0ae8bd
OPENDJ-2987 Fix SDK Objectclass to inherit all optional attributes from superior class
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
@@ -929,12 +929,12 @@
                }
                // Inherit all optional attributes from superior class.
                i = superiorClass.getRequiredAttributes().iterator();
                if (i.hasNext() && requiredAttributes == Collections.EMPTY_SET) {
                    requiredAttributes = new HashSet<>();
                i = superiorClass.getOptionalAttributes().iterator();
                if (i.hasNext() && optionalAttributes == Collections.EMPTY_SET) {
                    optionalAttributes = new HashSet<>();
                }
                while (i.hasNext()) {
                    requiredAttributes.add(i.next());
                    optionalAttributes.add(i.next());
                }
                superiorClasses.add(superiorClass);