hortonworks / registry

Schema Registry
Apache License 2.0
13 stars 8 forks source link

Support passing cache expiry properties as String #457

Open michaelandrepearce opened 6 years ago

michaelandrepearce commented 6 years ago

Typically some users store properties in files, and load into a java properties file, and passed in to kafka client which then passes these as strings values to SchemaRegistryClient.

Currently where a setting is a number the code simply casts this to (Number) and then calls .longValue which causes a class cast issue if properties are loaded like above, and the user wishes to override.

Changing to Long.valueOf handles this nicely as will return a long still if long/int is passed in but also will parse a string to a long.

michaelandrepearce commented 6 years ago

see PR: https://github.com/hortonworks/registry/pull/458