You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Concurrent problem with BeanWrapperImpl.getPropertyValue [SPR-9059] #13698
Since 3.1 BeanWrapperImpl has a concurrent problem with properties which have only a getter method.
Please see my very simple maven project in the attached zip-file.
The main method of the Starter class produces 3 to 8 exceptions per run with the 3.1.0 and the latest SNAPSHOT of 3.1.1. But if you either uncomment the setter or got back to 3.0.7 it is absolute stable.
I suppose it has something to do with the new introduced ExtendedBeanInfo in CachedIntrospectionResults(L224) but I didn't get it right now.
It wasn't a problem of concurrency. The cause was == comparison for tow Method-Objects. But as MethodDescriptors and PropertyDescriptors uses SoftReferences internally its not guaranteed that the Method-Object of a MethodDescriptor is the same Object as the corresponding Method-Object of a PropertyDescriptor. So the check for getter methods in ExtendedBeanInfo must use equals.
A general note to watchers of ExtendedBeanInfo-related issues: #14663 is a major refactoring of ExtendedBeanInfo and overall support for non-void returning setter methods.
If you have submitted a reproduction project with this issue, we have run it through its paces against these new changes, but we would like to ask you to do the same against your actual applications.
Please consider updating your dev or test builds to work against 3.1.4.BUILD-SNAPSHOT and/or 3.2.0.BUILD-SNAPSHOT to verify, and we would appreciate any feedback, even if it's to let us know that all is well. So that we can consolidate feedback, please add your comments to #14663, and mention the original issue(s) that you were watching.
Thanks!
Note also that testing against 3.1.4 is preferable to 3.2.0 because ExtendedBeanInfo is always in the code path in the latter, while in 3.2.0 we've optimized things such that ExtendedBeanInfo is only in play for bean classes that have one or more non-void returning setter methods.
Activity
spring-projects-issues commentedon Jan 27, 2012
Björn Voß commented
It wasn't a problem of concurrency. The cause was == comparison for tow Method-Objects. But as MethodDescriptors and PropertyDescriptors uses SoftReferences internally its not guaranteed that the Method-Object of a MethodDescriptor is the same Object as the corresponding Method-Object of a PropertyDescriptor. So the check for getter methods in ExtendedBeanInfo must use equals.
spring-projects-issues commentedon Jan 28, 2012
André Neubauer commented
Hi Björn,
The bug you mentioned is already addressed with #12995 (https://jira.springsource.org/browse/SPR-8347). There is also a pull request waiting for acceptance (https://github.com/SpringSource/spring-framework/pull/20/commits).
Cheers!
PS: Unfortunately I can't mark this issue as duplicate.
spring-projects-issues commentedon Feb 1, 2012
Chris Beams commented
Thanks Björn, André.
spring-projects-issues commentedon Nov 25, 2012
Chris Beams commented
A general note to watchers of
ExtendedBeanInfo-related issues: #14663 is a major refactoring ofExtendedBeanInfoand overall support for non-void returning setter methods.If you have submitted a reproduction project with this issue, we have run it through its paces against these new changes, but we would like to ask you to do the same against your actual applications.
Please consider updating your dev or test builds to work against 3.1.4.BUILD-SNAPSHOT and/or 3.2.0.BUILD-SNAPSHOT to verify, and we would appreciate any feedback, even if it's to let us know that all is well. So that we can consolidate feedback, please add your comments to #14663, and mention the original issue(s) that you were watching.
Thanks!
Note also that testing against 3.1.4 is preferable to 3.2.0 because
ExtendedBeanInfois always in the code path in the latter, while in 3.2.0 we've optimized things such thatExtendedBeanInfois only in play for bean classes that have one or more non-void returning setter methods.