Skip to content

Commit

Permalink
Update SchemaRegistryConfig to provide it's own static ConfigDef.
Browse files Browse the repository at this point in the history
This change is required by confluentinc/rest-utils#8 and avoids conflicts with
other subclasses of RestConfig.
  • Loading branch information
ewencp committed Jan 29, 2015
1 parent 01856d2 commit 6d3ba4e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ public class SchemaRegistryConfig extends RestConfig {

private final AvroCompatibilityLevel compatibilityType;

private static final ConfigDef config;

static {
config
config = baseConfigDef()
.defineOverride(RESPONSE_MEDIATYPE_PREFERRED_CONFIG, ConfigDef.Type.LIST,
io.confluent.kafka.schemaregistry.client.rest.Versions.PREFERRED_RESPONSE_TYPES, ConfigDef.Importance.HIGH,
RESPONSE_MEDIATYPE_PREFERRED_CONFIG_DOC)
Expand Down Expand Up @@ -120,7 +122,7 @@ public class SchemaRegistryConfig extends RestConfig {

public SchemaRegistryConfig(Map<? extends Object, ? extends Object> props)
throws RestConfigException {
super(props);
super(config, props);
compatibilityType = AvroCompatibilityLevel
.forName(getString(SchemaRegistryConfig.COMPATIBILITY_CONFIG));
}
Expand Down

0 comments on commit 6d3ba4e

Please sign in to comment.