sjvanrossum commented on code in PR #32400:
URL: https://github.com/apache/beam/pull/32400#discussion_r1839950071
##########
sdks/java/io/solace/src/main/java/org/apache/beam/sdk/io/solace/broker/SempBasicAuthClientExecutor.java:
##########
@@ -81,6 +87,15 @@ class SempBasicAuthClientExecutor implements Serializable {
COOKIE_MANAGER_MAP.putIfAbsent(this.cookieManagerKey, new CookieManager());
Review Comment:
Not introduced by this PR, but this map may grow indefinitely. Also, this
line unconditionally constructs a `CookieManager`. Could you change this to
`COOKIE_MANAGER_MAP.computeIfAbsent(this.cookieManagerKey, CookieManager::new)`
so it only constructs a new `CookieManager` when the key is absent?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]