Bug 7584

Summary: Comments on IDOMMethod#getReturnType()
Product: [Eclipse Project] JDT Reporter: Jed Anderson <jed.anderson>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: philippe_mulet
Version: 2.0   
Target Milestone: 2.0 M2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Jed Anderson CLA 2002-01-14 17:55:02 EST
The IDOMMethod#getReturnType() method comment states:

<pre>
/**
 * Returns the return type name, or <code>"void"</code>. 
 * Returns <code>"void"</code> for constructors.
 * The syntax for return type name corresponds to ReturnType in 
 * MethodDeclaration (JLS2 8.4). Names are returned as they appear in the source
 * code; for example: <code>"File"</code>, <code>"java.io.File"</code>,
 * <code>"int[]"</code>, or <code>"void"</code>.
 *
 * @return the return type
 */</pre>

Unfortunately, the model does not return "void" for constructors, it returns
null.  Either the model should be changed to return "void" or the comment should
be changed to indicate that the model returns null for constructors.
Comment 1 Jed Anderson CLA 2002-01-14 17:55:58 EST
Please ignore the <pre></pre> tags.  I added them because I was worried the HTML
would change how the Javadoc read.
Comment 2 Philipe Mulet CLA 2002-01-15 07:21:57 EST
Shoud document the null case. 
Comment 3 Olivier Thomann CLA 2002-01-15 12:31:02 EST
I changed the java doc to be:
/**
 * Returns the return type name, or <code>null</code>. 
 * Returns <code>null</code> for constructors.
 * The syntax for return type name corresponds to ReturnType in 
 * MethodDeclaration (JLS2 8.4). Names are returned as they appear in the source
 * code; for example: <code>"File"</code>, <code>"java.io.File"</code>,
 * <code>"int[]"</code>, or <code>"void"</code>.
 *
 * @return the return type
 */

Looks good enough to me. Let me know if you want to release this version.
Comment 4 Olivier Thomann CLA 2002-01-16 17:44:31 EST
Released in HEAD.