Closed eclipse-modisco-bot closed 2 hours ago
By Fabien Giquel on Sep 13, 2010 08:30
Created attachment 178739 Stack trace
:notepad_spiral: stackTrace.txt
By Fabien Giquel on Oct 04, 2010 12:31
A similar issue with javadoc occurs when invoking "java discoverer" on MoDisco "oegm.java.discoverer" sources project.
By Gregoire Dupe on Oct 06, 2010 10:09
Moving to P1 because this blocks the java discoverer usage.
By Nicolas Bros on Oct 18, 2010 06:43
I think I have found the reason for this bug.
The comment is attached to an element, but then later removed by this statement in CommentsManager#jdtLocationSearch:
// we have to clear javadoc comments that have been already\ // linked to the element\ element.getComments().clear();
I don't understand the reason for this statement. Could someone with more knowledge on the Java discoverer investigate this?
By Nicolas Bros on Oct 18, 2010 08:33
Created attachment 181088 patch
Anyway, here is a patch that fixes the problem, by removing only javadoc comments as the comment suggests, and putting back removed comments in the unhandled comments list.
:notepad_spiral: Bug 325108.patch
By Fabien Giquel on Oct 18, 2010 10:03
Looking back to the code, i remember that javadoc instances are already attached in JdtVisitor to elements before CommentsManager invocation, and i understand that they may need some relocalization -> remove from elements and putting them in localCommentList seems logical.\ I agree with the patch.
By Nicolas Bros on Oct 18, 2010 10:27
Thank you for your review.
I committed the patch in revision 3333.
By Nicolas Bros on Oct 19, 2010 04:19
A test failed with this modification. I removed the "localCommentList.add(javadoc);" and it passes all the tests.
I also added a test for this bug.
By Hugo Bruneliere on Oct 21, 2010 05:11
The patch has been successfully integrated.
| --- | --- | | Bugzilla Link | 325108 | | Status | CLOSED FIXED | | Importance | P1 normal | | Reported | Sep 13, 2010 08:29 EDT | | Modified | Oct 21, 2010 05:11 EDT | | Version | 0.9.0 | | Reporter | Fabien Giquel |
Description
Created attachment 178738\ Related code
Applying the Java discoverer on attached class source leads up to a non attached EObject exception when saving to XMI.
:notepad_spiral: BugNonAttachedComment.java