Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368729

Summary: NullValueException is not thrown when passing a null value to a non-nullable parameter of type Any
Product: z_Archived Reporter: Brian Svihovec <svihovec>
Component: EDTAssignee: Project Inbox <edt.javascriptgen-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: hjiyong, jeffdouglas, jinfahua, mheitz, pharmon, tww
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 368728    
Bug Blocks:    

Description Brian Svihovec CLA 2012-01-16 11:08:42 EST
+++ This bug was initially created as a clone of Bug #368728 +++

Given the following EGL source:

    data Any?;

    function setData(value any in)
    	if(value == null)
    		data = null;
    	else
    		data = value;
    	end
    end

    function main()
    	var1 int? = null;
    	setData(var1);
    	setData(null);
    	setData(123);
    end

A NullValueException is not thrown for 'setData(var1)'

NOTE: It appears that an NVE is thrown if you change the parameter in setData to be 'string' instead of 'any'.
Comment 1 Huang Ji Yong CLA 2012-01-18 07:07:01 EST
Defer from 0.8I1 because of vacation
Comment 2 Huang Ji Yong CLA 2012-03-30 22:38:33 EDT
Fixed indirectly