changeset 142:83ffdd1a6294

6759682: APT: compiler message file broken after refactoring of com.sun.tools.javac.util.Message Summary: JavacMessages should refresh its own bundle cache when a new resource bundle is added by APT Reviewed-by: jjg
author mcimadamore
date Wed, 15 Oct 2008 17:23:55 +0100
parents 22c4c1143a3a
children e1332c04f6b6
files src/share/classes/com/sun/tools/javac/util/JavacMessages.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/util/JavacMessages.java	Wed Oct 15 08:07:59 2008 -0700
+++ b/src/share/classes/com/sun/tools/javac/util/JavacMessages.java	Wed Oct 15 17:23:55 2008 +0100
@@ -99,10 +99,11 @@
         bundleNames = bundleNames.prepend(bundleName);
         if (!bundleCache.isEmpty())
             bundleCache.clear();
+        currentBundles = null;
     }
 
     public List<ResourceBundle> getBundles(Locale locale) {
-        if (locale == currentLocale)
+        if (locale == currentLocale && currentBundles != null)
             return currentBundles;
         SoftReference<List<ResourceBundle>> bundles = bundleCache.get(locale);
         List<ResourceBundle> bundleList = bundles == null ? null : bundles.get();