[hibernate-commits] Hibernate SVN: r14448 - core/trunk/core/src/main/java/org/hibernate/property.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Mon Mar 17 18:17:35 EDT 2008
Author: steve.ebersole at jboss.com
Date: 2008-03-17 18:17:35 -0400 (Mon, 17 Mar 2008)
New Revision: 14448
Modified:
core/trunk/core/src/main/java/org/hibernate/property/BasicPropertyAccessor.java
Log:
HHH-2268 : handle bridged return types for getters
Modified: core/trunk/core/src/main/java/org/hibernate/property/BasicPropertyAccessor.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/property/BasicPropertyAccessor.java 2008-03-17 20:57:09 UTC (rev 14447)
+++ core/trunk/core/src/main/java/org/hibernate/property/BasicPropertyAccessor.java 2008-03-17 22:17:35 UTC (rev 14448)
@@ -316,8 +316,8 @@
Method[] methods = theClass.getDeclaredMethods();
for (int i=0; i<methods.length; i++) {
- // only carry on if the method has no parameters
- if ( methods[i].getParameterTypes().length==0 ) {
+ // only carry on if the method has no parameters and is not a bridge
+ if ( methods[i].getParameterTypes().length == 0 && !methods[i].isBridge() ) {
String methodName = methods[i].getName();
// try "get"
@@ -330,9 +330,7 @@
}
- // if not "get" then try "is"
- /*boolean isBoolean = methods[i].getReturnType().equals(Boolean.class) ||
- methods[i].getReturnType().equals(boolean.class);*/
+ // if not "get", then try "is"
if ( methodName.startsWith("is") ) {
String testStdMethod = Introspector.decapitalize( methodName.substring(2) );
String testOldMethod = methodName.substring(2);
More information about the hibernate-commits
mailing list