[java-opensaml COMMIT] /trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/filter/impl/Entity...

noreply at shibboleth.net noreply at shibboleth.net
Thu Nov 5 10:28:31 EST 2015


Author: scantor
Date: Thu Nov  5 10:28:31 2015
New Revision: 4383

URL: http://svn.shibboleth.net/view/java-opensaml?rev=4383&view=rev
Log:
Drop the clone's DOM for consistency with other code.

Modified:
    trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/filter/impl/EntityAttributesFilter.java

Modified: trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/filter/impl/EntityAttributesFilter.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/filter/impl/EntityAttributesFilter.java?rev=4383&r1=4382&r2=4383&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/filter/impl/EntityAttributesFilter.java	(original)
+++ trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/filter/impl/EntityAttributesFilter.java	Thu Nov  5 10:28:31 2015
@@ -139,7 +139,11 @@
                     try {
                         log.info("Adding EntityAttribute ({}) to EntityDescriptor ({})", attribute.getName(),
                                 descriptor.getEntityID());
-                        entityAttributes.getAttributes().add(XMLObjectSupport.cloneXMLObject(attribute));
+                        final Attribute copy = XMLObjectSupport.cloneXMLObject(attribute);
+                        // Drop the cloned DOM in case the lack of a parent node matters.
+                        copy.releaseDOM();
+                        copy.releaseChildrenDOM(true);
+                        entityAttributes.getAttributes().add(copy);
                     } catch (final MarshallingException | UnmarshallingException e) {
                         log.error("Error cloning Attribute", e);
                     }



More information about the commits mailing list