ottlinger commented on code in PR #233: URL: https://github.com/apache/creadur-rat/pull/233#discussion_r1564258251
########## apache-rat-core/src/main/java/org/apache/rat/report/xml/writer/impl/base/XmlWriter.java: ########## @@ -514,6 +526,17 @@ private void writeAttributeContent(CharSequence content) throws IOException { writeEscaped(content, true); } + private void prepareForData() 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('>'); + } + } /** * 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? -- 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