Bug 345429 - Doc should be updated for org.eclipse.jdt.ui.SharedASTProvider.getAST(ITypeRoot, WAIT_FLAG, IProgressMonitor)
Summary: Doc should be updated for org.eclipse.jdt.ui.SharedASTProvider.getAST(ITypeRo...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 trivial (vote)
Target Milestone: 3.7 RC1   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords: Documentation
Depends on:
Blocks:
 
Reported: 2011-05-11 10:28 EDT by Olivier Thomann CLA
Modified: 2011-05-16 06:17 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2011-05-11 10:28:23 EDT
This method can return null if the operation is canceled. This is not clearly specified right now.
Comment 1 Dani Megert CLA 2011-05-11 10:32:29 EDT
(In reply to comment #0)
> This method can return null if the operation is canceled. This is not clearly
> specified right now.

It specifies that 'null' can be returned. What is the other thing that you would expect to get back if you cancel the operation?
Comment 2 Olivier Thomann CLA 2011-05-11 10:37:27 EDT
When WAIT_YES is specified, I don't see null as a possible return value.
Comment 3 Dani Megert CLA 2011-05-11 10:45:22 EDT
(In reply to comment #2)
> When WAIT_YES is specified, I don't see null as a possible return value.

Right, but cancel isn't mentioned in any of the cases explicitly. But again: what would you expect if it gets canceled?

Anyway, I've added an additional blurb so that it's crystal clear.
Comment 4 Dani Megert CLA 2011-05-11 10:45:37 EDT
.
Comment 5 Olivier Thomann CLA 2011-05-11 10:55:47 EDT
(In reply to comment #3)
> Right, but cancel isn't mentioned in any of the cases explicitly. But again:
> what would you expect if it gets canceled?
> Anyway, I've added an additional blurb so that it's crystal clear.
I would expect null, but I think this should be mentioned in the doc.

Also check all callers of this method, I found a couple of places where null is not handled.
Comment 6 Dani Megert CLA 2011-05-16 06:17:25 EDT
Verified in I20110512-2000 that the Javadoc mentions the cancel case.