Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 474215

Summary: [formatter] Unicode character in comment deletes following line break
Product: [Eclipse Project] JDT Reporter: Friederike Jolk <Friederike.Jolk>
Component: CoreAssignee: Mateusz Matela <mateusz.matela>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: mateusz.matela
Version: 4.5   
Target Milestone: 4.5.1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
small Java code example none

Description Friederike Jolk CLA 2015-08-04 05:58:15 EDT
Created attachment 255613 [details]
small Java code example

When a comment contains a Unicode character (e.g. in a commented code line printing German strings with umlauts), formatting the source code results in the deletion of the following line break - which is rather unfortunate, if the following line happens to be an (uncommented) code line.
(A following empty line prevents the line break deletion after the comment.)

Formatting the attached Java file results in this new comment line:
// comment with unicode character \u1234 int j = 0;
Comment 1 Mateusz Matela CLA 2015-08-17 15:57:26 EDT

*** This bug has been marked as a duplicate of bug 471090 ***