Bug 80597

Summary: [compiler] NPE while reporting array empty dimensions problem
Product: [Eclipse Project] JDT Reporter: Frederic Fusier <frederic_fusier>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: eclipse
Version: 3.1   
Target Milestone: 3.1 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
This patch seems to fix the problem... none

Description Frederic Fusier CLA 2004-12-09 10:27:31 EST
Using HEAD.

With following test case:
public class X {
	void foo() {
		char[][][] array = new char[][][10];
	}

}
I get an NPE in ProblemReporter.incorrectLocationForEmptyDimension() and
uncloseable Error dialog: "Problem during AST creation"...

I know this invalid but after having writing this and save file, I'm completely
unable to use it due to the error dialog always opening...

Close/open file has no effect (of course). I was obliged to modify the file
using notepad to remve the invalid code => set severity to critical
Comment 1 Frederic Fusier CLA 2004-12-09 10:28:54 EST
Created attachment 16493 [details]
This patch seems to fix the problem...
Comment 2 Olivier Thomann CLA 2004-12-09 11:21:13 EST
Patch is not optimal. I am working on it.
Thanks for providing a good test case.
Comment 3 Olivier Thomann CLA 2004-12-09 13:26:27 EST
Fixed and released in HEAD.
Regression test added in ArrayTest.
Comment 4 Frederic Fusier CLA 2004-12-15 12:38:53 EST
Verified for 3.1 M4 using build I200412142000.
Comment 5 Olivier Thomann CLA 2005-02-13 11:57:33 EST
*** Bug 85106 has been marked as a duplicate of this bug. ***