Tomasz Nowak created GROOVY-7594:
------------------------------------

             Summary: XmlUtil.serialize is not processing whole message
                 Key: GROOVY-7594
                 URL: https://issues.apache.org/jira/browse/GROOVY-7594
             Project: Groovy
          Issue Type: Bug
          Components: XML Processing
    Affects Versions: 2.3.7
         Environment: Linux (Virtual Machine)
            Reporter: Tomasz Nowak
            Assignee: Paul King


Consider following code snippet:

def writer = new FileWriter(some_file_path)
def xmll = new StreamingMarkupBuilder().bind {
     root {
          //datarows = quite large chunk of data that I have, structured in rows
          datarows.each { row ->
               datarow() {
                    //6 fields definitions here
               }
          }
     }
writer << XmlUtil.serialize(xmll)

when printing xmll (as in: log.info ... ), the message is correct (i.e. I have 
loooooong xml string with proper data); however, when I check the output file 
of the writer, it is missing a significant part of data (I have, like, around 
first 40% of the datarows, or first <8k characters out of 20k total), and it 
looks as if the buffer ended (but no exception was thrown nor warning) because 
the last record/line looks like this:
<datarowhere>
  <somefield>SOME_DATA_INSIDE</somef




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to