Bug 3409 - JCK 1.4 - STMT - null literal in throw statement (1GK7MEQ)
Summary: JCK 1.4 - STMT - null literal in throw statement (1GK7MEQ)
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M2   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:54 EDT by Olivier Thomann CLA
Modified: 2002-01-11 08:56 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 2001-10-10 22:54:39 EDT
http://www.ott.oti.com/uvm/OTIIBM/numbat/Testing/JCK-
14/tests/lang/STMT/stmt100/stmt10003/stmt10003.html - POSITIVE TEST
Test case:

	javac 1.4: OK
	javac 1.3:
stmt10003.java:15: unreported exception <null>; must be caught or declared to 
be thrown
            throw  null;
            ^
1 error
	Eclipse compiler:
----------
1. ERROR in stmt10003.java (at line 15)
        throw  null;
        ^^^^^^^^^^^
Cannot throw null
----------
NOTES:

OT (18/09/2001 10:01:18 AM)
	See http://developer.java.sun.com/developer/bugParade/bugs/4142896.html

OT (19/09/2001 11:44:20 AM)
		Removing the two lines that reports the problem is the binding 
is NullBinding is good enough to fix the PR:

	Replace this method inside ThrowStatement with the following code:

[	public void resolve(BlockScope scope) {
		exceptionType = exception.resolveTypeExpecting(scope, 
scope.getJavaLangThrowable());
		exception.implicitWidening(exceptionType, exceptionType);
	}]
Comment 1 Philipe Mulet CLA 2001-12-19 09:15:37 EST
Changed the type resolution code to allow it if 1.4 compliant.
Fixed