• Andy Wilkinson's avatar
    Fix Mock|SpyBean context caching · 41954533
    Andy Wilkinson authored
    The fix for gh-20916 updated DefinitionsParser so that the
    ResolvableType for each MockBean or SpyBean field included the
    implementation class from which the field was found. Where the field
    was declared with a variable generic signature that was made constant
    by its implementation class, this allowed the correct concrete type to
    be determined. It also had the unintended side-effect of preventing two
    test classes with identical `@MockBean` and `@SpyBean` configuration
    from sharing a context as the resolvable types for their mock and spy
    bean fields would now be different.
    
    This commit updates DefinitionsParser to only include the
    implementation class in the ResolvableType if the field's generic type
    is variable. For cases where it is not variable, this restores the
    behaviour prior to the fix for gh-20916.
    
    Fixes gh-22566
    41954533
Name
Last commit
Last update
.bomr Loading commit data...
.github Loading commit data...
.mvn Loading commit data...
ci Loading commit data...
eclipse Loading commit data...
git/hooks Loading commit data...
idea Loading commit data...
spring-boot-project Loading commit data...
spring-boot-tests Loading commit data...
src/checkstyle Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
CODE_OF_CONDUCT.adoc Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
SUPPORT.adoc Loading commit data...
mvnw Loading commit data...
mvnw.cmd Loading commit data...
pom.xml Loading commit data...