Spring Framework
  1. Spring Framework
  2. SPR-9143

Check original beanClass in #isFactoryBean calls for @Bean methods as well

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 3.2.2
    • Component/s: Core
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      See SPR-8954 for background. The fix there (against 3.1.1) resolved this issue for regular bean definitions, but as demonstrated in the topic branch linked below, the fix does not properly apply for @Bean methods with a FactoryBean return types.

        Issue Links

          Activity

          Hide
          Chris Beams added a comment -

          Topic branch with commit that reproduces this issue: https://github.com/cbeams/spring-framework/tree/SPR-9143

          Show
          Chris Beams added a comment - Topic branch with commit that reproduces this issue: https://github.com/cbeams/spring-framework/tree/SPR-9143
          Hide
          Juergen Hoeller added a comment -

          Fixed for 3.2.2 now through a FactoryBean-specific check in predictBeanType itself, before returning a predicted type. This change also means that we effectively revert SPR-8954's code change in favor of the isFactoryBean implementation simply relying on predictBeanType to sort it out.

          Juergen

          Show
          Juergen Hoeller added a comment - Fixed for 3.2.2 now through a FactoryBean-specific check in predictBeanType itself, before returning a predicted type. This change also means that we effectively revert SPR-8954 's code change in favor of the isFactoryBean implementation simply relying on predictBeanType to sort it out. Juergen

            People

            • Assignee:
              Juergen Hoeller
              Reporter:
              Oliver Gierke
              Last updater:
              Juergen Hoeller
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 10 weeks, 1 day ago