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

Matthew Swift
29.06.2013 f2711b53bdd5f48eaf312981541b61c6e89bdfa1
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/Attributes.java
@@ -496,7 +496,13 @@
    public static final Attribute renameAttribute(final Attribute attribute,
            final AttributeDescription attributeDescription) {
        Validator.ensureNotNull(attribute, attributeDescription);
        return new RenamedAttribute(attribute, attributeDescription);
        // Optimize for the case where no renaming is required.
        if (attribute.getAttributeDescription() == attributeDescription) {
            return attribute;
        } else {
            return new RenamedAttribute(attribute, attributeDescription);
        }
    }
    /**