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

Bug 366100

Summary: cbuilder.literal(null) does not thrown java.lang.IllegalArgumentException as specified in the javadoc
Product: z_Archived Reporter: Stephen DiMilla <stephen.dimilla>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: lance.andersen, stephen.dimilla, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
proposed fix and test cases none

Description Stephen DiMilla CLA 2011-12-08 14:56:19 EST
Build Identifier: eclipselink-2.3.0.v20110604-r9504

Client code:

        try {
            CriteriaBuilder cbuilder = getEntityManager().getCriteriaBuilder();
            cbuilder.literal(null);
            System.out.println("Did not throw IllegalArgumentException");
        } catch (IllegalArgumentException iae) {
            System.out.println("Received expected IllegalArgumentException");
        } catch (Exception e) {
            System.out.println("Received unexpected exception:", e);
        }

output:

Did not throw IllegalArgumentException


Reproducible: Always
Comment 1 Tom Ware CLA 2012-04-05 11:01:16 EDT
Updating target milestone.
Comment 2 Chris Delahunt CLA 2012-11-06 17:08:13 EST
Created attachment 223277 [details]
proposed fix and test cases
Comment 3 Chris Delahunt CLA 2012-11-08 11:35:43 EST
*** Bug 366248 has been marked as a duplicate of this bug. ***
Comment 4 Chris Delahunt CLA 2012-11-08 11:36:37 EST
*** Bug 366206 has been marked as a duplicate of this bug. ***
Comment 5 Chris Delahunt CLA 2012-11-08 11:36:52 EST
*** Bug 366199 has been marked as a duplicate of this bug. ***
Comment 6 Chris Delahunt CLA 2012-11-08 12:10:34 EST
Fix checked into main (2.5)
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:30:34 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink