Bug 339226

Summary: Document assumptions about DefaultBindingResolver.newAstToOldAst
Product: [Eclipse Project] JDT Reporter: Stephan Herrmann <stephan.herrmann>
Component: CoreAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: Olivier_Thomann, srikanth_sankaran
Version: 3.7   
Target Milestone: 3.7 M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
proposed documentation none

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.