|
From: <leg...@at...> - 2003-08-06 13:24:16
|
The following comment has been added to this issue:
Author: Gavin King
Created: Wed, 6 Aug 2003 8:23 AM
Body:
getGetterOrNull() is recursive!
Are you _certain_ about this?
private static Getter getGetterOrNull(Class theClass, String propertyName) {
if (theClass==Object.class || theClass==null) return null;
Method method = getterMethod(theClass, propertyName);
if(method!=null) {
if ( !ReflectHelper.isPublic(theClass, method) ) method.setAccessible(true);
return new Getter(theClass, method, propertyName);
}
else {
Getter getter = getGetterOrNull( theClass.getSuperclass(), propertyName );
if (getter==null) {
Class[] interfaces = theClass.getInterfaces();
for ( int i=0; getter==null && i<interfaces.length; i++ ) {
getter=getGetterOrNull( interfaces[i], propertyName );
}
}
return getter;
}
}
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-236
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-236
Summary: Deep subclassing fails configuration
Type: Bug
Status: Unassigned
Priority: Major
Project: Hibernate2
Components:
core
Versions:
2.0.1
Assignee:
Reporter: Brian Topping
Created: Wed, 6 Aug 2003 7:09 AM
Updated: Wed, 6 Aug 2003 7:09 AM
Environment: JDK 1.4.1
Description:
Persistence configuration fails when the inheritance depth is greater than two. I was generating a patch, but couldn't get into sf.net to get base CVS for diffs.
It looks to me like ReflectHelper.getGetterOrNull() simply needs a loop to keep checking subclasses all the way up the chain instead of stopping with just one. At least for standard subclass behavior where there is a discriminator, there shouldn't be a problem with arbitrarily deep inheritance. But like I said, I can't get sources so I try it and send a diff. I guess it's the middle of the day in the western hemisphere now, so I'll try tomorrow.
If I get something before you fix it, I'll post it here.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|
|
From: <leg...@at...> - 2003-08-06 13:58:16
|
The following comment has been added to this issue:
Author: Brian Topping
Created: Wed, 6 Aug 2003 8:57 AM
Body:
Indeed, I don't think I've ever seen recursion used in open source. Congrats ;)
I am just switching off the SAR for development purposes. I guess an older version of the class didn't have the method it was looking for, so it was garbage in, garbage out. I still uphold that if I had the source that I could do builds from, I would have caught this on my own, before filing a bug, since I wouldn't have had a patch to go with it.
Sorry for the bother, thanks for the super quick response!!
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-236
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-236
Summary: Deep subclassing fails configuration
Type: Bug
Status: Unassigned
Priority: Major
Project: Hibernate2
Components:
core
Versions:
2.0.1
Assignee:
Reporter: Brian Topping
Created: Wed, 6 Aug 2003 7:09 AM
Updated: Wed, 6 Aug 2003 7:09 AM
Environment: JDK 1.4.1
Description:
Persistence configuration fails when the inheritance depth is greater than two. I was generating a patch, but couldn't get into sf.net to get base CVS for diffs.
It looks to me like ReflectHelper.getGetterOrNull() simply needs a loop to keep checking subclasses all the way up the chain instead of stopping with just one. At least for standard subclass behavior where there is a discriminator, there shouldn't be a problem with arbitrarily deep inheritance. But like I said, I can't get sources so I try it and send a diff. I guess it's the middle of the day in the western hemisphere now, so I'll try tomorrow.
If I get something before you fix it, I'll post it here.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|