Bug 128848 - closing bracket added into comment upon format
Summary: closing bracket added into comment upon format
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-21 12:16 EST by Ralf Hauser CLA
Modified: 2006-03-28 08:13 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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