Bug 339226 - Document assumptions about DefaultBindingResolver.newAstToOldAst
Summary: Document assumptions about DefaultBindingResolver.newAstToOldAst
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-08 09:37 EST by Stephan Herrmann CLA
Modified: 2011-04-27 01:34 EDT (History)
2 users (show)

See Also:


Attachments
proposed documentation (1.85 KB, patch)
2011-04-19 16:16 EDT, Stephan Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2011-03-08 09:37:14 EST
Fup of bug 337964:
While verifying said bug I was puzzled about this asymmetry
line 1525:
  type.isArrayType() implies (typeBinding instanceof ArrayBinding)
but line 1569:
  !type.isArrayType() does not imply !binding.isArrayType()

This is because methods like ASTConverter.completeRecord(..) associate
smaller DOM nodes (e.g., SimpleName "Object") with larger compiler nodes
(e.g., ArrayAllocationExpression "new Object[10]").

A code comment making such tacit knowledge explicit might help to draw the 
line between paranoia and required checks.
Comment 1 Olivier Thomann CLA 2011-04-19 14:57:07 EDT
Setting as 3.7RC1. This is not an emergency for M7.
Comment 2 Stephan Herrmann CLA 2011-04-19 16:16:42 EDT
Created attachment 193619 [details]
proposed documentation

Right when you marked this as 3.7RC1 I was drafting a few comments,
capturing my current understanding :)
Comment 3 Stephan Herrmann CLA 2011-04-25 19:00:31 EDT
Released for 3.7M7.
(no code change - just a small addition to code comments).
Comment 4 Olivier Thomann CLA 2011-04-26 10:14:19 EDT
Will be verified once a build with v_B51 is available.
Comment 5 Srikanth Sankaran CLA 2011-04-27 01:34:29 EDT
I verified this by code inspection, as all this involes is
a documentation change in a non-public class. There is no
user visible behavior associated with this bug.