mirror of https://github.com/apache/kafka.git
KAFKA-16592 Add a new constructor which invokes the existing constructor with default value for alternativeString (#15762)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
parent
960794a677
commit
b8b2415d5e
|
@ -1256,7 +1256,17 @@ public class ConfigDef {
|
||||||
public final boolean internalConfig;
|
public final boolean internalConfig;
|
||||||
public final String alternativeString;
|
public final String alternativeString;
|
||||||
|
|
||||||
|
// This constructor is present for backward compatibility reasons.
|
||||||
public ConfigKey(String name, Type type, Object defaultValue, Validator validator,
|
public ConfigKey(String name, Type type, Object defaultValue, Validator validator,
|
||||||
|
Importance importance, String documentation, String group,
|
||||||
|
int orderInGroup, Width width, String displayName,
|
||||||
|
List<String> dependents, Recommender recommender,
|
||||||
|
boolean internalConfig) {
|
||||||
|
this(name, type, defaultValue, validator, importance, documentation, group, orderInGroup, width, displayName,
|
||||||
|
dependents, recommender, internalConfig, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ConfigKey(String name, Type type, Object defaultValue, Validator validator,
|
||||||
Importance importance, String documentation, String group,
|
Importance importance, String documentation, String group,
|
||||||
int orderInGroup, Width width, String displayName,
|
int orderInGroup, Width width, String displayName,
|
||||||
List<String> dependents, Recommender recommender,
|
List<String> dependents, Recommender recommender,
|
||||||
|
|
|
@ -1117,9 +1117,10 @@ public class AbstractHerderTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addConfigKey(Map<String, ConfigDef.ConfigKey> keys, String name, String group) {
|
protected void addConfigKey(Map<String, ConfigDef.ConfigKey> keys, String name, String group) {
|
||||||
keys.put(name, new ConfigDef.ConfigKey(name, ConfigDef.Type.STRING, null, null,
|
ConfigDef configDef = new ConfigDef().define(name, ConfigDef.Type.STRING, null, null,
|
||||||
ConfigDef.Importance.HIGH, "doc", group, 10,
|
ConfigDef.Importance.HIGH, "doc", group, 10,
|
||||||
ConfigDef.Width.MEDIUM, "display name", Collections.emptyList(), null, false, null));
|
ConfigDef.Width.MEDIUM, "display name", Collections.emptyList(), null, null);
|
||||||
|
keys.putAll(configDef.configKeys());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addValue(List<ConfigValue> values, String name, String value, String...errors) {
|
protected void addValue(List<ConfigValue> values, String name, String value, String...errors) {
|
||||||
|
|
Loading…
Reference in New Issue