[hibernate-dev] Covariant returns

Steve Ebersole steve at hibernate.org
Tue Mar 13 17:39:56 EDT 2012


Can someone verify I am not off my rocker here?  Re : 
https://hibernate.onjira.com/browse/HHH-7161

We have a case where Session defines a method that returns a public 
interface org.hibernate.IdentifierLoadAccess.  When SessionImpl 
implements those methods it redefines the return to instead be a private 
inner class that implements that org.hibernate.IdentifierLoadAccess 
interface.

As I understood it, when accessed through the Session interface what 
return type is defined by SessionImpl is irrelevant.  And indeed I am 
not able to reproduce this when access those methods via Session.  My 
IDE gives me errors if I try to cast that reference to SessionImpl 
instead.

-- 
steve at hibernate.org
http://hibernate.org



More information about the hibernate-dev mailing list