[daisy] [JIRA] Updated: (DSY-587) IndexOutOfBoundsException in diff
code
Karel Vervaeke (JIRA)
issues at cocoondev.org
Mon Dec 3 07:03:50 CST 2007
[ http://issues.cocoondev.org//browse/DSY-587?page=all ]
Karel Vervaeke updated DSY-587:
-------------------------------
Attachment: compare-bug.txt
Added a patch that exposes the bug. Go to services/diff and run "maven test"
> IndexOutOfBoundsException in diff code
> --------------------------------------
>
> Key: DSY-587
> URL: http://issues.cocoondev.org//browse/DSY-587
> Project: Daisy
> Type: Bug
> Components: Frontend (wiki)
> Versions: 2.1
> Reporter: Karel Vervaeke
> Priority: Minor
> Attachments: compare-bug.txt
>
> In some cases, when creating a diff report, the repository throws an exception (stacktrace at the bottom)
> Compare two documents with a html part. In the first version the html part contains formatted html (with newlines), in the second version
> it does not contain newlines (this can not be done via the wiki because the html cleaner adds newlines).
> For quickly repoducing it, create two versions of a SimpleDocumentPart. Go to the blobstore and edit the blob of the second version so it contains
> "<html><body>hello</body></html>" (no whitespace between tags). Then go to http://.../daisy/site/[your document]/version/1/diff?otherVersion=2
> (A patch for exposing the bug will be attached; after applying it, go to services/diff and run "maven test")
> Message: Index: 1, Size: 1
> Class: java.lang.IndexOutOfBoundsException
> Stacktrace:
> ATTENTION: this is the stacktrace of an exception that happened on the repository server.
> java.util.ArrayList.RangeCheck (ArrayList.java:546)
> java.util.ArrayList.get (ArrayList.java:321)
> org.outerj.daisy.diff.html.dom.Node.getLastCommonParent (Node.java:86)
> org.outerj.daisy.diff.html.TextNodeComparator.markAsDeleted (TextNodeComparator.java:244)
> org.outerj.daisy.diff.html.HTMLDiffer.diff (HTMLDiffer.java:61)
> org.outerj.daisy.diff.Diff.diffHTML (Diff.java:63)
> org.outerj.daisy.publisher.serverimpl.XmlDocDiffOutput.partUpdated (XmlDocDiffOutput.java:183)
> org.outerj.daisy.docdiff.DiffGenerator.generatePartDifferences (DiffGenerator.java:132)
> org.outerj.daisy.docdiff.DiffGenerator.generateDiff (DiffGenerator.java:52)
> org.outerj.daisy.docdiff.DiffGenerator.generateDiff (DiffGenerator.java:36)
> org.outerj.daisy.publisher.serverimpl.requestmodel.DiffRequest.processInt (DiffRequest.java:79)
> org.outerj.daisy.publisher.serverimpl.requestmodel.AbstractRequest.process (AbstractRequest.java:34)
> org.outerj.daisy.publisher.serverimpl.requestmodel.AbstractParentPublisherRequest.processInt (AbstractParentPublisherRequest.java:36)
> org.outerj.daisy.publisher.serverimpl.requestmodel.DocumentRequest.emitDocument (DocumentRequest.java:100)
> org.outerj.daisy.publisher.serverimpl.requestmodel.DocumentRequest.processInt (DocumentRequest.java:81)
> org.outerj.daisy.publisher.serverimpl.requestmodel.AbstractRequest.process (AbstractRequest.java:34)
> org.outerj.daisy.publisher.serverimpl.requestmodel.AbstractParentPublisherRequest.processInt (AbstractParentPublisherRequest.java:36)
> org.outerj.daisy.publisher.serverimpl.requestmodel.PublisherRequest.processInt (PublisherRequest.java:62)
> org.outerj.daisy.publisher.serverimpl.requestmodel.AbstractRequest.process (AbstractRequest.java:34)
> org.outerj.daisy.publisher.serverimpl.PublisherImpl.executePublisherRequest (PublisherImpl.java:110)
> org.outerj.daisy.publisher.serverimpl.PublisherImpl.processRequest (PublisherImpl.java:80)
> org.outerj.daisy.publisher.serverimpl.httphandlers.PubRequestHandler.handleRequest (PubRequestHandler.java:41)
> org.outerj.daisy.httpconnector.HttpConnector$PathHandler.handle (HttpConnector.java:338)
> org.outerj.daisy.httpconnector.HttpConnector$DaisyServlet.service (HttpConnector.java:282)
> javax.servlet.http.HttpServlet.service (HttpServlet.java:802)
> org.mortbay.jetty.servlet.ServletHolder.handle (ServletHolder.java:487)
> org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:367)
> org.mortbay.jetty.security.SecurityHandler.handle (SecurityHandler.java:216)
> org.mortbay.jetty.handler.ContextHandler.handle (ContextHandler.java:712)
> org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:139)
> org.mortbay.jetty.Server.handle (Server.java:285)
> org.mortbay.jetty.HttpConnection.handleRequest (HttpConnection.java:502)
> org.mortbay.jetty.HttpConnection$RequestHandler.content (HttpConnection.java:835)
> org.mortbay.jetty.HttpParser.parseNext (HttpParser.java:641)
> org.mortbay.jetty.HttpParser.parseAvailable (HttpParser.java:208)
> org.mortbay.jetty.HttpConnection.handle (HttpConnection.java:378)
> org.mortbay.io.nio.SelectChannelEndPoint.run (SelectChannelEndPoint.java:368)
> org.mortbay.thread.BoundedThreadPool$PoolThread.run (BoundedThreadPool.java:442)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the daisy
mailing list