| Summary: | open task from svn history throws npe | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Andreas Höhmann <andreas.hoehmann> | ||||||||||||||||
| Component: | Mylyn | Assignee: | Frank Becker <eclipse> | ||||||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||||||||
| Severity: | normal | ||||||||||||||||||
| Priority: | P3 | CC: | eclipse, robert.elves, steffen.pingel | ||||||||||||||||
| Version: | 3.4 | ||||||||||||||||||
| Target Milestone: | 3.4.2 | ||||||||||||||||||
| Hardware: | PC | ||||||||||||||||||
| OS: | Windows XP | ||||||||||||||||||
| Whiteboard: | |||||||||||||||||||
| Attachments: |
|
||||||||||||||||||
Thanks Andreas. From a quick glance I can't tell why this would be happening. We'll need to investigate further. Frank, Rob, could you take a look? Created attachment 176087 [details]
patch V1
Fix for the wrong URL returned from getUrlFromComment()
Created attachment 176088 [details]
mylyn/context/zip
Patch is now in HEAD. Should we do a backport for 3.4.2? > Should we do a backport for 3.4.2?
Makes sense. Can you add a test case that triggers the bug?
Created attachment 176725 [details]
patch V2
commited junit test
Created attachment 176726 [details]
mylyn/context/zip
Frank, the most recent commit caused a compile error: BugzillaStatus_suspiciousAction cannot be resolved or is not a field BugzillaStatus.java /org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core line 85 Java Problem Can you take a look? The fix looks okay to me but I still don't quite understand why the NPE was happening in the Bugzilla connector. I assume the sax parser did not detect that the Bugzilla response was not actually the XML output for a task but was parsing something else? Doesn't this case need to be handled in SaxMultiBugReportContentHandler in addition to the committed fix? Created attachment 176839 [details]
patch V3
correction BugzillaStatus was commited by mistake (wrong changeset)
Created attachment 176840 [details]
mylyn/context/zip
(In reply to comment #9) > The fix looks okay to me but I still don't quite understand why the NPE was > happening in the Bugzilla connector. I assume the sax parser did not detect that > the Bugzilla response was not actually the XML output for a task but was parsing > something else? Doesn't this case need to be handled in > SaxMultiBugReportContentHandler in addition to the committed fix? No we get the URL from the comment and only test for space so if an comment was in the form <url>\n- we get the extra char after the url. Created attachment 176860 [details]
backported patch
(In reply to comment #12) > (In reply to comment #9) > > The fix looks okay to me but I still don't quite understand why the NPE was > > happening in the Bugzilla connector. I assume the sax parser did not detect > that > > the Bugzilla response was not actually the XML output for a task but was > parsing > > something else? Doesn't this case need to be handled in > > SaxMultiBugReportContentHandler in addition to the committed fix? > > No we get the URL from the comment and only test for space so if an comment was > in the form > > <url>\n- we get the extra char after the url. I am still concerned that we are only fixing part of the problem here and SaxMultiBugReportContentHandler should never get into a state where it throws an NPE but I'll leave it up to you and Rob to judge if further action needs to be taken. Please feel free to close if we are done here. I have applied the patches to the e_3_4_m_3_x branch. Let's mark this resolved. |
I use function "open corresponding task" Our svn commit template is this: ---- [fix] ${connector.task.prefix} ${task.id} "${task.description}" - Link : ${task.url} ---- for example: ---- [fix] bug 1176 "[cr-3][2.9c] Migrate SoftwareVariantIndex to HotfixIndex / Codereview" - Link : https://bugzilla.foobar.de/show_bug.cgi?id=1176 - add test for SoftwareVariantDao.findByComplexData(String, String, SoftwareProduct) ---- stacktrace: java.lang.NullPointerException at org.eclipse.mylyn.internal.bugzilla.core.SaxMultiBugReportContentHandler.endElement(SaxMultiBugReportContentHandler.java:490) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601) at com.sun.org.apache.xerces.internal.impl.dtd.XMLNSDTDValidator.endNamespaceScope(XMLNSDTDValidator.java:263) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:2028) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:901) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1774) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2930) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807) 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:107) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at org.eclipse.mylyn.internal.bugzilla.core.AbstractReportFactory.collectResults(AbstractReportFactory.java:123) at org.eclipse.mylyn.internal.bugzilla.core.MultiBugReportFactory.populateReport(MultiBugReportFactory.java:48) at org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient.getTaskData(BugzillaClient.java:1867) at org.eclipse.mylyn.internal.bugzilla.core.BugzillaTaskDataHandler.getMultiTaskData(BugzillaTaskDataHandler.java:329) at org.eclipse.mylyn.internal.bugzilla.core.BugzillaTaskDataHandler.getTaskData(BugzillaTaskDataHandler.java:259) at org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector.getTaskData(BugzillaRepositoryConnector.java:524) at org.eclipse.mylyn.internal.tasks.ui.OpenRepositoryTaskJob.run(OpenRepositoryTaskJob.java:110) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)