<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    <div class="moz-cite-prefix">On 11/5/15 10:23 AM, Cantor, Scott
      wrote:<br>
    </div>
    <blockquote cite="mid:06FC0347-79BA-492F-A355-BE6D8995DAD1@osu.edu"
      type="cite">
      <pre wrap="">On 11/5/15, 2:55 AM, "dev on behalf of Brent Putman" <a class="moz-txt-link-rfc2396E" href="mailto:dev-bounces@shibboleth.netonbehalfofputmanb@georgetown.edu"><dev-bounces@shibboleth.net on behalf of putmanb@georgetown.edu></a> wrote:



</pre>
      <blockquote type="cite">
        <pre wrap="">I was even thinking perhaps we needed new options on the clone methods to just do that by default, since seems a common case.  But for the record here's what I did:

AuthnStatement statement = XMLObjectSupport.cloneXMLObject(sourceStatement);
statement.releaseDOM();
statement.releaseChildrenDOM(true);
return statement;
</pre>
      </blockquote>
      <pre wrap="">
We have 3-4 places in the code doing this, so I'd say it's a little awkward to have that sequence hanging out all over. A brief comment isn't very clarifying.</pre>
    </blockquote>
    <br>
    No, it's awkward.  I was thinking of adding something to the clone
    methods to just do that.  I don't know that there's any good reason
    to ever return a cloned object that has a non-rooted DOM.  We could
    just change the no-boolean clone(XMLObject) method to do that by
    default.  We'd be changing behavior, but probably not in a bad way. 
    But if we think that's not allowed or advisable, I was thinking of
    adding a new CloneOutputOption enum to support representing all 3
    options, and a new clone(XMLObject, CloneOutputOption). Then
    deprecate the clone(XMLObject, boolean) one.<br>
    <br>
    <br>
  </body>
</html>