Hi, On Fri, Mar 14, 2014 at 11:42 AM, Carsten Ziegeler <cziege...@apache.org> wrote: > ...The only other option I see is to make ValueMap a first class citizen and: > a) add a getValueMap() method to Resource - default implementation in > AbstractResource does the same as ResourceUtil does today > b) clearly state that deep gets are allowed for reading from those maps
I like that, it makes sense for every Resource to have a ValueMap. a) will break some code, but with c) that will be easy to fix. > c) provide utility code in AbstractResource (or maybe somewhere else) so > implementations do not need to copy the same code over and over again... I'd put that somewhere else (ValueMapUtil or ResourceUtil) and use it in AbstractResource, to make it easier to reuse in Resource implementations that might not inherit from AbstractResource. AbstractResource should also then provide an adaptTo method that calls getValueMap. -Bertrand