You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2008/02/17 01:32:28 UTC
[jira] Created: (DOXIA-221) Fix ArrayIndexOutOfBoundsException in
XhtmlBaseSink
Fix ArrayIndexOutOfBoundsException in XhtmlBaseSink
---------------------------------------------------
Key: DOXIA-221
URL: http://jira.codehaus.org/browse/DOXIA-221
Project: Maven Doxia
Issue Type: Bug
Components: Module - Xdoc
Affects Versions: 1.0-beta-1
Reporter: Benjamin Bentmann
Attachments: cell-justify.patch
Attempt to render a multi column table using XDoc:
{noformat}
java.lang.ArrayIndexOutOfBoundsException: 1
at org.apache.maven.doxia.sink.XhtmlBaseSink.tableCell(XhtmlBaseSink.java:807)
at org.apache.maven.doxia.sink.XhtmlBaseSink.tableCell(XhtmlBaseSink.java:780)
at org.apache.maven.doxia.sink.XhtmlBaseSink.tableHeaderCell(XhtmlBaseSink.java:768)
at org.apache.maven.doxia.parser.XhtmlBaseParser.baseStartTag(XhtmlBaseParser.java:300)
at org.apache.maven.doxia.module.xdoc.XdocParser.handleStartTag(XdocParser.java:213)
at org.apache.maven.doxia.parser.AbstractXmlParser.parseXml(AbstractXmlParser.java:103)
at org.apache.maven.doxia.parser.AbstractXmlParser.parse(AbstractXmlParser.java:54)
at org.apache.maven.doxia.module.xdoc.XdocParser.parse(XdocParser.java:93)
at org.apache.maven.doxia.DefaultDoxia.parse(DefaultDoxia.java:63)
at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:345)
at org.apache.maven.doxia.siterenderer.DoxiaDocumentRenderer.renderDocument(DoxiaDocumentRenderer.java:46)
at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:272)
at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:102)
at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:137)
at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:96)
{noformat}
The XDocParser/XHtmlBaseParser calls sink.tableRows() always with a single-element array. This is usually not enough to describe all columns of the table individually. Hence, XHtmlBaseSink should be prepared to render a table cell that does not have a corresponding cellJustif entry. The patch simply repeats the justification of the last array element.
Last but not least, it might be worth to consider changing the default cell alignment to left alignment to match the default behavior of HTML for table body cells. Additionally, left-alignment seems to be the current behavior of the xdoc module in the alpha branch.
--
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
[jira] Closed: (DOXIA-221) Fix ArrayIndexOutOfBoundsException in
XhtmlBaseSink
Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/DOXIA-221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukas Theussl closed DOXIA-221.
-------------------------------
Assignee: Lukas Theussl
Resolution: Fixed
Fix Version/s: 1.0-beta-1
Fixed, thanks! Also switched to left default justification in XhtmlBaseParser.
> Fix ArrayIndexOutOfBoundsException in XhtmlBaseSink
> ---------------------------------------------------
>
> Key: DOXIA-221
> URL: http://jira.codehaus.org/browse/DOXIA-221
> Project: Maven Doxia
> Issue Type: Bug
> Components: Module - Xdoc
> Affects Versions: 1.0-beta-1
> Reporter: Benjamin Bentmann
> Assignee: Lukas Theussl
> Fix For: 1.0-beta-1
>
> Attachments: cell-justify.patch
>
>
> Attempt to render a multi column table using XDoc:
> {noformat}
> java.lang.ArrayIndexOutOfBoundsException: 1
> at org.apache.maven.doxia.sink.XhtmlBaseSink.tableCell(XhtmlBaseSink.java:807)
> at org.apache.maven.doxia.sink.XhtmlBaseSink.tableCell(XhtmlBaseSink.java:780)
> at org.apache.maven.doxia.sink.XhtmlBaseSink.tableHeaderCell(XhtmlBaseSink.java:768)
> at org.apache.maven.doxia.parser.XhtmlBaseParser.baseStartTag(XhtmlBaseParser.java:300)
> at org.apache.maven.doxia.module.xdoc.XdocParser.handleStartTag(XdocParser.java:213)
> at org.apache.maven.doxia.parser.AbstractXmlParser.parseXml(AbstractXmlParser.java:103)
> at org.apache.maven.doxia.parser.AbstractXmlParser.parse(AbstractXmlParser.java:54)
> at org.apache.maven.doxia.module.xdoc.XdocParser.parse(XdocParser.java:93)
> at org.apache.maven.doxia.DefaultDoxia.parse(DefaultDoxia.java:63)
> at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:345)
> at org.apache.maven.doxia.siterenderer.DoxiaDocumentRenderer.renderDocument(DoxiaDocumentRenderer.java:46)
> at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:272)
> at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:102)
> at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:137)
> at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:96)
> {noformat}
> The XDocParser/XHtmlBaseParser calls sink.tableRows() always with a single-element array. This is usually not enough to describe all columns of the table individually. Hence, XHtmlBaseSink should be prepared to render a table cell that does not have a corresponding cellJustif entry. The patch simply repeats the justification of the last array element.
> Last but not least, it might be worth to consider changing the default cell alignment to left alignment to match the default behavior of HTML for table body cells. Additionally, left-alignment seems to be the current behavior of the xdoc module in the alpha branch.
--
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