HHH-5296 - AbstractFromImpl::getJoin() shall return empty set, not null
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@20027 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
1252346e76
commit
434dba63e4
|
@ -24,6 +24,7 @@
|
|||
package org.hibernate.ejb.criteria.path;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
import javax.persistence.criteria.CollectionJoin;
|
||||
|
@ -243,8 +244,11 @@ public abstract class AbstractFromImpl<Z,X>
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@SuppressWarnings({ "unchecked" })
|
||||
public Set<Join<X, ?>> getJoins() {
|
||||
return joins;
|
||||
return joins == null
|
||||
? Collections.EMPTY_SET
|
||||
: joins;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -575,8 +579,11 @@ public abstract class AbstractFromImpl<Z,X>
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@SuppressWarnings({ "unchecked" })
|
||||
public Set<Fetch<X, ?>> getFetches() {
|
||||
return fetches;
|
||||
return fetches == null
|
||||
? Collections.EMPTY_SET
|
||||
: fetches;
|
||||
}
|
||||
|
||||
public <Y> Fetch<X, Y> fetch(SingularAttribute<? super X, Y> singularAttribute) {
|
||||
|
|
Loading…
Reference in New Issue