ottlinger commented on code in PR #233: URL: https://github.com/apache/creadur-rat/pull/233#discussion_r1564258632
########## apache-rat-core/src/main/java/org/apache/rat/report/xml/writer/impl/base/XmlWriter.java: ########## @@ -525,24 +548,36 @@ private void writeAttributeContent(CharSequence content) throws IOException { */ @Override public IXmlWriter content(CharSequence content) throws IOException { - if (elementNames.isEmpty()) { - if (elementsWritten) { - throw new OperationNotAllowedException("Root element has already been closed."); - } - throw new OperationNotAllowedException("An element must be opened before content can be written."); - } - if (inElement) { - writer.write('>'); - } - writeBodyContent(content); + prepareForData(); + writeEscaped(content, false); inElement = false; return this; } - private void writeBodyContent(final CharSequence content) throws IOException { - writeEscaped(content, false); + + /** + * Writes content. Calling this method will automatically Note that this method Review Comment: Calling this method will automatically .... seems like a copy&paste thing - Do you want to add info that the element is closed automtically? Pls add a linebreak before "Note that ..." -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@creadur.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org