Bug 211256 - [ast rewrite] whitespace missing between return and expression
Summary: [ast rewrite] whitespace missing between return and expression
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3.1   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.5 M4   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-28 11:01 EST by Brian Miller CLA
Modified: 2008-12-09 05:53 EST (History)
3 users (show)

See Also:


Attachments
Proposed fix (10.62 KB, patch)
2008-11-05 09:28 EST, David Audel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Miller CLA 2007-11-28 11:01:55 EST
M20070921-1145

Any attempt to extract a constant from the string literal on line 3 fails.  The problem is the absence of optional whitespace between the return keyword and the literal.
-------------------- Bug.java -------------------
class Bug {
	String method(){
		return"A"//LINE 3
		+"B";
	}
}
Comment 1 David Audel CLA 2008-11-05 09:28:43 EST
Created attachment 117082 [details]
Proposed fix
Comment 2 David Audel CLA 2008-11-05 09:30:40 EST
Released for 3.5M4.

Test added
  ASTRewritingStatementsTest#testReturnStatement2()
Comment 3 Srikanth Sankaran CLA 2008-12-09 04:53:27 EST
Verified for 3.5M4 using I20081208-1800 build