Bug 309706

Summary: [formatter] doesn't work when code has three semicolons side by side
Product: [Eclipse Project] JDT Reporter: Larsen Doe <larsen007>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, deepakazad, srikanth_sankaran
Version: 3.6   
Target Milestone: 3.6 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch none

Description Larsen Doe CLA 2010-04-19 12:10:35 EDT
Build Identifier: 3.5.2

Eclipse formatter doesn´t format the code when there is a field ending with three semicolons at the top like this:

public class test {

	private int id;;;

	private void dummy() {

		if (true) {
					System.out.println("bla");
		}
	}
}

I don´t exactly know how the three semicolon where added in my real code, but I guess it could relate to bug 280801.


Reproducible: Always

Steps to Reproduce:
1. Have code as in example
2. Press Ctrl+Shift+F
Comment 1 Dani Megert CLA 2010-04-20 04:14:13 EDT
Indeed. Reproduced using I20100414-1200.
Comment 2 Frederic Fusier CLA 2010-04-20 07:52:23 EDT
Created attachment 165411 [details]
Proposed patch

Just loop to consume any consecutive extra semi-colons between type members...
Comment 3 Frederic Fusier CLA 2010-04-20 07:54:33 EDT
Released for 3.6M7 in HEAD stream.

Note that it will not be in today's integration build (i.e. I20100420-0800) as the fix was released after the v_A45 build input was done...
Comment 4 Srikanth Sankaran CLA 2010-04-27 01:40:40 EDT
Verified for 3.6M7 using build I20100424-2000