HHH-2268 : handle bridged return types for getters
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@14448 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
0e6db9d066
commit
e01a7bfe54
|
@ -316,8 +316,8 @@ public class BasicPropertyAccessor implements PropertyAccessor {
|
||||||
|
|
||||||
Method[] methods = theClass.getDeclaredMethods();
|
Method[] methods = theClass.getDeclaredMethods();
|
||||||
for (int i=0; i<methods.length; i++) {
|
for (int i=0; i<methods.length; i++) {
|
||||||
// only carry on if the method has no parameters
|
// only carry on if the method has no parameters and is not a bridge
|
||||||
if ( methods[i].getParameterTypes().length==0 ) {
|
if ( methods[i].getParameterTypes().length == 0 && !methods[i].isBridge() ) {
|
||||||
String methodName = methods[i].getName();
|
String methodName = methods[i].getName();
|
||||||
|
|
||||||
// try "get"
|
// try "get"
|
||||||
|
@ -330,9 +330,7 @@ public class BasicPropertyAccessor implements PropertyAccessor {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// if not "get" then try "is"
|
// if not "get", then try "is"
|
||||||
/*boolean isBoolean = methods[i].getReturnType().equals(Boolean.class) ||
|
|
||||||
methods[i].getReturnType().equals(boolean.class);*/
|
|
||||||
if ( methodName.startsWith("is") ) {
|
if ( methodName.startsWith("is") ) {
|
||||||
String testStdMethod = Introspector.decapitalize( methodName.substring(2) );
|
String testStdMethod = Introspector.decapitalize( methodName.substring(2) );
|
||||||
String testOldMethod = methodName.substring(2);
|
String testOldMethod = methodName.substring(2);
|
||||||
|
|
Loading…
Reference in New Issue