smiklosovic commented on code in PR #3708:
URL: https://github.com/apache/cassandra/pull/3708#discussion_r1883516990


##########
src/java/org/apache/cassandra/config/DatabaseDescriptor.java:
##########
@@ -960,8 +960,19 @@ else if (conf.commitlog_segment_size.toKibibytes() < 2 * 
conf.max_mutation_size.
         if (conf.client_encryption_options != null)
             conf.client_encryption_options.applyConfig();
 
-        if (conf.jmx_encryption_options != null)
-            conf.jmx_encryption_options.applyConfig();
+        if (conf.jmx_server_options == null)
+        {
+            conf.jmx_server_options = 
JMXServerOptions.createParsingSystemProperties();
+        }
+        else if (JMXServerOptions.isEnabledBySystemProperties())
+        {
+            throw new ConfigurationException("Configure either 
jmx_server_options in cassandra.yaml and comment out " +

Review Comment:
   I think this is already covered. 
   
   `if (conf.jmx_server_options == null)` - this means that if it is configured 
in yaml, this will _not_ be null, right?
   
   So then it this `if` evaluates to `false`, then it goes to `else if` and 
   
   `else if (JMXServerOptions.isEnabledBySystemProperties())`
   
   if this is true, then it throws.
   
   So when does it throw? When we have non-null yaml setting and when 
properties are set - that means it is set at the both places, so we throw.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to