Bug 101247

Summary: [formatter] Fails to format some labelled statements
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: maxime_daniel, mlists, rp
Version: 3.1   
Target Milestone: 3.1.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix
none
Corresponding regression test none

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.