interfaces for Proxies are not regonized as interfaces

Description

In org.hibernate.tuple.PojoEntityTuplizer line 119 reads:
if ( !proxyInterface.isInterface() ) {
and should be
if ( !subclassClass.isInterface() ) {

So the code then would look like this:

Subclass subclass = ( Subclass ) iter.next();
Class subclassProxy = subclass.getProxyInterface();
Class subclassClass = subclass.getMappedClass();
if ( subclassProxy!=null && !subclassClass.equals( subclassProxy ) ) {
if (

throw new MappingException(
"proxy must be either an interface, or the class itself: " +
subclass.getEntityName()
);
}
proxyInterfaces.add( subclassProxy );
}

After that change the specified interfaces for subclass proxies are regonized as such. Without this patch the superclass is checked, which may not have/be an interface as proxy class.

Environment

Discovered on Hibernate 3.0, still present in 3.1rc3

Attachments

Assignee

Steve Ebersole

Reporter

TobiasF

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure