Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357099 - javax.persistence.Parameter.getParameterType() does not throw java.lang.IllegalStateException
Summary: javax.persistence.Parameter.getParameterType() does not throw java.lang.Illeg...
Status: CLOSED INVALID
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P2 blocker (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard: jpa21
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-08 10:37 EDT by Stephen DiMilla CLA
Modified: 2022-06-09 10:22 EDT (History)
3 users (show)

See Also:


Attachments
test code (513 bytes, text/plain)
2011-09-08 10:38 EDT, Stephen DiMilla CLA
no flags Details
entity class (1.01 KB, text/plain)
2011-09-08 10:39 EDT, Stephen DiMilla CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen DiMilla CLA 2011-09-08 10:37:50 EDT
Build Identifier: eclipselink-2.3.0.v20110604-r9504

When calling javax.persistence.Parameter.getParameterType() on a parameter from a JPQL TypedQuery, IllegalStateException is not being thrown. Currently the parameter type is being returned. Gordon Yorke indicated that IllegalStateException should be thrown therefore I am filing this bug.

Reproducible: Always

Steps to Reproduce:
Run the attached test code with the attached entity class.
Comment 1 Stephen DiMilla CLA 2011-09-08 10:38:38 EDT
Created attachment 203000 [details]
test code
Comment 2 Stephen DiMilla CLA 2011-09-08 10:39:00 EDT
Created attachment 203001 [details]
entity class
Comment 3 Tom Ware CLA 2012-04-05 11:01:12 EDT
Updating target milestone.
Comment 4 Tom Ware CLA 2013-02-04 14:43:38 EST
I discussed this with Gordon and we agreed the functionality should be as follows:

If we can determine the type, we may return it.

If we cannot, we should throw IllegalStateException

In the test above, we can determine the type, and hence are allowed to return it.
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:22:40 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink