Skip to content

Conversation

jcordoba95
Copy link

Fixes wrong prints of @ConditionalOnBean for negative matches in Conditions Evaluation Report by changing a hardcoded ConditionalOnBean.class for annotationType in org.springframework.boot.autoconfigure.condition.OnBeanCondition.Spec<A> message methods.

It also changes Class<?> annotationType for Class<? extends Annotation> annotationType for type safety and to be able to use org.springframework.boot.autoconfigure.condition.ConditionMessage forCondition method.

Fixes #19169

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 27, 2020
Copy link
Member

@snicoll snicoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

Could you please add a test that validates the change? Asserting on the message in the report is already done in ConditionalOnClassTests so the setup should be pretty similar.

@snicoll snicoll added the status: waiting-for-feedback We need additional information before we can continue label Jan 28, 2020
@jcordoba95
Copy link
Author

Hello @snicoll , sorry for the delay on the test.
I have added the test to validate the bug fix.
If there is anything else needed, please let me know :)

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Feb 10, 2020
@snicoll snicoll added type: bug A general bug and removed status: feedback-provided Feedback has been provided status: waiting-for-triage An issue we've not yet triaged labels Feb 11, 2020
@snicoll snicoll added this to the 2.2.5 milestone Feb 11, 2020
@snicoll snicoll self-assigned this Feb 11, 2020
snicoll pushed a commit that referenced this pull request Feb 11, 2020
snicoll added a commit that referenced this pull request Feb 11, 2020
@snicoll snicoll closed this in b4d118e Feb 11, 2020
@snicoll
Copy link
Member

snicoll commented Feb 11, 2020

@jcordoba95 thank you for making your first contribution to Spring Boot.

@wilkinsona wilkinsona changed the title Fixes wrong prints of @ConditionalOnBean for negative matches Conditions evaluation report mistakenly prints '@ConditionalOnBean' for negative matches Feb 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Conditions evaluation report mistakenly prints '@ConditionalOnBean' for negative matches
3 participants