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

KuiLIU commented on OPENMEETINGS-1875:
--------------------------------------

I think that "toXml" is prone to convert one thing to one Xml obejct.
It is a little confusing since the method outputs data to a Xml file.
Adding the additional 4 characters to make the method name more clear that the 
method is going to save the data to a Xml file.

I didn't remove the method "toXml" and just annotated is as"@deprecated", since 
removing the method "toXml" might break the backward compatibility.


> 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