jamesnetherton commented on code in PR #9629:
URL: https://github.com/apache/camel-quarkus/pull/9629#discussion_r4787551069


##########
extensions/tls-registry/runtime/src/main/java/org/apache/camel/quarkus/core/tls/TlsConfigurationConverter.java:
##########
@@ -101,6 +100,7 @@ static SSLContextParameters convert(TlsConfiguration 
tlsConfig, String name, Ver
             // Copied on first use, since most components never read it. A 
certificate reload replaces this whole
             // bean, see TlsRegistryHelper.registerOrUpdateBean
             private KeyStore keyStoreCopy;
+            private String keyStorePassword;

Review Comment:
   The only read is in `getKeyManagers()`, after it calls the synchronized 
`keyStoreCopy()`. Every reader takes the same lock the writer held, and the 
field doesn't change once the copy succeeds. Visibility is therefore already 
guaranteed, and I'd rather leave `volatile` off, since it would suggest the 
field is read without the lock.
   



-- 
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]

Reply via email to