Bug 101247 - [formatter] Fails to format some labelled statements
Summary: [formatter] Fails to format some labelled statements
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 101616 103005 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-22 10:07 EDT by Olivier Thomann CLA
Modified: 2005-09-26 11:57 EDT (History)
3 users (show)

See Also:


Attachments
Proposed fix (1.04 KB, patch)
2005-06-22 10:11 EDT, Olivier Thomann CLA
no flags Details | Diff
Corresponding regression test (3.19 KB, patch)
2005-06-22 10:11 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2005-06-22 10:07:51 EDT
Using N0622, the code formatter fails to format the following code.

public class X {
  public static void main(String[] args) {
    if(true) throw new RuntimeException("X");
    X: System.out.println("X");
  }
}
Comment 1 Olivier Thomann CLA 2005-06-22 10:11:20 EDT
Created attachment 23729 [details]
Proposed fix

Apply on HEAD
Comment 2 Olivier Thomann CLA 2005-06-22 10:11:37 EDT
Created attachment 23730 [details]
Corresponding regression test
Comment 3 Philipe Mulet CLA 2005-06-22 10:37:02 EDT
Good candidate for 3.1.1
Comment 4 Olivier Thomann CLA 2005-06-24 07:43:35 EDT
*** Bug 101616 has been marked as a duplicate of this bug. ***
Comment 5 Olivier Thomann CLA 2005-06-29 09:09:20 EDT
Fixed and released in 3.1 maintenance stream.
Regression test added in
org.eclipse.jdt.core.tests.formatter.FormatterRegressionTests.test588
Comment 6 Richard Phillips CLA 2005-07-12 04:01:59 EDT
*** Bug 103005 has been marked as a duplicate of this bug. ***
Comment 7 Jerome Lanneluc CLA 2005-08-11 10:04:50 EDT
Verified with 3.2 M1
Comment 8 Maxime Daniel CLA 2005-09-26 11:57:05 EDT
Verified for 3.1.1 using build M20050923-1430.
Comment 9 Olivier Thomann CLA 2005-09-26 11:57:34 EDT
Verified.