Santuario change
Brent Putman
putmanb at georgetown.edu
Thu Nov 5 12:37:44 EST 2015
On 11/5/15 10:23 AM, Cantor, Scott wrote:
> On 11/5/15, 2:55 AM, "dev on behalf of Brent Putman" <dev-bounces at shibboleth.net on behalf of putmanb at georgetown.edu> wrote:
>
>
>
>> 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;
> 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.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20151105/ce92131c/attachment-0001.html>
More information about the dev
mailing list