Bug 79098 - [dom] [1.5] EnhancedForStatement#resolveBinding() is superfluous
Summary: [dom] [1.5] EnhancedForStatement#resolveBinding() is superfluous
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.1 M4   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-19 13:57 EST by Jim des Rivieres CLA
Modified: 2004-12-14 23:05 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 Jim des Rivieres CLA 2004-11-19 13:57:57 EST
EnhancedForStatement declares a method 
  public IVariableBinding resolveBinding();

This API method is out of character for statement nodes, which don't generally
have bindings at all. It's not clear why it was added in the first place.
The method is certainly superfluous; clients can simply call
  EnhancedForStatement.getParameter().resolveBinding()

The EnhancedForStatement is one of the node types that is new for JLS3. This 
API method was introduced back in 3.0, but has never been implemented 
correctly (it has always returned null).

We should delete this method from the API before 3.1 ships.
Comment 1 Jim des Rivieres CLA 2004-11-19 14:16:23 EST
Deprecated method. Added TODO to remove post 3.1M4. Updated build notes.
Comment 2 Olivier Thomann CLA 2004-12-14 23:05:14 EST
Verified in 200412140800