[ 
http://jira.codehaus.org/browse/MCHANGES-66?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Bentmann updated MCHANGES-66:
--------------------------------------

    Attachment: changes-report.html

Well, I tried 2.0-beta-3 as well as the current 2.0-beta-4-SNAPSHOT (build from 
source r611604), both embedded newlines as I expected. I attached the generated 
changes-report.html just that you can get a feel of it.

I previously tried to point out that the plugin currently misuses the SAX API 
(i.e. makes invalid assumptions about the parser callbacks). Please, consider 
the implications of the following quotation from the already mentioned "Top Ten 
SAX2 Tips":
bq. It'd be *legal* (but annoying) for the parser to report *one character per 
callback*
Also, see the final note in the paragraph "Handling events" from the [SAX 
Quickstart|http://www.saxproject.org/quickstart.html] or the related question 
in the [SAX FAQ|http://www.saxproject.org/faq.html]. The issue of unwanted 
newlines may be hard to reproduce but it is there.

Just for the fun of it, I extended the changes.xml to contain a really long 
line (only alphanum's so the browser won't wrap). In the resulting HTML output, 
I get a line break every 2048 characters...  if I only had some money, I would 
bet this is the size of the parser's character buffer ;-) Dennis, maybe you can 
also reproduce this issue by yourself if you try a changes.xml with at least 8 
KB or 16 KB character data in a line.

Apropos parsing: What happened to the efforcts in MCHANGES-47 to bring Modello 
into the game? If I understand Modello correctly, it frees the plugin developer 
from parsing, thereby reducing the chance for errors like this.


> The changes plugin scatters white space over its Changes report
> ---------------------------------------------------------------
>
>                 Key: MCHANGES-66
>                 URL: http://jira.codehaus.org/browse/MCHANGES-66
>             Project: Maven 2.x Changes Plugin
>          Issue Type: Bug
>          Components: changes-report
>            Reporter: Henning Schmiedehausen
>            Assignee: Dennis Lundberg
>         Attachments: changes-report.html, changes.xml, changes4.patch, 
> changes7.patch, MCHANGES-66.zip, sax-parsing.patch
>
>
> The changelog plugin reads the contents of the changes.xml file and scatters 
> \n characters into it. The attached patch fixes this and also improves 
> performance by using a string buffer.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to