Menu

#1 Inheritance of properties fails when no 'child' properties

v1.0 (example)
open
nobody
None
5
2011-05-12
2011-05-12
Angela Todd
No

I have these properties:

user.id
user.name

I call config.adaptSettings("user.admin.id", true, UserSettings.class);

When ConfigImpl creates a proxy for my config object it will get a ConfigKey for the domain "user.admin" from the ConfigKeyFactory (calling newKey(String domain). This call fails because the ConfigKeyFactory will looks in a map of domain names to key objects and because I haven't got any properties that starts with "user.admin" there is no key registered for that domain. The resulting Params object is given a null domain and all property lookups on my Config object will therefore fail.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB