You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by "KuiLIU (JIRA)" <ji...@apache.org> on 2018/04/17 13:48:00 UTC

[jira] [Updated] (OPENMEETINGS-1875) Inconsistent method name "toXml"

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

KuiLIU updated OPENMEETINGS-1875:
---------------------------------
    Affects Version/s: 4.0.3
           Attachment: rename-method.patch
          Description: 
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 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)