Bug 7584 - Comments on IDOMMethod#getReturnType()
Summary: Comments on IDOMMethod#getReturnType()
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 normal (vote)
Target Milestone: 2.0 M2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-14 17:55 EST by Jed Anderson CLA
Modified: 2002-01-16 17:44 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.