equal
deleted
inserted
replaced
97 |
97 |
98 public void add(String bundleName) throws MissingResourceException { |
98 public void add(String bundleName) throws MissingResourceException { |
99 bundleNames = bundleNames.prepend(bundleName); |
99 bundleNames = bundleNames.prepend(bundleName); |
100 if (!bundleCache.isEmpty()) |
100 if (!bundleCache.isEmpty()) |
101 bundleCache.clear(); |
101 bundleCache.clear(); |
|
102 currentBundles = null; |
102 } |
103 } |
103 |
104 |
104 public List<ResourceBundle> getBundles(Locale locale) { |
105 public List<ResourceBundle> getBundles(Locale locale) { |
105 if (locale == currentLocale) |
106 if (locale == currentLocale && currentBundles != null) |
106 return currentBundles; |
107 return currentBundles; |
107 SoftReference<List<ResourceBundle>> bundles = bundleCache.get(locale); |
108 SoftReference<List<ResourceBundle>> bundles = bundleCache.get(locale); |
108 List<ResourceBundle> bundleList = bundles == null ? null : bundles.get(); |
109 List<ResourceBundle> bundleList = bundles == null ? null : bundles.get(); |
109 if (bundleList == null) { |
110 if (bundleList == null) { |
110 bundleList = List.nil(); |
111 bundleList = List.nil(); |