6759682: APT: compiler message file broken after refactoring of com.sun.tools.javac.util.Message
authormcimadamore
Wed, 15 Oct 2008 17:23:55 +0100
changeset 1476 4b54f7c2d3db
parent 1475 19c0851667ca
child 1477 aa16dead2793
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
langtools/src/share/classes/com/sun/tools/javac/util/JavacMessages.java
--- a/langtools/src/share/classes/com/sun/tools/javac/util/JavacMessages.java	Wed Oct 15 08:07:59 2008 -0700
+++ b/langtools/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();