mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-16 10:17:23 +00:00
ICU-6536 Created a workaround method allowing the cache to be reset.
X-SVN-Rev: 24583
This commit is contained in:
parent
5097c3c3c1
commit
be0227c676
1 changed files with 15 additions and 0 deletions
|
@ -306,6 +306,21 @@ public abstract class UResourceBundle extends ResourceBundle{
|
|||
// Cache for ResourceBundle instantiation
|
||||
private static ICUCache BUNDLE_CACHE = new SimpleCache();
|
||||
|
||||
/*
|
||||
* A HACK!!!!!
|
||||
* Currently if a resourcebundle with fallback turned ON is added to the cache
|
||||
* and then a getBundleInstance() is called for a bundle with fallback turned OFF
|
||||
* it will actually search the cache for any bundle of the same locale
|
||||
* regaurdless of fallback status. This method has been created so that if
|
||||
* The calling method KNOWS that instances of the other fallback state may be in the
|
||||
* cache, the calling method may call this method to clear out the cache.
|
||||
*/
|
||||
public static void resetBundleCache()
|
||||
{
|
||||
//TODO figure a way around this method(see method comment)
|
||||
BUNDLE_CACHE = null;
|
||||
}
|
||||
|
||||
private static void addToCache(ResourceCacheKey key, UResourceBundle b) {
|
||||
BUNDLE_CACHE.put(key, b);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue