Bug 108622 - [javadoc][dom] ASTNode not including javadoc
Summary: [javadoc][dom] ASTNode not including javadoc
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.1.2   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 108639 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-01 15:22 EDT by Kapil Katyal CLA
Modified: 2006-01-10 06:04 EST (History)
5 users (show)

See Also:


Attachments
Patch to fix this issue (1.99 KB, patch)
2005-09-12 12:57 EDT, Frederic Fusier CLA
no flags Details | Diff
Test case added to ASTConverterJavadocTest (4.48 KB, patch)
2005-09-12 12:59 EDT, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kapil Katyal CLA 2005-09-01 15:22:35 EDT
We're seeing a problem trying to create an ASTNode where the ASTNode does not 
include the javadoc for methods that have an unresolvable return type or 
parameter type.

I have sent a test case to Olivier_Thomann@ca.ibm.com.  Please let me know if 
you need any thing else.

Thanks,
Kapil
Comment 1 Olivier Thomann CLA 2005-09-01 15:40:10 EDT
Reproduced. I am investigating.
Comment 2 Olivier Thomann CLA 2005-09-01 15:45:56 EDT
Simple test case:

/**
 * 
 */
public abstract class X {
    
    /**
    *
    */
    public abstract Zork getFoo();
    /**  */
    public abstract void setFoo(Zork dept);

}

If bindings are requested, the two methods don't have javadoc. If no bindings
are requested, they do have javadoc.
I am investigating. Javadoc should always be there. The binding might be null
when the signature of the method cannot be resolved, but there is no reason why
the javadoc is not there.
Comment 3 Olivier Thomann CLA 2005-09-01 17:28:50 EDT
*** Bug 108639 has been marked as a duplicate of this bug. ***
Comment 4 Frederic Fusier CLA 2005-09-02 02:02:49 EDT
Olivier, this is a side effect of fix for bug 84049. We have to talk with Martin
to find an agreement on ASTConverter behavior in this case...
Comment 5 Olivier Thomann CLA 2005-09-05 07:47:52 EDT
The javadoc should always be set. It is a syntactical element.
The tree should be consistent when bindings are requested or not.
Comment 6 Frederic Fusier CLA 2005-09-05 08:41:52 EDT
Martin,
If I put back Javadoc in this case this would break fix for bug 84049.
I'd like to have your feedback about it before...
Comment 7 Martin Aeschlimann CLA 2005-09-11 15:26:40 EDT
I commented in bug 84049. The fix for bug 84049 should not simply remove the
Javadoc node.
Comment 8 Frederic Fusier CLA 2005-09-12 04:32:15 EDT
Fix is simple and safe: just remove bug 84049 fix...
Comment 9 Frederic Fusier CLA 2005-09-12 04:32:57 EDT
I think it's a good candidate for 3.1.1
Comment 10 Frederic Fusier CLA 2005-09-12 12:57:43 EDT
Created attachment 27034 [details]
Patch to fix this issue

Just put back code before bug 84049 fix. This does not have any impact on
JDT/UI tests...
Comment 11 Frederic Fusier CLA 2005-09-12 12:59:32 EDT
Created attachment 27035 [details]
Test case added to ASTConverterJavadocTest

Note that test for bug 84049 was not disabled but I've added assertions and
commented them instead...
This allow to verify that even for this test case, javadoc comment is well put
back on method declaration.
Comment 12 Frederic Fusier CLA 2005-09-12 13:03:26 EDT
Patches released in HEAD.
Comment 13 Olivier Thomann CLA 2005-09-20 11:35:46 EDT
Verified in I20050920-0010 for 3.2M2
Comment 14 Kapil Katyal CLA 2005-12-13 11:24:35 EST
verified this is fixed
Comment 15 Philipe Mulet CLA 2006-01-09 11:08:04 EST
+1 for 3.1.2 (philippe)
Comment 16 Frederic Fusier CLA 2006-01-09 11:31:51 EST
Reopen to put it in R3_1_maintenance stream
Comment 17 Frederic Fusier CLA 2006-01-10 04:29:37 EST
Fix released in R3_1_maintenance stream
Comment 18 Maxime Daniel CLA 2006-01-10 05:53:36 EST
Verified for 3.1.2 using build M20060109-1200.
Comment 19 Frederic Fusier CLA 2006-01-10 06:04:05 EST
Verified for 3.1.2 using build M20060109-1200 (maxime)