@@ -42,7 +42,6 @@ public class KafkaConfigurationDiff extends AbstractJsonDiff {
4242 private final Reconciliation reconciliation ;
4343 private final Collection <AlterConfigOp > nodeConfigDiff ;
4444 private final Map <String , ConfigModel > configModel ;
45- private final Map <String , ConfigModel > customConfigModel ;
4645 private final boolean isController ;
4746 private final boolean isBroker ;
4847
@@ -206,7 +205,6 @@ public class KafkaConfigurationDiff extends AbstractJsonDiff {
206205 protected KafkaConfigurationDiff (Reconciliation reconciliation , Config nodeConfigs , String desired , KafkaVersion kafkaVersion , NodeRef nodeRef , boolean isController , boolean isBroker ) {
207206 this .reconciliation = reconciliation ;
208207 this .configModel = KafkaConfiguration .readConfigModel (kafkaVersion );
209- this .customConfigModel = KafkaConfiguration .readCustomConfigModel ();
210208 this .isController = isController ;
211209 this .isBroker = isBroker ;
212210 this .nodeConfigDiff = diff (nodeRef , desired , nodeConfigs , configModel );
@@ -328,7 +326,7 @@ private Collection<AlterConfigOp> diff(NodeRef nodeRef, String desired,
328326
329327 private boolean updateOrAdd (String propertyName , Map <String , ConfigModel > configModel , Map <String , String > desiredMap , Map <String , String > currentMap , Collection <AlterConfigOp > updatedCE ) {
330328 if (!isIgnorableProperty (propertyName )) {
331- if (KafkaConfiguration .isCustomConfigurationOption (propertyName , configModel ) && KafkaConfiguration . isCustomConfigurationOption ( propertyName , customConfigModel ) ) {
329+ if (KafkaConfiguration .isCustomConfigurationOption (propertyName , configModel )) {
332330 LOGGER .traceCr (reconciliation , "custom property {} has been updated/added {}" , propertyName , desiredMap .get (propertyName ));
333331 } else if (KafkaConfiguration .isDouble (propertyName , configModel ) && areDoublesEqual (propertyName , currentMap , desiredMap )) {
334332 // Double properties get special handling because Kafka might reformat them during serialization
@@ -345,7 +343,7 @@ private boolean updateOrAdd(String propertyName, Map<String, ConfigModel> config
345343 }
346344
347345 private boolean removeProperty (Map <String , ConfigModel > configModel , Collection <AlterConfigOp > updatedCE , String pathValueWithoutSlash , ConfigEntry entry ) {
348- if (KafkaConfiguration .isCustomConfigurationOption (entry .name (), configModel ) && KafkaConfiguration . isCustomConfigurationOption ( entry . name (), customConfigModel ) ) {
346+ if (KafkaConfiguration .isCustomConfigurationOption (entry .name (), configModel )) {
349347 // we are deleting custom option
350348 LOGGER .traceCr (reconciliation , "removing custom property {}" , entry .name ());
351349 } else if (entry .isDefault ()) {
@@ -386,9 +384,6 @@ public boolean isEmpty() {
386384 * @return true if the entry matches the scope
387385 */
388386 private boolean isScope (ConfigEntry entry , Scope scope ) {
389- if (customConfigModel .get (entry .name ()) != null ) {
390- return customConfigModel .get (entry .name ()).getScope ().equals (scope );
391- }
392387 return configModel .get (entry .name ()).getScope ().equals (scope );
393388 }
394389
0 commit comments