Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366100 - cbuilder.literal(null) does not thrown java.lang.IllegalArgumentException as specified in the javadoc
Summary: cbuilder.literal(null) does not thrown java.lang.IllegalArgumentException as ...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 366199 366206 366248 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-08 14:56 EST by Stephen DiMilla CLA
Modified: 2022-06-09 10:30 EDT (History)
3 users (show)

See Also:


Attachments
proposed fix and test cases (40.54 KB, patch)
2012-11-06 17:08 EST, Chris Delahunt CLA
no flags Details | Diff

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