Bug 31626 - getJavadoc() on TypeDeclaration returning incorrect comment
Summary: getJavadoc() on TypeDeclaration returning incorrect comment
Status: RESOLVED DUPLICATE of bug 23054
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0.2   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: 2.0.2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-11 22:20 EST by David Schneider CLA
Modified: 2003-02-28 12:47 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Schneider CLA 2003-02-11 22:20:59 EST
If I call the getJavadoc() method on a org.eclipse.jdt.core.dom.TypeDeclaration 
instance that does not have a Javadoc comment I don't get a null value back as 
indicated in the Javadoc for getJavadoc().  Instead I get the Javadoc for the 
first method within the type that has a Javadoc comment.

For example, if I have the following code:

public class Foo
{
    /**
     * Method comment.
     */
    public voif bar() {}
}

When I call getJavadoc() for class Foo I get back the comment "Method comment."
Comment 1 David Schneider CLA 2003-02-11 23:11:07 EST
I just tested this same code with the v2.1 M% build and the bug appears to have 
been corrected in this build.
Comment 2 David Schneider CLA 2003-02-11 23:15:23 EST
That should have been "M5", not "M%"
Comment 3 Philipe Mulet CLA 2003-02-12 05:00:37 EST
Good, closing then.
Comment 4 David Schneider CLA 2003-02-13 22:16:40 EST
I don't think this bug should be closed.  Eclipse v2.1 is not released yet and 
many products based on Eclipse will not be able to upgrade to 2.1 for some time 
yet.  They will based on 2.0.x for the foreseeable future.  This bug prevents a 
plug-in I'm working on from working at all.  If this bug is not fixed in the 
2.0.x maintenance stream my plug-in will not work.
Comment 5 Philipe Mulet CLA 2003-02-14 06:14:21 EST
Understood. It did not sound clear you actually wanted this fix for a 2.0.x 
codebase. 

Will see how it goes for addressing in a future release based on 2.0.x (too 
late for 2.0.3).
Comment 6 Philipe Mulet CLA 2003-02-15 05:05:42 EST
Can you backport this change to R2.0 dev stream ?
Comment 7 Olivier Thomann CLA 2003-02-28 12:47:07 EST
Duplicate of bug 23054. Backported to R2.0 dev stream.
Regression test added in R2.0 dev stream.

*** This bug has been marked as a duplicate of 23054 ***