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
--- 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();