Netflix / archaius

Library for configuration management API
Apache License 2.0
2.47k stars 486 forks source link

Archaius should provide some simple syntax to describe the parametrized collection types that are decodable by default. #654

Closed rgallardo-netflix closed 1 year ago

rgallardo-netflix commented 1 year ago

AbstractConfig#getValueWithDefault(Class, String, T) is NOT able to decode collection types, but AbstractConfig#(Type, String, T) can, if a ParametrizedType is passed. We should provide a shorthand method to create such ParametrizedTypes. Otherwise, users are forced to hunt themselves for a way to create them.

Apache Commons Lang 3's TypeUtils has sample code that we could copy and specialize for this restricted use case.