0xCAB / idocit

Automatically exported from code.google.com/p/idocit
0 stars 0 forks source link

Class or Interface containing generics causes SAXParserException #69

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open an interface or class containing documentation of a member variable or 
return type with type parameters (generics). You could find an example class 
attached to this issue.
2. The iDocIt! editor could not be opened (see stack trace below).

What is the expected output? What do you see instead?
The editor should open normally in the state it had when it has been closed. 
But the editor crashes. In the attached example the problem is the 
documentation of List<Article>:

[COPY]
java.util.List<de.akra.idocit.evaluation.test.common.structure.Article>
[/COPY]

Our SAX Parser treats the angle brackets as XML-Formatting and misses the 
closing element </de.akra.idocit.evaluation.test.common.structure.Article>.

Stacktrace:
org.xml.sax.SAXParseException: The element type 
"de.akra.idocit.evaluation.test.common.structure.Article" must be terminated by 
the matching end-tag 
"</de.akra.idocit.evaluation.test.common.structure.Article>".
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
    at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1749)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2938)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
    at de.akra.idocit.java.services.HTMLTableParser.convertJavadocToDocumentations(HTMLTableParser.java:82)
    at de.akra.idocit.java.services.JavadocParser.parse(JavadocParser.java:80)
    at de.akra.idocit.java.services.JavaInterfaceParser.processMethodDeclaration(JavaInterfaceParser.java:363)
    at de.akra.idocit.java.services.JavaInterfaceParser.processAbstractTypeDeclaration(JavaInterfaceParser.java:322)
    at de.akra.idocit.java.services.JavaInterfaceParser.processTypeDeclaration(JavaInterfaceParser.java:224)
    at de.akra.idocit.java.services.JavaInterfaceParser.processCompilationUnit(JavaInterfaceParser.java:188)
    at de.akra.idocit.java.services.JavaInterfaceParser.parse(JavaInterfaceParser.java:141)
    at de.akra.idocit.java.services.JavaParser.parse(JavaParser.java:107)
    at de.akra.idocit.core.services.PersistenceService.loadInterface(PersistenceService.java:125)
    at de.akra.idocit.ui.components.DocumentationEditor.init(DocumentationEditor.java:208)
    at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:828)
    at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
    at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
    at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
    at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2945)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
    at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
    at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
    at org.eclipse.ui.actions.OpenWithMenu.openEditor(OpenWithMenu.java:331)
    at org.eclipse.ui.actions.OpenWithMenu$3.handleEvent(OpenWithMenu.java:215)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4125)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3971)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3610)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

Original issue reported on code.google.com by krauseda...@web.de on 18 Oct 2011 at 6:16

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by krauseda...@web.de on 18 Oct 2011 at 7:53

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r372.

Original comment by krauseda...@web.de on 18 Oct 2011 at 11:48