diff --git a/ksqldb-common/src/main/java/io/confluent/ksql/util/KsqlConfig.java b/ksqldb-common/src/main/java/io/confluent/ksql/util/KsqlConfig.java index a8f42363f84f..c55da6604bf8 100644 --- a/ksqldb-common/src/main/java/io/confluent/ksql/util/KsqlConfig.java +++ b/ksqldb-common/src/main/java/io/confluent/ksql/util/KsqlConfig.java @@ -81,7 +81,8 @@ public enum DeploymentType { } public static final String KSQL_DEPLOYMENT_TYPE_DOC = - "The type of deployment for ksql. Value must be one of " + Arrays.asList(DeploymentType.values()); + "The type of deployment for ksql. Value must be one of " + + Arrays.asList(DeploymentType.values()); public static final String METRIC_REPORTER_CLASSES_CONFIG = CommonClientConfigs.METRIC_REPORTER_CLASSES_CONFIG; @@ -89,7 +90,8 @@ public enum DeploymentType { public static final String METRIC_REPORTER_CLASSES_DOC = CommonClientConfigs.METRIC_REPORTER_CLASSES_DOC; - private static final String TELEMETRY_REPORTER_CLASS = "io.confluent.telemetry.reporter.TelemetryReporter"; + private static final String TELEMETRY_REPORTER_CLASS = + "io.confluent.telemetry.reporter.TelemetryReporter"; private static final String TELEMETRY_PREFIX = "confluent.telemetry"; private static final Set REPORTER_CONFIGS_PREFIXES = @@ -871,7 +873,7 @@ private static ConfigDef configDef(final ConfigGeneration generation) { return generation == ConfigGeneration.CURRENT ? CURRENT_DEF : LEGACY_DEF; } - private static DeploymentType parseDeploymentType(Object value) { + private static DeploymentType parseDeploymentType(final Object value) { try { return DeploymentType.valueOf(value.toString()); } catch (IllegalArgumentException e) { @@ -1721,9 +1723,10 @@ private KsqlConfig(final ConfigGeneration generation, this.ksqlStreamConfigProps = ksqlStreamConfigProps; } - private void possiblyConfigureConfluentTelemetry(Map map) { - if (KsqlConfig.DeploymentType.confluent.toString().equals(getString(KSQL_DEPLOYMENT_TYPE_CONFIG))) { - List metricReporters = new ArrayList<>(getList(METRIC_REPORTER_CLASSES_CONFIG));; + private void possiblyConfigureConfluentTelemetry(final Map map) { + if (KsqlConfig.DeploymentType.confluent.toString() + .equals(getString(KSQL_DEPLOYMENT_TYPE_CONFIG))) { + final List metricReporters = new ArrayList<>(getList(METRIC_REPORTER_CLASSES_CONFIG)); metricReporters.remove(TELEMETRY_REPORTER_CLASS); map.put(METRIC_REPORTER_CLASSES_CONFIG, metricReporters); } else {