-
Notifications
You must be signed in to change notification settings - Fork 566
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
Partial fix for issue #7698 - TlsManager support for client-side #7699
Partial fix for issue #7698 - TlsManager support for client-side #7699
Conversation
private TlsManagerCache() { | ||
} | ||
|
||
static TlsManager getOrCreate(Object configBean, |
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.
The signature should be:
static <T> TlsManager getOrCreate(T configBean, Function<T, TlsManager> creator)
if this would be the way to go, as that allows you to use a method referenc for the creator
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.
pushed
* @param creator the creator to apply if not already in cache, which takes the config bean instance | ||
* @return the tls manager instance from cache, defaulting to creation from the {@code creator} if not in cache | ||
*/ | ||
static TlsManager getOrCreate(Config config, |
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.
why is there a name
and config
parameter, when theser are not used in the code? Please remove them
Also update the signature to what I wrote above
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.
I was thinking we might need them for future use. I'll remove them but at least consider that.
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.
pushed
common/tls/src/main/java/io/helidon/common/tls/spi/TlsManagerProvider.java
Show resolved
Hide resolved
common/tls/src/main/java/io/helidon/common/tls/spi/TlsManagerProvider.java
Outdated
Show resolved
Hide resolved
…-side (helidon-io#7699) * Partial fix for issue helidon-io#7698 - Support for caching managers when the config is the same.
This provides an enhancement whereas on the same JVM, using the same config bean, you will get the same
TlsManager
instance. This is to prevent a proliferation of manager instances in client-side usages - which will officially be coming in a separator PR later.Base issue is #7698