Bug 98139

Summary: Java Code Formatter is severely confused by following code
Product: [Eclipse Project] JDT Reporter: Bruce Hodge <bruce>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bruce
Version: 3.0.2   
Target Milestone: 3.1 RC2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Bruce Hodge CLA 2005-06-02 12:33:25 EDT
The formatter refuses to format the foo() method in the example below.  In
general the formatter will appear to be disabled (for the entire file) when a
file contains any usage of static inner classes.

public class Foo {

	static class Point {	
		static class Float{
			float x;
			float y;
		}
	}

	//	formatter bug
	
		// change "Point.Float pts[]" to "Point pts[]" and foo() formats correctly
		void foo(Point.Float pts[]) {
			int bar = 0;int jay = 1;for (int i = 0; i < 5;);}
}
Comment 1 Olivier Thomann CLA 2005-06-02 13:07:21 EDT
I am investigating.
Comment 2 Bruce Hodge CLA 2005-06-02 13:23:53 EDT
Bug is present in 3.1RC1.  Bug is not present in 2.1.
Comment 3 Philipe Mulet CLA 2005-06-02 15:54:51 EDT
+1 for RC2
Comment 4 Olivier Thomann CLA 2005-06-02 15:56:46 EDT
Fixed and released in HEAD.
Regression tests added in
org.eclipse.jdt.core.tests.formatter.FormatterRegressionTests.test579/580
Comment 5 Frederic Fusier CLA 2005-06-07 12:09:25 EDT
Verified for 3.1 RC2 using build N20050607-0010 + JDT/Core HEAD
Comment 6 David Audel CLA 2005-06-10 10:08:23 EDT
Verified for 3.1 RC2 using build I20050610-0010