Bug 51300 - VerifyError when using a array reference assigned to null
Summary: VerifyError when using a array reference assigned to null
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M7   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-06 13:13 EST by Olivier Thomann CLA
Modified: 2004-02-12 05:46 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2004-02-06 13:13:25 EST
Using latest, the following code leads to a VerifyError, because of a missing
checkcast.
public class X {
    public static void main(String[] args) {
			try {
				((int[]) null)[0] = 0;
				((int[]) null)[0] += 1;
				((int[]) null)[0] ++;
			} catch (NullPointerException e) {
				System.out.print("SUCCESS");
			}
	}
}
Comment 1 Olivier Thomann CLA 2004-02-06 13:16:59 EST
Fixed and released in HEAD.
Regression tests added.
Comment 2 Philipe Mulet CLA 2004-02-06 14:38:07 EST
Problem was related to previous bug 26903
Comment 3 David Audel CLA 2004-02-12 05:46:34 EST
Verified for 3.0M7