-
Notifications
You must be signed in to change notification settings - Fork 6k
Fix blocking in ServletOAuth2AuthorizedClientExchangeFilterFunction #7037
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
Fix blocking in ServletOAuth2AuthorizedClientExchangeFilterFunction #7037
Conversation
// which is a blocking I/O and therefore triggers BlockHound to error. | ||
// The following code forces the initialization of the cache, which ultimately calls | ||
// 'com.fasterxml.jackson.databind.DeserializationContext.hasValueDeserializerFor()'. | ||
new MappingJackson2HttpMessageConverter().canRead( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At minimum this could be simplified to Map.class.getPackage();
55396c8
to
70df9b5
Compare
// it attempts to java.lang.Package.loadManifest() which is blocking I/O and triggers BlockHound to error. | ||
// The following code forces the loading of the manifest. | ||
// NOTE: This is an issue with JDK 8. It's been tested on JDK 10 and works fine w/o this workaround. | ||
Class.class.getPackage(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bsideup I'm curious...It does block, so why would we whitelist it?
Merged via 4ca9e15 |
Fixes gh-6589
Related spring-framework#23361