private final ConcurrentMap<String, EncodingProperties> messageCache = new ConcurrentHashMap<String, EncodingProperties>();
private String findMessageByLocale(String key, Locale locale) {
String file = messageBasename + (locale == null ? "" : "_" + locale) + messageSuffix;
EncodingProperties properties = messageCache.get(file);
if ((properties == null || reloadable) && engine.hasResource(file)) {
if (properties == null) {
properties = new EncodingProperties();
EncodingProperties old = messageCache.putIfAbsent(file, properties);
if (old != null) {
properties = old;
}
}
try {