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

Bug 361358

Summary: date declared as nullable with ? cannot be compared with == null
Product: z_Archived Reporter: Tom B <tmbarans>
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jeffdouglas, tmbarans
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Tom B CLA 2011-10-19 05:18:44 EDT
Build Identifier: 20110218-0911

An exception with message 'a null value was used' is thrown when comparing nullable dates with null,  using the '== null' operator

Reproducible: Always

Steps to Reproduce:
1. Generate EDate001.as an EGL Test Driver (Java) file is in org.eclipse.edt.eunit.test/api.eglx_lang
2. Run the generated file EDate001_pgm.java

Testcases 3,5,6 fail with exception. Problem can be toggled by commenting out the assertTrue statement and regenerating. These testcases were copied from EString001.egl and modified to use date variables.
Comment 1 Tom B CLA 2011-10-19 05:20:31 EDT
the dates are declared with the ? operator e.g. myDate date?
Comment 2 Jeff Douglas CLA 2011-10-21 16:04:26 EDT
fixed

I question some of the other tests in this testcase.

For example, 
	function runAssignmentFunction02(){@Test}
		myDate date?;
		LogResult.assertTrue("nullable initialization", ((myDate != "") == false ));
	end


why would a null date be expected to be = and empty string?
Comment 3 Tom B CLA 2011-10-23 22:21:49 EDT
verified for  EGL Development Tools (EDT) 0.7.0.v201110232102
Comment 4 Lisa Lasher CLA 2011-11-09 14:06:53 EST
Closing this work item