[ 
https://issues.apache.org/jira/browse/KNOX-863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15861912#comment-15861912
 ] 

Sandeep More commented on KNOX-863:
-----------------------------------

Hello [~coheigea], those are some nice improvements, thanks for the patch.
I have a question about the patch 
There are few places, 3 I believe, where we have the following change:
{code:xml}
-      XmlUtils.writeXml( document, writer );
+      Transformer t = XmlUtils.getTransformer( false, true, 4, false );
+      XmlUtils.writeXml( document, writer, t );
{code}

Insted of changing this in multiple places do you think we can just update 
the writeXml( document, writer ) method in XmlUtils (rather then deleting it)
something like 
{code:java}
public static void writeXml( Document document, Writer writer ) throws 
TransformerException {
    Transformer t = getTransformer( false, true, 4, false );
    writeXml( document, writer, t );
  }
{code}

We keep the existing api with greater code reuse.
Let me know your thoughts.

> Consolidate TransformerFactory calls + enable SECURE_PROCESSING
> ---------------------------------------------------------------
>
>                 Key: KNOX-863
>                 URL: https://issues.apache.org/jira/browse/KNOX-863
>             Project: Apache Knox
>          Issue Type: Improvement
>    Affects Versions: 0.11.0
>            Reporter: Colm O hEigeartaigh
>            Assignee: Colm O hEigeartaigh
>            Priority: Minor
>             Fix For: 0.12.0
>
>         Attachments: 
> 0001-KNOX-863-Consolidate-TransformerFactory-calls-enable.patch
>
>
> Similar to KNOX-854, this task is to consolidate TransformerFactory calls 
> into a single class (XmlUtils), in order to remove duplicate code. This task 
> also encompasses enabling the SECURE_PROCESSING feature when parsing XML, 
> which is generally a "good thing to do".



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to