langtools/src/share/classes/com/sun/tools/javac/util/JavacMessages.java
changeset 1476 4b54f7c2d3db
parent 1471 57506cdfb7b4
child 1652 1324f96f3883
equal deleted inserted replaced
1475:19c0851667ca 1476:4b54f7c2d3db
    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();