From 1c27ee9bb51087d6a16bd9e0097386c62ec746db Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Mon, 13 Oct 2008 15:08:15 +0000 Subject: [PATCH] HHH-3517 : default Tuplizer impls git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@15341 1b8cb986-b30d-0410-93ca-fae66ebed9b2 --- .../hibernate/tuple/entity/EntityTuplizerFactory.java | 3 ++- core/src/main/java/org/hibernate/util/ReflectHelper.java | 9 +-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/org/hibernate/tuple/entity/EntityTuplizerFactory.java b/core/src/main/java/org/hibernate/tuple/entity/EntityTuplizerFactory.java index a1c3168906..a348e1ab47 100644 --- a/core/src/main/java/org/hibernate/tuple/entity/EntityTuplizerFactory.java +++ b/core/src/main/java/org/hibernate/tuple/entity/EntityTuplizerFactory.java @@ -140,7 +140,8 @@ public class EntityTuplizerFactory implements Serializable { } private boolean hasProperConstructor(Class tuplizerClass) { - return getProperConstructor( tuplizerClass ) != null; + return getProperConstructor( tuplizerClass ) != null + && ! ReflectHelper.isAbstractClass( tuplizerClass ); } private Constructor getProperConstructor(Class clazz) { diff --git a/core/src/main/java/org/hibernate/util/ReflectHelper.java b/core/src/main/java/org/hibernate/util/ReflectHelper.java index 6a96ad8f65..e6d3db3937 100644 --- a/core/src/main/java/org/hibernate/util/ReflectHelper.java +++ b/core/src/main/java/org/hibernate/util/ReflectHelper.java @@ -144,14 +144,7 @@ public final class ReflectHelper { */ public static boolean implementsInterface(Class clazz, Class intf) { assert intf.isInterface() : "Interface to check was not an interface"; - - Class[] interfaces = clazz.getInterfaces(); - for ( int i = 0; i < interfaces.length; i++ ) { - if ( intf.isAssignableFrom( interfaces[i] ) ) { - return true; - } - } - return false; + return intf.isAssignableFrom( clazz ); } /**