[ 
https://issues.apache.org/jira/browse/OPENMEETINGS-1875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

KuiLIU updated OPENMEETINGS-1875:
---------------------------------
    Description: 
The method "toXml" outputs data to a Xml file, but "toXml" is prone to convert 
one thing to one Xml obejct, so "saveToXml" should be better."
{code:java}
       public static void toXml(Writer out, Document doc) throws Exception {
                OutputFormat outformat = OutputFormat.createPrettyPrint();
                outformat.setIndentSize(1);
                outformat.setIndent("\t");
                outformat.setEncoding(UTF_8.name());
                XMLWriter writer = new XMLWriter(out, outformat);
                writer.write(doc);
                writer.flush();
                out.flush();
                out.close();
        }
{code}


  was:
The method outputs data to a Xml file, but "toXml" is prone to convert one 
thing to one Xml obejct, so "saveToXml" should be better."
{code:java}
       public static void toXml(Writer out, Document doc) throws Exception {
                OutputFormat outformat = OutputFormat.createPrettyPrint();
                outformat.setIndentSize(1);
                outformat.setIndent("\t");
                outformat.setEncoding(UTF_8.name());
                XMLWriter writer = new XMLWriter(out, outformat);
                writer.write(doc);
                writer.flush();
                out.flush();
                out.close();
        }
{code}



> Inconsistent method name "toXml"
> --------------------------------
>
>                 Key: OPENMEETINGS-1875
>                 URL: https://issues.apache.org/jira/browse/OPENMEETINGS-1875
>             Project: Openmeetings
>          Issue Type: Improvement
>    Affects Versions: 4.0.3
>            Reporter: KuiLIU
>            Assignee: Maxim Solodovnik
>            Priority: Major
>         Attachments: rename-method.patch
>
>
> The method "toXml" outputs data to a Xml file, but "toXml" is prone to 
> convert one thing to one Xml obejct, so "saveToXml" should be better."
> {code:java}
>        public static void toXml(Writer out, Document doc) throws Exception {
>               OutputFormat outformat = OutputFormat.createPrettyPrint();
>               outformat.setIndentSize(1);
>               outformat.setIndent("\t");
>               outformat.setEncoding(UTF_8.name());
>               XMLWriter writer = new XMLWriter(out, outformat);
>               writer.write(doc);
>               writer.flush();
>               out.flush();
>               out.close();
>       }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to