Menu

#4 I18N: Cached values in ConfiguredResource cause problems

open
nobody
None
5
2008-09-22
2008-09-22
Anonymous
No

Looking into the code for ConfiguredResource, I saw this part :

public java.lang.String getValue(java.lang.String key, java.util.Locale locale) {
java.lang.String value = (java.lang.String) messageMap.get(key);
if(value != null)
return value;

This causes big problems when multiple languages are used : the cached value exists for only 1 language, the first one requested.

This map-cache should either be improved or simply dropped. Anyways, ResourceBundle does cache bundles and values.

Thank you.

David

Discussion


Log in to post a comment.

MongoDB Logo MongoDB