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

Matthew Swift
18.25.2013 61c9a2cb2e9f54a89b78183c27ad9f9c2ecb1f40
Minor code cleanup.
1 files modified
15 ■■■■ changed files
opendj3/opendj-core/src/main/java/org/forgerock/opendj/ldap/Entries.java 15 ●●●● patch | view | raw | blame | history
opendj3/opendj-core/src/main/java/org/forgerock/opendj/ldap/Entries.java
@@ -396,14 +396,14 @@
        final ModifyRequest request = Requests.newModifyRequest(fromEntry.getName());
        TreeMapEntry tfrom;
        final TreeMapEntry tfrom;
        if (fromEntry instanceof TreeMapEntry) {
            tfrom = (TreeMapEntry) fromEntry;
        } else {
            tfrom = new TreeMapEntry(fromEntry);
        }
        TreeMapEntry tto;
        final TreeMapEntry tto;
        if (toEntry instanceof TreeMapEntry) {
            tto = (TreeMapEntry) toEntry;
        } else {
@@ -419,14 +419,13 @@
        while (afrom != null && ato != null) {
            final AttributeDescription adfrom = afrom.getAttributeDescription();
            final AttributeDescription adto = ato.getAttributeDescription();
            final int cmp = adfrom.compareTo(adto);
            if (cmp == 0) {
                // Attribute is in both entries. Compute the set of values to be
                // added
                // and removed. We won't replace the attribute because this is
                // not
                // reversible.
                /*
                 * Attribute is in both entries. Compute the set of values to be
                 * added and removed. We won't replace the attribute because
                 * this is not reversible.
                 */
                final Attribute addedValues = new LinkedAttribute(ato);
                addedValues.removeAll(afrom);
                if (!addedValues.isEmpty()) {