Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MockitoPostProcessor should not check for String-based FactoryBean.OBJECT_TYPE_ATTRIBUTE #36659

Closed
snicoll opened this issue Aug 1, 2023 · 2 comments
Assignees
Labels
type: task A general task
Milestone

Comments

@snicoll
Copy link
Member

snicoll commented Aug 1, 2023

FactoryBean.OBJECT_TYPE_ATTRIBUTE should either be a Class or a ResolvableType. It should not check if the attribute is a String. As of Spring Framework 6.1, this throws an exception anyway.

@snicoll snicoll added the type: task A general task label Aug 1, 2023
@snicoll snicoll added this to the 3.2.0-M2 milestone Aug 1, 2023
@snicoll snicoll self-assigned this Aug 1, 2023
@snicoll snicoll closed this as completed in 279f822 Aug 1, 2023
wilkinsona added a commit that referenced this issue Aug 1, 2023
@wilkinsona
Copy link
Member

wilkinsona commented Aug 1, 2023

Reverted temporarily as not checking String values causes a failure in smoketest.data.jpa.SpyBeanSampleDataJpaApplicationTests. We should be able to re-apply the change once spring-projects/spring-data-commons#2891 has been fixed and we've switched to Spring Data snapshots.

@wilkinsona wilkinsona reopened this Aug 1, 2023
@snicoll
Copy link
Member Author

snicoll commented Aug 3, 2023

As it turns out, stopping reading the String attribute means that we request the type to the container and it doesn't find the repository, while it should have. This is being investigated in spring-projects/spring-framework#30987

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

No branches or pull requests

2 participants