Hi guys,

if we keep current impl,
ServiceContext.getInstance().getService(ConfigurationContext.class).get()
should be done in the constructor IMO and not be contextual which
often leads to some issues at runtime - basically it would be possible
to leak configuration.

Also the usage of PropertyFilter doesnt fully work, a single loop is
not enough since a filter can return a filterable value so it should
basically be a:

String old = null;
do {
old = unfilteredValue;
for(PropertyFilter filter:
        
ServiceContext.getInstance().getService(ConfigurationContext.class).get().getPropertyFilters()){
    unfilteredValue = filter.filterProperty(key, unfilteredValue,
            (String k) -> key.equals(k)?null:get(k).orElse(null));
}

} while (old != null && unfilteredValue != null &&
!old.equals(unfilteredValue));


or sthg like that.

wdyt?

Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau

Reply via email to