Netflix / archaius

Library for configuration management API
Apache License 2.0
2.46k stars 485 forks source link

Add support for returning collections in parameterized properties #681

Closed akang31 closed 3 months ago

akang31 commented 11 months ago

While normal properties support returning collections via the ConfigProxyFactory, parameterized properties do not.

e.g.

@Configuration
interface Foo {
  @PropertyName(name = "foo.bar.${0}")
  Set<String> getFooBarSet(String s);
}
rgallardo-netflix commented 3 months ago

I've single-stepped through this and I think the issue is rooted in ConfigProxyFactory#L322, where the propertyValueGetter for a parametrized property is built. We are passing in the raw list type, we need to pass the parametrized type instead.