brandboat commented on code in PR #15761: URL: https://github.com/apache/kafka/pull/15761#discussion_r1573858499
########## core/src/test/java/kafka/test/ClusterConfig.java: ########## @@ -67,13 +69,16 @@ public class ClusterConfig { this.listenerName = listenerName; this.trustStoreFile = trustStoreFile; this.metadataVersion = metadataVersion; - this.serverProperties = copyOf(serverProperties); - this.producerProperties = copyOf(producerProperties); - this.consumerProperties = copyOf(consumerProperties); - this.adminClientProperties = copyOf(adminClientProperties); - this.saslServerProperties = copyOf(saslServerProperties); - this.saslClientProperties = copyOf(saslClientProperties); - perBrokerOverrideProperties.forEach((brokerId, props) -> this.perBrokerOverrideProperties.put(brokerId, copyOf(props))); + this.serverProperties = Collections.unmodifiableMap(serverProperties); + this.producerProperties = Collections.unmodifiableMap(producerProperties); + this.consumerProperties = Collections.unmodifiableMap(consumerProperties); + this.adminClientProperties = Collections.unmodifiableMap(adminClientProperties); + this.saslServerProperties = Collections.unmodifiableMap(saslServerProperties); + this.saslClientProperties = Collections.unmodifiableMap(saslClientProperties); + this.perBrokerOverrideProperties = Collections.unmodifiableMap( Review Comment: Got it, thanks for explanation. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org