Skip to content

Commit ea0dbac

Browse files
committed
fix an incorrect type in SimpleProjectionSpecification
1 parent 15c4313 commit ea0dbac

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

hibernate-core/src/main/java/org/hibernate/query/specification/SimpleProjectionSpecification.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static <T,X> SimpleProjectionSpecification<T,X> create(
6868
*/
6969
static <T,X> SimpleProjectionSpecification<T,X> create(
7070
SelectionSpecification<T> selectionSpecification,
71-
SingularAttribute<T,X> projectedAttribute) {
71+
SingularAttribute<? super T,X> projectedAttribute) {
7272
return new SimpleProjectionSpecificationImpl<>( selectionSpecification, projectedAttribute );
7373
}
7474

hibernate-core/src/main/java/org/hibernate/query/specification/internal/SimpleProjectionSpecificationImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ public class SimpleProjectionSpecificationImpl<T,X> implements SimpleProjectionS
3030

3131
private final SelectionSpecification<T> selectionSpecification;
3232
private final Path<T, X> path;
33-
private final SingularAttribute<T, X> attribute;
33+
private final SingularAttribute<? super T, X> attribute;
3434

3535
public SimpleProjectionSpecificationImpl(SelectionSpecification<T> specification, Path<T, X> path) {
3636
this.selectionSpecification = specification;
3737
this.path = path;
3838
this.attribute = null;
3939
}
4040

41-
public SimpleProjectionSpecificationImpl(SelectionSpecification<T> specification, SingularAttribute<T, X> attribute) {
41+
public SimpleProjectionSpecificationImpl(SelectionSpecification<T> specification, SingularAttribute<? super T, X> attribute) {
4242
this.selectionSpecification = specification;
4343
this.attribute = attribute;
4444
this.path = null;

0 commit comments

Comments
 (0)