Skip to content

Concurrent problem with BeanWrapperImpl.getPropertyValue [SPR-9059] #13698

Closed

Description

@spring-projects-issues

Björn Voß opened SPR-9059 and commented

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.


Attachments:

Issue Links:

Referenced from: commits 4a8be69, 0ee1256

1 votes, 1 watchers

Activity

  1. spring-projects-issues commented on Jan 27, 2012

    @spring-projects-issues
    CollaboratorAuthor

    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.

  2. spring-projects-issues commented on Jan 28, 2012

    @spring-projects-issues
    CollaboratorAuthor

    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.

  3. spring-projects-issues commented on Feb 1, 2012

    @spring-projects-issues
    CollaboratorAuthor

    Chris Beams commented

    Thanks Björn, André.

  4. spring-projects-issues commented on Nov 25, 2012

    @spring-projects-issues
    CollaboratorAuthor

    Chris Beams commented

    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.

  5. added
    type: bug
    status: duplicate
    and removed
    type: bug
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: duplicate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions