[hibernate-issues] [Hibernate-JIRA] Created: (JPA-9) Incorrect Generics signature for javax.persistence.criteria.CriteriaBuilder.SimpleCase<C, R>

Rodolfo Hansen (JIRA) noreply at atlassian.com
Wed Jan 19 12:07:05 EST 2011


Incorrect Generics signature for javax.persistence.criteria.CriteriaBuilder.SimpleCase<C, R>
--------------------------------------------------------------------------------------------

                 Key: JPA-9
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/JPA-9
             Project: Java Persistence API
          Issue Type: Bug
    Affects Versions: 1.0.0
            Reporter: Rodolfo Hansen
            Priority: Critical


if the CriteriaBuilder's signature for selectCase is:

<C, R> SimpleCase<C, R> selectCase(Expression<? extends C> expression);

then the SimpleCase's methods must also be: 

SimpleCase<C, R> when(Expression<? extends C> condition, R result);
SimpleCase<C, R> when(Expression<? extends C> condition, Expression<? extends R> result);

instead of what is currently exposed.

The code is otherwise correct as the following double cast does work:

final SimpleCase<Expression<Double>, Double> consumecase =
                (SimpleCase<Expression<Double>, Double>) (Object) cb.selectCase(onTime);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list