Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361358 - date declared as nullable with ? cannot be compared with == null
Summary: date declared as nullable with ? cannot be compared with == null
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-19 05:18 EDT by Tom B CLA
Modified: 2017-02-23 14:20 EST (History)
2 users (show)

See Also:


Attachments

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