Bug 128848

Summary: closing bracket added into comment upon format
Product: [Eclipse Project] JDT Reporter: Ralf Hauser <hauser>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1.1   
Target Milestone: 3.2 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Ralf Hauser CLA 2006-02-21 12:16:08 EST
When I do Ctrl-Shift-F on a class.java that contains an error, often the closing bracket is kind of "swallowed" causing many dependent errors to appear

Before formatting:
<<
     erroneous statement;
     ...
     } //end of last method
}
>> the last "}" being the end of the class

After formatting:
<<
     erroneous statement;
     ...
     } //end of last method}
>>
Comment 1 Markus Keller CLA 2006-02-21 12:40:10 EST
Indeed, here's a standalone example to reproduce in I20060217-1115:

public class Try {
    void m() {
        bug()
    } //end of last method
}
Comment 2 Olivier Thomann CLA 2006-02-27 16:03:45 EST
Fixed and released in HEAD.
Regression tests added in org.eclipse.jdt.core.tests.formatter.FormatterRegressionTests.test614/615/616.
Comment 3 Jerome Lanneluc CLA 2006-03-28 08:13:44 EST
Verified for 3.2 M6 using build I20060328-0010