Skip to content

Resolve JavaType only once for whitelisted class #7755

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

Merged

Conversation

m7stock
Copy link
Contributor

@m7stock m7stock commented Dec 18, 2019

Summary

The Jackson 2 JavaType is unnecessarily resolved twice when a class is whitelisted. This should be the most likely case. The delegate doing this may be a ClassNameIdResolver whose operations seem rather complex, so it would be a good idea to avoid a call.

Actual Behavior

JavaTypes are resolved twice for a whitelisted class.

Expected Behavior

JavaTypes are resolved only once for a whitelisted class.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 18, 2019
@eleftherias eleftherias self-assigned this Dec 19, 2019
Copy link
Contributor

@eleftherias eleftherias 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 @MatthiasStock! I have left one small comment inline.

@eleftherias eleftherias added in: core An issue in spring-security-core type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Dec 31, 2019
@m7stock m7stock force-pushed the whitelist-reuse-javatype branch from 6c2fe94 to 98689c2 Compare December 31, 2019 16:07
@eleftherias eleftherias merged commit 5fde304 into spring-projects:master Jan 2, 2020
@eleftherias
Copy link
Contributor

Thanks for the PR @MatthiasStock! This is now merged into master.

@eleftherias eleftherias added this to the 5.3.0.M1 milestone Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core An issue in spring-security-core type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants