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

Normalization of bean definition class names for more correct logs #11327

Open
wants to merge 4 commits into
base: 4.8.x
Choose a base branch
from

Conversation

altro3
Copy link
Contributor

@altro3 altro3 commented Nov 8, 2024

Fixed #11320

@altro3 altro3 force-pushed the bean-class-name-normalization branch from 2ad2c17 to 2aaaab2 Compare November 8, 2024 13:10
@altro3 altro3 force-pushed the bean-class-name-normalization branch from 2aaaab2 to d3233d8 Compare November 8, 2024 13:20
@dstepanov
Copy link
Contributor

The correct fix would be for to replace definition.asArgument().getTypeString(true) with a check if it's ProxyBeanDefinition and get the proper type

@altro3
Copy link
Contributor Author

altro3 commented Nov 8, 2024

@dstepanov uhh... need more details. I didn't quite understand how to do it correctly in the end

@dstepanov
Copy link
Contributor

Something like definition instanceof ProxyBeanDefinition and use getTargetType probably

@altro3
Copy link
Contributor Author

altro3 commented Nov 8, 2024

What do you suggest? Add new methods to MessageUtil with arguments:
normalizedBeanType(Argument<?> arg)
normalizedBeanType(BeanDefinition<?> arg)
normalizedBeanType(Class<?> arg)

and add this check inside every method?

Are you sure this solution is better than string normalization?

@dstepanov
Copy link
Contributor

I think the problem is only in BeanDefinition#asArgument

@altro3
Copy link
Contributor Author

altro3 commented Nov 8, 2024

@dstepanov done. But I don't know how to write correct test for it

@altro3 altro3 changed the title Normalization of bean class names for more correct logs Normalization of bean definition class names for more correct logs Nov 8, 2024
@altro3
Copy link
Contributor Author

altro3 commented Dec 1, 2024

@dstepanov ping

@graemerocher graemerocher added the type: improvement A minor improvement to an existing feature label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement A minor improvement to an existing feature
Projects
Status: Ready for Review
Development

Successfully merging this pull request may close these issues.

3 participants