Bug 80597 - [compiler] NPE while reporting array empty dimensions problem
Summary: [compiler] NPE while reporting array empty dimensions problem
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.1 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 85106 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-09 10:27 EST by Frederic Fusier CLA
Modified: 2005-02-13 11:57 EST (History)
1 user (show)

See Also:


Attachments
This patch seems to fix the problem... (825 bytes, patch)
2004-12-09 10:28 EST, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***